bhyvexml2argvtest: use virCommandToStringFull to strip command path

Currently the tests would fail if the bhyve commands are installed in
different path then /usr/bin. Strip the command path to not depend on
the host environment.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Pavel Hrdina 2021-04-16 20:32:34 +02:00
parent 7e88184b8e
commit a6cc9e46fb
89 changed files with 90 additions and 90 deletions

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-A \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd1.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd1.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd1.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/cdrom.iso \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/cdrom.iso \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-X \
-Y \
-Z

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c cpus=2,sockets=1,cores=2,threads=1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/fizz_buzz_bazz \
fizz_buzz_bazz \
-X \
-Y \
-Z

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root cd \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/cdrom.iso \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root hd0,msdos1 \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root hd0,msdos1 \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root hd0,msdos1 \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-H \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-w \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root hd0,msdos1 \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/local/sbin/grub-bhyve \
grub-bhyve \
--root hd0,msdos1 \
--device-map '<device.map>' \
--memory 214 \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-u \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyve \
bhyve \
-c 1 \
-m 214 \
-S \

View File

@ -1,4 +1,4 @@
/usr/sbin/bhyveload \
bhyveload \
-m 214 \
-d /tmp/freebsd.img \
bhyve

View File

@ -86,13 +86,13 @@ static int testCompareXMLToArgvFiles(const char *xml,
goto out;
}
if (!(actualargv = virCommandToString(cmd, true)))
if (!(actualargv = virCommandToStringFull(cmd, true, true)))
goto out;
if (actualdm != NULL)
virTrimSpaces(actualdm, NULL);
if (!(actualld = virCommandToString(ldcmd, true)))
if (!(actualld = virCommandToStringFull(ldcmd, true, true)))
goto out;
if (virTestCompareToFileFull(actualargv, cmdline, false) < 0)