qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown
@ 2014-09-23  2:26 Fam Zheng
  2014-09-24  9:05 ` Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Fam Zheng @ 2014-09-23  2:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Wenchao Xia, Stefan Hajnoczi, Max Reitz

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>
---
 tests/qemu-iotests/common | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/qemu-iotests/common b/tests/qemu-iotests/common
index 70df659..2403a20 100644
--- a/tests/qemu-iotests/common
+++ b/tests/qemu-iotests/common
@@ -382,10 +382,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
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-25 10:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23  2:26 [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown Fam Zheng
2014-09-24  9:05 ` Stefan Hajnoczi
2014-09-25  1:46   ` Fam Zheng
2014-09-25 10:15     ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).