mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
iotests: mark 151, 181, 185 & 308 as flaky tests
Introduce a "_flaky_test" function for shell based I/O tests which
accepts a GitLab issue URL, and causes the I/O test to be skipped
unless the $QEMU_TEST_FLAKY_TESTS environment variable is set.
The equivalent "skip_flaky" test decorator is added for python based
I/O tests with the same behaviour.
This is used by:
* Test 151 which fails in QEMU private AWS runners due to failure
to make progress in time
* Test 181 which fails with a non-responsive QEMU on AWS runners
with the QED format
* Test 185 which fails in GitLab shared runners
* Test 308 which fails to see disk usage increase after fallocate
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -308,6 +308,7 @@ class TestThrottledWithNbdExportBase(iotests.QMPTestCase):
|
||||
class TestLowThrottledWithNbdExport(TestThrottledWithNbdExportBase):
|
||||
iops = 16
|
||||
|
||||
@iotests.skip_flaky("https://gitlab.com/qemu-project/qemu/-/work_items/3513")
|
||||
def testUnderLoad(self):
|
||||
'''
|
||||
Throttle the source node, then issue a whole bunch of external requests
|
||||
|
||||
@@ -48,6 +48,8 @@ _unsupported_fmt qcow vdi vhdx vmdk vpc vvfat parallels
|
||||
_supported_proto generic
|
||||
_supported_os Linux
|
||||
|
||||
_flaky_test https://gitlab.com/qemu-project/qemu/-/work_items/3515
|
||||
|
||||
size=64M
|
||||
_make_test_img $size
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
|
||||
_supported_fmt qcow2
|
||||
_supported_proto file
|
||||
_supported_os Linux
|
||||
_flaky_test https://gitlab.com/qemu-project/qemu/-/issues/3270
|
||||
|
||||
size=$((64 * 1048576))
|
||||
TEST_IMG="${TEST_IMG}.base" _make_test_img $size
|
||||
|
||||
@@ -53,6 +53,8 @@ _supported_proto file # We create the FUSE export manually
|
||||
_supported_os Linux # We need /dev/urandom
|
||||
_require_disk_usage
|
||||
|
||||
_flaky_test https://gitlab.com/qemu-project/qemu/-/work_items/3514
|
||||
|
||||
# $1: Export ID
|
||||
# $2: Options (beyond the node-name and ID)
|
||||
# $3: Expected return value (defaults to 'return')
|
||||
|
||||
@@ -1088,5 +1088,21 @@ _qcow2_dump_header()
|
||||
fi
|
||||
}
|
||||
|
||||
# This must be referenced after any _require_ lines, so that
|
||||
# test filtering happens first
|
||||
_flaky_test()
|
||||
{
|
||||
if test -z "$1"
|
||||
then
|
||||
echo "A GitLab issue URL must be provided for a flaky test"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$QEMU_TEST_FLAKY_TESTS"
|
||||
then
|
||||
_notrun "Test is flaky (see $1) and \$QEMU_TEST_FLAKY_TESTS is not set"
|
||||
fi
|
||||
}
|
||||
|
||||
# make sure this script returns success
|
||||
true
|
||||
|
||||
@@ -1603,6 +1603,22 @@ def skip_if_user_is_root(func):
|
||||
return func(*args, **kwargs)
|
||||
return func_wrapper
|
||||
|
||||
def skip_flaky(bugurl):
|
||||
'''Skip Test Decorator
|
||||
Always skips test due to unreliable design.
|
||||
Requires a bug report URL for historical record.'''
|
||||
def skip_test_decorator(func):
|
||||
def func_wrapper(*args, **kwargs):
|
||||
if os.environ.get("QEMU_TEST_FLAKY_TESTS", None) is None:
|
||||
case_notrun(
|
||||
('{}: test is flaky (see {}) and $QEMU_TEST_FLAKY_TESTS ' +
|
||||
'is not set').format(args[0], bugurl))
|
||||
return None
|
||||
else:
|
||||
return func(*args, **kwargs)
|
||||
return func_wrapper
|
||||
return skip_test_decorator
|
||||
|
||||
# We need to filter out the time taken from the output so that
|
||||
# qemu-iotest can reliably diff the results against master output,
|
||||
# and hide skipped tests from the reference output.
|
||||
|
||||
Reference in New Issue
Block a user