xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Jim Fehlig <jfehlig@suse.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: libvir-list@redhat.com, xen-devel@lists.xensource.com
Subject: Re: [libvirt] [PATCH v2 4/4] libxl: Add a test suite for libxl	option generator
Date: Tue, 17 Jun 2014 12:40:30 -0600	[thread overview]
Message-ID: <53A08B9E.4040106@suse.com> (raw)
In-Reply-To: <1402995177.16844.12.camel@kazak.uk.xensource.com>

Ian Campbell wrote:
> On Mon, 2014-06-16 at 17:11 -0600, Jim Fehlig wrote:
>   
>>> This function exists in Xen 4.2 as well, in libxl.h.
>>>   
>>>       
>> Any ideas on how to handle this?  I'm not aware of an existing macro to
>> check for func 'foo' defined in header 'bar'.  Is writing a custom macro
>> along these lines a good solution?  A bad solution I tried was hacking
>> the test to check libxl version via libxl_get_version_info(), but that
>> API does not work if not running Xen.
>>     
>
> Given that it exists in everything from 4.2 onwards why do you need to
> check for it?
>   

Hrm, right.  I had the half-brained idea to use this to solve the
failures I saw when testing this series against Xen 4.2

https://www.redhat.com/archives/libvir-list/2014-June/msg00170.html

I think the solution to that specific problem is to use Xen 4.2 config
as the baseline.  But it got me thinking about the general problem you
mentioned near the end of this mail

https://www.redhat.com/archives/libvir-list/2014-June/msg00032.html

With virJSONStringCompare in 1/1, Daniel provides a way to handle
existence of new fields showing up in the json.  But what if I want to
write a test where the expected data is not supported on earlier
versions?   E.g. how would I add a test to check conversion of '<tpm
...>' to 'vtpms: [ ]' and expect that to work when running 'make check'
against a 4.2 libxl where vtpms were not yet supported?  I suppose each
such test would have to probe for the feature it checks and skip if not
found.

Regards,
Jim

  reply	other threads:[~2014-06-17 18:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 11:02 [PATCH v2 0/4] Testing libvirt XML -> libxl_domain_config conversion Daniel P. Berrange
2014-06-03 11:02 ` [libvirt] [PATCH v2 1/4] util: Introduce virJSONStringCompare for JSON doc comparisons Daniel P. Berrange
2014-06-03 21:18   ` Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 2/4] util: Allow port allocator to skip bind() check Daniel P. Berrange
2014-06-03 21:25   ` [libvirt] " Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 3/4] tests: Add more test suite mock helpers Daniel P. Berrange
2014-06-03 21:30   ` [libvirt] " Jim Fehlig
2014-06-03 11:02 ` [PATCH v2 4/4] libxl: Add a test suite for libxl option generator Daniel P. Berrange
2014-06-03 21:45   ` [libvirt] " Jim Fehlig
2014-06-16 23:11     ` Jim Fehlig
2014-06-17  8:52       ` Ian Campbell
2014-06-17 18:40         ` Jim Fehlig [this message]
2014-06-18  8:33           ` Ian Campbell
2014-06-18  9:07           ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A08B9E.4040106@suse.com \
    --to=jfehlig@suse.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=libvir-list@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).