From: Osier Yang Date: Tue, 17 Apr 2012 14:53:51 +0000 (+0800) Subject: test: Set the fixed uuid for the default XMLs X-Git-Tag: v0.9.12-rc1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4010217e73c433221db47ab79981777724f7fd75;p=thirdparty%2Flibvirt.git test: Set the fixed uuid for the default XMLs The objects (domain, pool, network, etc) for testing are defined/ started each time when opening a connect to test driver, and thus the UUID for the objects will be generated each time, with different values. e.g. % for i in {1..3}; do ./tools/virsh --connect \ test:///default dumpxml test | grep uuid; done a1b6ee1f-97de-f0ee-617a-0cdb74947df5 ee68d7d2-3eb9-593e-2769-797ce1f4c4aa fecb1d3a-918a-8412-e534-76192cf32b18 It's the potential bug which can cause operations like below to fail: $ virsh -c test:///default dumpxml test > test.xml [ Some modificatons, though it's not supported, but it should work ] $ virsh -c test:///default define test.xml This patch set fixed UUID for objects which support it. (domain, pool, network). --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1587958c2d..39ac503d90 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -230,6 +230,7 @@ no_memory: static const char *defaultDomainXML = "" " test" +" 6695eb01-f6a4-8304-79aa-97f2502e193f" " 8388608" " 2097152" " 2" @@ -242,6 +243,7 @@ static const char *defaultDomainXML = static const char *defaultNetworkXML = "" " default" +" dd8fe884-6c02-601e-7551-cca97df1c5df" " " " " " " @@ -265,6 +267,7 @@ static const char *defaultInterfaceXML = static const char *defaultPoolXML = "" " default-pool" +" dfe224cb-28fb-8dd0-c4b2-64eb3f0f4566" " " " /default-pool" " "