diff options
author | Fam Zheng <famz@redhat.com> | 2014-09-24 11:05:57 +0800 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-09-25 15:25:20 +0200 |
commit | c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7 (patch) | |
tree | f6cc018f36023ca6613f9d516807cfcd7663811b /tests/qemu-iotests/common | |
parent | 9aebf3b89281a173d2dfeee379b800be5e3f363e (diff) | |
download | qemu-c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7.zip qemu-c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7.tar.gz qemu-c9d17ad0dd3f04cdef44d58db97ea9864fbcdee7.tar.bz2 |
qemu-iotests: Fail test if explicit test case number is unknown
When we expand a number range, we just print "$id - unknown test,
ignored", this is convenient if we want to run a range of tests.
When we designate a test case number explicitly, we shouldn't just
ignore it if the case script doesn't exist.
Print an error and fail the test.
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/common')
-rw-r--r-- | tests/qemu-iotests/common | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common index 89c6dde..9e12bec 100644 --- a/tests/qemu-iotests/common +++ b/tests/qemu-iotests/common @@ -376,10 +376,16 @@ BEGIN { for (t='$start'; t<='$end'; t++) printf "%03d\n",t }' \ echo $id >>$tmp.list else # oops - echo "$id - unknown test, ignored" + if [ "$start" == "$end" -a "$id" == "$end" ] + then + echo "$id - unknown test" + exit 1 + else + echo "$id - unknown test, ignored" + fi fi fi - done + done || exit 1 fi done |