From 13a30c6dc45415b35a8b7d0719197a9b859c3de1 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 30 Dec 2023 02:51:50 +0900 Subject: [PATCH] test: add simple coverage tests for 'udevadm lock' --- test/units/testsuite-17.10.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/units/testsuite-17.10.sh b/test/units/testsuite-17.10.sh index 20f120a9305..f229dcf25f0 100755 --- a/test/units/testsuite-17.10.sh +++ b/test/units/testsuite-17.10.sh @@ -238,4 +238,17 @@ assert_rc 124 timeout 5 udevadm wait --removed /sys/class/net/$netdev udevadm wait --settle /sys/class/net/$netdev udevadm wait -h +udevadm lock --help +udevadm lock --version +for i in /dev/block/*; do + udevadm lock --device "$i" --print + udevadm lock --device "$i" true + (! udevadm lock --device "$i" false) +done +for i in / /usr; do + udevadm lock --backing "$i" --print + udevadm lock --backing "$i" true + (! udevadm lock --backing "$i" false) +done + exit 0