* [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown
@ 2014-09-24 3:05 Fam Zheng
2014-09-25 10:18 ` Stefan Hajnoczi
2014-09-25 13:27 ` Kevin Wolf
0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2014-09-24 3:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Kevin Wolf, 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>
---
v2: In subject explict -> explicit.
---
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] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown
2014-09-24 3:05 [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown Fam Zheng
@ 2014-09-25 10:18 ` Stefan Hajnoczi
2014-09-25 13:27 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2014-09-25 10:18 UTC (permalink / raw)
To: Fam Zheng; +Cc: Kevin Wolf, qemu-devel, Max Reitz
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
On Wed, Sep 24, 2014 at 11:05:57AM +0800, Fam Zheng wrote:
> 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>
>
> ---
> v2: In subject explict -> explicit.
> ---
> tests/qemu-iotests/common | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown
2014-09-24 3:05 [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown Fam Zheng
2014-09-25 10:18 ` Stefan Hajnoczi
@ 2014-09-25 13:27 ` Kevin Wolf
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2014-09-25 13:27 UTC (permalink / raw)
To: Fam Zheng; +Cc: qemu-devel, Stefan Hajnoczi, Max Reitz
Am 24.09.2014 um 05:05 hat Fam Zheng geschrieben:
> 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>
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-25 13:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 3:05 [Qemu-devel] [PATCH v2] qemu-iotests: Fail test if explicit test case number is unknown Fam Zheng
2014-09-25 10:18 ` Stefan Hajnoczi
2014-09-25 13:27 ` Kevin Wolf
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).