On Fri, 2008-03-28 at 18:10 -0700, Vadim Zaliva wrote:
Attached is a patch, implementing Domain.pin_vcpu method.
I have tested it locally and it works. Here is my test code:
Excellent. I just committed it with some minor modifications (use
ALLOC/ALLOC_N instead of malloc, since the former will raise proper
out-of-memory exceptions and runs the gc when memory is low)
However, when I try this method from test/tc_connect.rb it fails:
# rake test
(in /home/lord/src/ruby-libvirt)
Loaded suite /usr/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake/
rake_test_loader
Started
libvir: error : this function is not supported by the hypervisor:
virDomainPinVcpu
E....
Finished in 0.006319 seconds.
1) Error:
test_domain(TestConnect):
SystemCallError: unknown error - libvir call virDomainPinVcpu failed
./tests/tc_connect.rb:113:in `pin_vcpu'
./tests/tc_connect.rb:113:in `test_domain'
It looks like virDomainPinVcpu is simply not implemented in the test
driver; I'll take your word for it that it works properly ;)
David