From 2c77f52e39ff2ba071e3b549ad7a3ebea0758edd Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Nov 2013 14:40:32 +0800 Subject: [PATCH] qemu-iotests: Introduce _unsupported_imgopts Introduce _unsupported_imgopts that causes _notrun for specific image options. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.rc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 28ba0d9ad5..2489c437eb 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -406,6 +406,17 @@ _default_cache_mode() fi } +_unsupported_imgopts() +{ + for bad_opt + do + if echo "$IMGOPTS" | grep -q 2>/dev/null "$bad_opt" + then + _notrun "not suitable for image option: $bad_opt" + fi + done +} + # this test requires that a specified command (executable) exists # _require_command()