qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Wenchao Xia <xiawenc@linux.vnet.ibm.com>
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	[thread overview]
Message-ID: <20140924090500.GE21137@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1411439186-20582-1-git-send-email-famz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1465 bytes --]

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 #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-09-24  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-09-25  1:46   ` Fam Zheng
2014-09-25 10:15     ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140924090500.GE21137@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiawenc@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).