1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

test: Fix parsing nested <volume> XML

Reproducer:

./build/tools/virsh \
    --connect test:///`pwd`/examples/xml/test/testnodeinline.xml \
    vol-list default-pool

Fixes: b3e33a0ef7e62169175280c647aa9ac361bd554d

Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2022-10-17 12:11:22 -04:00
parent f1aa092334
commit a58da46415

View File

@ -1152,7 +1152,7 @@ testOpenVolumesForPool(const char *file,
g_autofree xmlNodePtr *nodes = NULL;
g_autoptr(virStorageVolDef) volDef = NULL;
num = virXPathNodeSet("/pool/volume", ctxt, &nodes);
num = virXPathNodeSet("./volume", ctxt, &nodes);
if (num < 0)
return -1;