5fc298
From a71653b20b889a71c6643171603e65b0ca945ea4 Mon Sep 17 00:00:00 2001
5fc298
From: Frantisek Sumsal <fsumsal@redhat.com>
5fc298
Date: Wed, 30 Nov 2022 15:24:33 +0100
5fc298
Subject: [PATCH] test: disable flaky subtests that require udevadm wait/lock
5fc298
5fc298
Certain TEST-64-UDEV-STORAGE tests require `udevadm wait` and `udevadm
5fc298
lock` verbs to work reliably. Since we don't plan to backport the verbs
5fc298
to RHEL 9.1 and older, let's skip the tests to make CIs a bit more
5fc298
reliable when dealing with z-streams.
5fc298
5fc298
Necessary only on RHEL 9.1 and 9.0.
5fc298
5fc298
rhel-only
5fc298
Related: #2149074
5fc298
---
5fc298
 test/TEST-64-UDEV-STORAGE/test.sh | 5 +++++
5fc298
 1 file changed, 5 insertions(+)
5fc298
5fc298
diff --git a/test/TEST-64-UDEV-STORAGE/test.sh b/test/TEST-64-UDEV-STORAGE/test.sh
5fc298
index 2a5b5b2dd3..659b03e07b 100755
5fc298
--- a/test/TEST-64-UDEV-STORAGE/test.sh
5fc298
+++ b/test/TEST-64-UDEV-STORAGE/test.sh
5fc298
@@ -310,6 +310,11 @@ EOF
5fc298
 
5fc298
 # Test case for issue https://github.com/systemd/systemd/issues/19946
5fc298
 testcase_simultaneous_events() {
5fc298
+    if ! "$BUILD_DIR/udevadm" lock --version >/dev/null; then
5fc298
+        echo "This test is flaky without udevadm wait/lock, skipping the test..."
5fc298
+        return 77
5fc298
+    fi
5fc298
+
5fc298
     local qemu_opts=("-device virtio-scsi-pci,id=scsi")
5fc298
     local partdisk="${TESTDIR:?}/simultaneousevents.img"
5fc298