[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
- [Qemu-devel] [PATCH v3 0/6] Add cache mode option to qemu-iotests, and change default mode to "writeback", Fam Zheng, 2013/11/20
- [Qemu-devel] [PATCH v3 2/6] qemu-iotests: Honour cache mode in iotests.py, Fam Zheng, 2013/11/20
- [Qemu-devel] [PATCH v3 1/6] qemu-iotests: Add "-c <cache-mode>" option, Fam Zheng, 2013/11/20
- [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes, Fam Zheng, 2013/11/20
- Re: [Qemu-devel] [PATCH v3 3/6] qemu-iotests: Add _supported_cache_modes,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH v3 4/6] qemu-iotests: Change default cache mode to "writeback", Fam Zheng, 2013/11/20
- [Qemu-devel] [PATCH v3 5/6] qemu-iotests: Force qcow2 in error path test in 048, Fam Zheng, 2013/11/20
- [Qemu-devel] [PATCH v3 6/6] qemu-iotests: Clean up spaces in usage output, Fam Zheng, 2013/11/20
- Re: [Qemu-devel] [PATCH v3 0/6] Add cache mode option to qemu-iotests, and change default mode to "writeback", Stefan Hajnoczi, 2013/11/21