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