Finally have some time to submit this small patch for a bug I'm seeing
with Xen 3.3.1.
If s-expression returned by xend contains an empty list, sexpr2string()
failed to serialize it. E.g. sexpr containing (cpus (()())) would cause
sexpr2string() to fail.
I spoke with danpb on IRC about this bug and he suggested adding a
XML/sexpr pair that exhibits the problem to tests/xml2sexprtest.c. I
can easily produce the sexpr but not the case with XML. The empty cpus
lists indicate no explicit affinity and AFAIK the only way to express
this in XML is absence of cpuset attribute in vcpu element. But IMO we
should not produce the (cpus (()()...)) sexpr in this case. It should
only be produced when user has explicitly specified affinity. Does this
sound reasonable?
Regards,
Jim