[libvirt] [PATCH 0/2] Enable pool-rbd storagexml2xmltest

The test for an RBD pool in storagepoolxml2xml was commited 4 years ago but it was not enabled. It was also incorrect, but didn't generate errors because it was never run. These patches correct the test then enable it Anatole Denis (2): tests: storagepoolxml2xmltest: Fix pool-rbd test tests: storagepoolxml2xmltest: Enable pool-rbd tests/storagepoolxml2xmlin/pool-rbd.xml | 1 + tests/storagepoolxml2xmlout/pool-rbd.xml | 2 +- tests/storagepoolxml2xmltest.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) -- 2.7.2

This test failed for two reasons: * The uuid was missing from the input file * The output file had the <name> in a different place from the actual output --- tests/storagepoolxml2xmlin/pool-rbd.xml | 1 + tests/storagepoolxml2xmlout/pool-rbd.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/storagepoolxml2xmlin/pool-rbd.xml b/tests/storagepoolxml2xmlin/pool-rbd.xml index 056ba6e..f3a1c26 100644 --- a/tests/storagepoolxml2xmlin/pool-rbd.xml +++ b/tests/storagepoolxml2xmlin/pool-rbd.xml @@ -1,5 +1,6 @@ <pool type='rbd'> <name>ceph</name> + <uuid>47c1faee-0207-e741-f5ae-d9b019b98fe2</uuid> <source> <name>rbd</name> <host name='localhost' port='6789'/> diff --git a/tests/storagepoolxml2xmlout/pool-rbd.xml b/tests/storagepoolxml2xmlout/pool-rbd.xml index 4fe2fce..3cdf0a0 100644 --- a/tests/storagepoolxml2xmlout/pool-rbd.xml +++ b/tests/storagepoolxml2xmlout/pool-rbd.xml @@ -5,9 +5,9 @@ <allocation unit='bytes'>0</allocation> <available unit='bytes'>0</available> <source> - <name>rbd</name> <host name='localhost' port='6789'/> <host name='localhost' port='6790'/> + <name>rbd</name> <auth type='ceph' username='admin'> <secret uuid='2ec115d7-3a88-3ceb-bc12-0ac909a6fd87'/> </auth> -- 2.7.2

This test was commited 4 years ago, but was never enabled in storagepoolxml2xmltest.c. This patch reactivates it, conditionnaly on RBD storage support being enabled --- tests/storagepoolxml2xmltest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/storagepoolxml2xmltest.c b/tests/storagepoolxml2xmltest.c index 41d6987..b432b85 100644 --- a/tests/storagepoolxml2xmltest.c +++ b/tests/storagepoolxml2xmltest.c @@ -101,6 +101,9 @@ mymain(void) DO_TEST("pool-zfs"); DO_TEST("pool-zfs-sourcedev"); #endif +#ifdef WITH_STORAGE_RBD + DO_TEST("pool-rbd"); +#endif return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE; } -- 2.7.2

On 03/11/2016 11:50 AM, Anatole Denis wrote:
The test for an RBD pool in storagepoolxml2xml was commited 4 years ago but it was not enabled. It was also incorrect, but didn't generate errors because it was never run. These patches correct the test then enable it
Anatole Denis (2): tests: storagepoolxml2xmltest: Fix pool-rbd test tests: storagepoolxml2xmltest: Enable pool-rbd
tests/storagepoolxml2xmlin/pool-rbd.xml | 1 + tests/storagepoolxml2xmlout/pool-rbd.xml | 2 +- tests/storagepoolxml2xmltest.c | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-)
ACK series and pushed. Congrats on your first libvirt patches. John
participants (2)
-
Anatole Denis
-
John Ferlan