]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
loop/009: require --option of udevadm control command
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Wed, 29 Nov 2023 11:36:15 +0000 (20:36 +0900)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 30 Nov 2023 02:48:36 +0000 (11:48 +0900)
The test case loop/009 calls udevadm control command with --ping option.
When systemd version is prior to 241, udevadm control command does not
support the option, and the test case fails. Check availability of the
option to avoid the failure.

Link: https://github.com/osandov/blktests/issues/129
Reported-by: Disha Goel <disgoel@linux.ibm.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/loop/009

index 2b7a042dd83be06584c098c6d9794a963de03c24..d3c7991a46fff1ba649e1809585026de808eb1c7 100755 (executable)
@@ -10,6 +10,12 @@ DESCRIPTION="check that LOOP_CONFIGURE sends uevents for partitions"
 
 QUICK=1
 
+requires() {
+       if ! udevadm control --ping >& /dev/null; then
+               SKIP_REASONS+=("udevadm control does not support --ping option")
+       fi
+}
+
 test() {
        echo "Running ${TEST_NAME}"