qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Fam Zheng <famz@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
	WenchaoXia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes
Date: Thu, 21 Nov 2013 13:39:57 +0100	[thread overview]
Message-ID: <20131121123957.GA7466@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1384933457-26953-4-git-send-email-famz@redhat.com>

On Wed, Nov 20, 2013 at 03:44:14PM +0800, Fam Zheng wrote:
> -_unsupported_qemu_io_options()
> +_supported_cache_modes()
>  {
> -    for bad_opt
> -    do
> -        for opt in $QEMU_IO_OPTIONS
> -        do
> -            if [ "$bad_opt" = "$opt" ]
> -            then
> -                _notrun "not suitable for qemu-io option: $bad_opt"
> -            fi
> -        done
> +    if $CACHEMODE_IS_DEFAULT; then
> +        QEMU_IO="$QEMU_IO -t $1"
> +        return
> +    fi
> +    for mode; do
> +        if [ "$mode" = "$CACHEMODE" ]; then
> +            return
> +        fi
>      done
> +    _notrun "not suitable for cache mode: $CACHEMODE"
>  }

This seems weird to me:
By default tests run with CACHEMODE=writethrough but test cases can use
_supported_cache_modes() to switch to a different "default" behind the
scenes?

Why not keep it simple:
If a test doesn't support CACHEMODE, it gets skipped.

Stefan

  reply	other threads:[~2013-11-21 12:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  7:44 [Qemu-devel] [PATCH v3 0/6] Add cache mode option to qemu-iotests, and change default mode to "writeback" Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 1/6] qemu-iotests: Add "-c <cache-mode>" option Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 2/6] qemu-iotests: Honour cache mode in iotests.py Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes Fam Zheng
2013-11-21 12:39   ` Stefan Hajnoczi [this message]
2013-11-21 12:46     ` Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 4/6] qemu-iotests: Change default cache mode to "writeback" Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 5/6] qemu-iotests: Force qcow2 in error path test in 048 Fam Zheng
2013-11-21 12:41   ` Stefan Hajnoczi
2013-11-21 12:50     ` Fam Zheng
2013-11-20  7:44 ` [Qemu-devel] [PATCH v3 6/6] qemu-iotests: Clean up spaces in usage output Fam Zheng
2013-11-21 12:43 ` [Qemu-devel] [PATCH v3 0/6] Add cache mode option to qemu-iotests, and change default mode to "writeback" Stefan Hajnoczi
2013-11-21 14:16   ` Kevin Wolf
2013-11-22  8:57     ` Stefan Hajnoczi
2013-11-22  9:30       ` Kevin Wolf
2013-11-22 15:51         ` 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=20131121123957.GA7466@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=kwolf@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).