From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Fehlig Subject: Re: [PATCH 5/5] Add a test suite for libxl option generator Date: Mon, 02 Jun 2014 15:42:36 -0600 Message-ID: <538CEFCC.1040108@suse.com> References: <1401470645-19869-1-git-send-email-berrange@redhat.com> <1401470645-19869-6-git-send-email-berrange@redhat.com> <1401713626.19553.5.camel@kazak.uk.xensource.com> <20140602125752.GI28039@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140602125752.GI28039@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Daniel P. Berrange" Cc: libvir-list@redhat.com, xen-devel@lists.xensource.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org Daniel P. Berrange wrote: > On Mon, Jun 02, 2014 at 01:53:46PM +0100, Ian Campbell wrote: > >> On Fri, 2014-05-30 at 18:24 +0100, Daniel P. Berrange wrote: >> >>> + if (STRNEQ(expectargv, (char *)actualargv)) { >>> + virtTestDifference(stderr, expectargv, (char *)actualargv); >>> + goto cleanup; >>> + } >>> >> Since you are using libxl_domain_config_gen_json you can control the >> pretty printing, but if you were to use the libxl_domain_config_to_json >> you might have problems if the library was to do something slightly >> different e.g. with whitespace. >> >> In 4.5 we will have libxl_*_from_json and (I think) libxl_*_compare, so >> you could read in the template and compare it with the generated struct. >> That doesn't help you now of course. >> >> Also in 4.5 the json will omit fields which are set to the their >> explicit default value. libxl_*_from_json will still do the right thing, >> but it'd be another annoyance for you here I think. >> >> Lastly, when we add new fields to the API they will start showing up in >> the json (modulo the omission of defaults discussed above). >> > > Hmm, that's a v good point. > One that can already be seen. The test works when run on Xen 4.3, but fails on 4.4. E.g. c_info gained some new fields "poolid": 0, "run_hotplug_scripts": "", + "pvh": "", + "driver_domain": "" }, And on_watchdog's value changed "on_poweroff": null, "on_reboot": "destroy", - "on_watchdog": null, + "on_watchdog": "destroy", "on_crash": "destroy" Regards, Jim