qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

iotests: fix exclusion option

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.

Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 20170427205100.9505-3-jsnow@redhat.com
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>

authored by

John Snow and committed by
Max Reitz
cc02e89e 4f38497b

+2 -1
+2 -1
tests/qemu-iotests/common
··· 86 86 elif $xgroup 87 87 then 88 88 # arg after -x 89 - [ ! -s $tmp.list ] && ls [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] >$tmp.list 2>/dev/null 89 + # Populate $tmp.list with all tests 90 + awk '/^[0-9]{3,}/ {print $1}' "${source_iotests}/group" > $tmp.list 2>/dev/null 90 91 group_list=`sed -n <"$source_iotests/group" -e 's/$/ /' -e "/^[0-9][0-9][0-9].* $r /"'{ 91 92 s/ .*//p 92 93 }'`