qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes
Date: Thu, 21 Nov 2013 13:39:57 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

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