Skip to contentSkip to conversation

iotests: trivial fixups

PATCH Applied John Snow 3 participants 5 messages Apr 27, 2017 – Apr 28, 2017

lore
Share & tools
lore

John Snow

author
#0 lore raw

cover iotests: trivial fixups

Excised from an old patchset from 2015, just a couple of touchups.

John Snow (2):
iotests: clarify help text
iotests: fix exclusion option

 tests/qemu-iotests/common | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.9.3
author
#1 lore raw

PATCH 1/2 iotests: clarify help text

Split the help text to highlight the groups of options a little better, carving out a clear "format" and "protocols" section.

---
 tests/qemu-iotests/common | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
tests/qemu-iotests/common +6 -2
index 9c6f972..fa8e69e 100644
@@ -138,7 +138,7 @@ common options
     -v                  verbose
     -d                  debug
 
-check options
+image format options
     -raw                test raw (default)
     -bochs              test bochs
     -cloop              test cloop
@@ -150,14 +150,18 @@ check options
     -vpc                test vpc
     -vhdx               test vhdx
     -vmdk               test vmdk
+    -luks               test luks
+
+image protocol options
     -file               test file (default)
     -rbd                test rbd
     -sheepdog           test sheepdog
     -nbd                test nbd
     -ssh                test ssh
     -nfs                test nfs
-    -luks               test luks
     -vxhs               test vxhs
+
+other options
     -xdiff              graphical mode diff
     -nocache            use O_DIRECT on backing file
     -misalign           misalign memory allocations
Signature · 1 line
2.9.3
author
#2 lore raw

PATCH 2/2 iotests: fix exclusion option

In reply to John Snow

If you are running out-of-tree, the -x option to exclude a certain iotest is broken.

Replace porcelain usage of ls with a sturdier awk command.

---
 tests/qemu-iotests/common | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/qemu-iotests/common +2 -1
index fa8e69e..f2a7199 100644
@@ -86,7 +86,8 @@ s/ .*//p
     elif $xgroup
     then
         # arg after -x
-        [ ! -s $tmp.list ] && ls [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] >$tmp.list 2>/dev/null
+        # Populate $tmp.list with all tests
+        awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.list 2>/dev/null
         group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{
 s/ .*//p
 }'`
Signature · 1 line
2.9.3
Reviewed-by on the v1 series
#3 lore raw
In reply to John Snow
Quoted 5 lines · John Snow

Excised from an old patchset from 2015, just a couple of touchups.

John Snow (2):
iotests: clarify help text
iotests: fix exclusion option

[eww - we were really using 'ls' instead of 'echo' to expand a glob? Your patch to switch to 'awk' is indeed nicer]

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org