]> git.ipfire.org Git - thirdparty/libvirt.git/commit
test: Set the fixed uuid for the default XMLs
authorOsier Yang <jyang@redhat.com>
Tue, 17 Apr 2012 14:53:51 +0000 (22:53 +0800)
committerOsier Yang <jyang@redhat.com>
Tue, 17 Apr 2012 14:53:51 +0000 (22:53 +0800)
commit4010217e73c433221db47ab79981777724f7fd75
tree293b76907e89f15ea7567ecee30a442618caac5d
parenta4cda054e7fac8165e9c800b41090caf9fde761a
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
  <uuid>a1b6ee1f-97de-f0ee-617a-0cdb74947df5</uuid>
  <uuid>ee68d7d2-3eb9-593e-2769-797ce1f4c4aa</uuid>
  <uuid>fecb1d3a-918a-8412-e534-76192cf32b18</uuid>

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).
src/test/test_driver.c