mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 09:17:52 +03:00
qemuargv2xmltest: Resurrect RBD and iSCSI auth
Ressurect the disk-drive-network-iscsi-auth and disk-drive-network-rbd-auth tests. Make adjustments to the args and xml file to be compatible with other changes made to the non "-auth" so that the only difference is the authentication information. Adjust the qemuargv2xmltest.c to filter out "<secret" and "</auth>" since the args -> xml has no concept of usage it doesn't get printed. This results in the </auth> being printed on the same line as "<secret" and the secret XML is not closed - a bit of an issue, but soon to be fixed.
This commit is contained in:
parent
1c36b944e2
commit
7712fc7cdb
@ -26,6 +26,8 @@ static int blankProblemElements(char *data)
|
|||||||
if (virtTestClearLineRegex("<name>[[:alnum:]]+</name>", data) < 0 ||
|
if (virtTestClearLineRegex("<name>[[:alnum:]]+</name>", data) < 0 ||
|
||||||
virtTestClearLineRegex("<uuid>([[:alnum:]]|-)+</uuid>", data) < 0 ||
|
virtTestClearLineRegex("<uuid>([[:alnum:]]|-)+</uuid>", data) < 0 ||
|
||||||
virtTestClearLineRegex("<memory.*>[[:digit:]]+</memory>", data) < 0 ||
|
virtTestClearLineRegex("<memory.*>[[:digit:]]+</memory>", data) < 0 ||
|
||||||
|
virtTestClearLineRegex("<secret.*>", data) < 0 ||
|
||||||
|
virtTestClearLineRegex("</auth.*>", data) < 0 ||
|
||||||
virtTestClearLineRegex("<currentMemory.*>[[:digit:]]+</currentMemory>",
|
virtTestClearLineRegex("<currentMemory.*>[[:digit:]]+</currentMemory>",
|
||||||
data) < 0 ||
|
data) < 0 ||
|
||||||
virtTestClearLineRegex("<readonly/>", data) < 0 ||
|
virtTestClearLineRegex("<readonly/>", data) < 0 ||
|
||||||
@ -226,8 +228,10 @@ mymain(void)
|
|||||||
DO_TEST("disk-drive-network-nbd-ipv6-export");
|
DO_TEST("disk-drive-network-nbd-ipv6-export");
|
||||||
DO_TEST("disk-drive-network-nbd-unix");
|
DO_TEST("disk-drive-network-nbd-unix");
|
||||||
DO_TEST("disk-drive-network-iscsi");
|
DO_TEST("disk-drive-network-iscsi");
|
||||||
|
DO_TEST("disk-drive-network-iscsi-auth");
|
||||||
DO_TEST("disk-drive-network-gluster");
|
DO_TEST("disk-drive-network-gluster");
|
||||||
DO_TEST("disk-drive-network-rbd");
|
DO_TEST("disk-drive-network-rbd");
|
||||||
|
DO_TEST("disk-drive-network-rbd-auth");
|
||||||
DO_TEST("disk-drive-network-rbd-ipv6");
|
DO_TEST("disk-drive-network-rbd-ipv6");
|
||||||
/* older format using CEPH_ARGS env var */
|
/* older format using CEPH_ARGS env var */
|
||||||
DO_TEST("disk-drive-network-rbd-ceph-env");
|
DO_TEST("disk-drive-network-rbd-ceph-env");
|
||||||
|
@ -3,5 +3,7 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
|||||||
-M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
|
-M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
|
||||||
-no-acpi -boot c -usb \
|
-no-acpi -boot c -usb \
|
||||||
-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\
|
-drive file=iscsi://myname:AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A@example.org\
|
||||||
/iqn.1992-01.com.example,if=virtio,format=raw \
|
:6000/iqn.1992-01.com.example,if=virtio,format=raw \
|
||||||
|
-drive file=iscsi://example.org:6000/iqn.1992-01.com.example/1,if=virtio,\
|
||||||
|
format=raw \
|
||||||
-net none -serial none -parallel none
|
-net none -serial none -parallel none
|
||||||
|
@ -20,13 +20,19 @@
|
|||||||
<secret type='iscsi' usage='mycluster_myname'/>
|
<secret type='iscsi' usage='mycluster_myname'/>
|
||||||
</auth>
|
</auth>
|
||||||
<source protocol='iscsi' name='iqn.1992-01.com.example'>
|
<source protocol='iscsi' name='iqn.1992-01.com.example'>
|
||||||
<host name='example.org'/>
|
<host name='example.org' port='6000'/>
|
||||||
</source>
|
</source>
|
||||||
<target dev='vda' bus='virtio'/>
|
<target dev='vda' bus='virtio'/>
|
||||||
</disk>
|
</disk>
|
||||||
|
<disk type='network' device='disk'>
|
||||||
|
<driver name='qemu' type='raw'/>
|
||||||
|
<source protocol='iscsi' name='iqn.1992-01.com.example/1'>
|
||||||
|
<host name='example.org' port='6000'/>
|
||||||
|
</source>
|
||||||
|
<target dev='vdb' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
<controller type='usb' index='0'/>
|
<controller type='usb' index='0'/>
|
||||||
<controller type='ide' index='0'/>
|
|
||||||
<controller type='pci' index='0' model='pci-root'/>
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
<memballoon model='virtio'/>
|
<memballoon model='none'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
<devices>
|
<devices>
|
||||||
<emulator>/usr/bin/qemu</emulator>
|
<emulator>/usr/bin/qemu</emulator>
|
||||||
<disk type='block' device='disk'>
|
<disk type='block' device='disk'>
|
||||||
|
<driver name='qemu' type='raw'/>
|
||||||
<source dev='/dev/HostVG/QEMUGuest1'/>
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
<target dev='hda' bus='ide'/>
|
<target dev='hda' bus='ide'/>
|
||||||
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
|
||||||
@ -33,6 +34,7 @@
|
|||||||
</disk>
|
</disk>
|
||||||
<controller type='usb' index='0'/>
|
<controller type='usb' index='0'/>
|
||||||
<controller type='ide' index='0'/>
|
<controller type='ide' index='0'/>
|
||||||
<memballoon model='virtio'/>
|
<controller type='pci' index='0' model='pci-root'/>
|
||||||
|
<memballoon model='none'/>
|
||||||
</devices>
|
</devices>
|
||||||
</domain>
|
</domain>
|
||||||
|
Loading…
Reference in New Issue
Block a user