virCommandToString has the possibility to return an already wrapped string with better format than what we get from the test wrapper script. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- tests/storagepoolxml2argvdata/pool-fs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-fs.argv | 5 ++++- tests/storagepoolxml2argvdata/pool-logical-create.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical-noname.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical-nopath.argv | 3 ++- tests/storagepoolxml2argvdata/pool-logical.argv | 3 ++- tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-auto.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs-linux.argv | 4 +++- .../pool-netfs-ns-mountopts-linux.argv | 4 +++- .../pool-netfs-protocol-ver-linux.argv | 4 +++- tests/storagepoolxml2argvdata/pool-netfs.argv | 5 ++++- tests/storagepoolxml2argvtest.c | 4 ++-- 15 files changed, 42 insertions(+), 16 deletions(-) diff --git a/tests/storagepoolxml2argvdata/pool-fs-linux.argv b/tests/storagepoolxml2argvdata/pool-fs-linux.argv index 6d014320cf..99cc8ee77f 100644 --- a/tests/storagepoolxml2argvdata/pool-fs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-fs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec \ --t ext3 /dev/sda6 /mnt +-t ext3 \ +/dev/sda6 \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-fs.argv b/tests/storagepoolxml2argvdata/pool-fs.argv index 537ce4cee5..8254863b57 100644 --- a/tests/storagepoolxml2argvdata/pool-fs.argv +++ b/tests/storagepoolxml2argvdata/pool-fs.argv @@ -1 +1,4 @@ -mount -t ext3 /dev/sda6 /mnt +mount \ +-t ext3 \ +/dev/sda6 \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-logical-create.argv b/tests/storagepoolxml2argvdata/pool-logical-create.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-create.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-create.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-logical-noname.argv b/tests/storagepoolxml2argvdata/pool-logical-noname.argv index 9f7eda00bd..90fa7b6f02 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-noname.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-noname.argv @@ -1 +1,2 @@ -vgchange -aly zily +vgchange \ +-aly zily diff --git a/tests/storagepoolxml2argvdata/pool-logical-nopath.argv b/tests/storagepoolxml2argvdata/pool-logical-nopath.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical-nopath.argv +++ b/tests/storagepoolxml2argvdata/pool-logical-nopath.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-logical.argv b/tests/storagepoolxml2argvdata/pool-logical.argv index 8c7f8c93f9..e22c05beb9 100644 --- a/tests/storagepoolxml2argvdata/pool-logical.argv +++ b/tests/storagepoolxml2argvdata/pool-logical.argv @@ -1 +1,2 @@ -vgchange -aly HostVG +vgchange \ +-aly HostVG diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv index b5e455090a..9974aea273 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto-linux.argv @@ -1,2 +1,4 @@ mount \ --o nodev,nosuid,noexec localhost:/var/lib/libvirt/images /mnt +-o nodev,nosuid,noexec \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-auto.argv b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv index 888a0161b8..e49233cd93 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-auto.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-auto.argv @@ -1 +1,3 @@ -mount localhost:/var/lib/libvirt/images /mnt +mount \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv index feb20d7bc8..3432ab11bd 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-cifs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,guest \ --t cifs //example.com/samba_share /mnt/cifs +-t cifs \ +//example.com/samba_share \ +/mnt/cifs diff --git a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv index 4524bc921a..e622e0eb95 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-gluster-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,direct-io-mode=1 \ --t glusterfs example.com:/volume /mnt/gluster +-t glusterfs \ +example.com:/volume \ +/mnt/gluster diff --git a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv index ce0d88cfac..4012b04d7d 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv index 517fdbb080..433b39d0e2 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-ns-mountopts-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,nfsvers=3,sync,lazytime \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv index fc1d91c614..dac46a074f 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs-protocol-ver-linux.argv @@ -1,3 +1,5 @@ mount \ -o nodev,nosuid,noexec,nfsvers=3 \ --t nfs localhost:/var/lib/libvirt/images /mnt +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvdata/pool-netfs.argv b/tests/storagepoolxml2argvdata/pool-netfs.argv index 04127c5087..0ed31b642b 100644 --- a/tests/storagepoolxml2argvdata/pool-netfs.argv +++ b/tests/storagepoolxml2argvdata/pool-netfs.argv @@ -1 +1,4 @@ -mount -t nfs localhost:/var/lib/libvirt/images /mnt +mount \ +-t nfs \ +localhost:/var/lib/libvirt/images \ +/mnt diff --git a/tests/storagepoolxml2argvtest.c b/tests/storagepoolxml2argvtest.c index 0279437f63..58fb14b8b2 100644 --- a/tests/storagepoolxml2argvtest.c +++ b/tests/storagepoolxml2argvtest.c @@ -74,12 +74,12 @@ testCompareXMLToArgvFiles(bool shouldFail, goto cleanup; }; - if (!(actualCmdline = virCommandToStringFull(cmd, false, true))) { + if (!(actualCmdline = virCommandToStringFull(cmd, true, true))) { VIR_TEST_DEBUG("pool type '%s' failed to get commandline", defTypeStr); goto cleanup; } - if (virTestCompareToFile(actualCmdline, cmdline) < 0) + if (virTestCompareToFileFull(actualCmdline, cmdline, false) < 0) goto cleanup; ret = 0; -- 2.30.2