qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case nu


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH] qemu-iotests: Fail test if explict test case number is unknown
Date: Wed, 24 Sep 2014 10:05:00 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Sep 23, 2014 at 10:26:26AM +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.

I guess you want this because new test case numbers are often sparse?
For example, 096, 096, 098 are missing.  Presumably those patches are
waiting to be merged but we already merged 100.

It's helps to explain "why" this patch is useful.

> 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

What is the purpose of this line?

Attachment: pgpzpplRskOlw.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]