diff options
author | Dmitry V. Levin <ldv@strace.io> | 2023-03-26 10:00:00 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-04-03 16:44:26 +0200 |
commit | 56df2f6f9b0d37169b3d9112ad5701a4d3692b8d (patch) | |
tree | 63135daeb5459362ba9d0f01a9d5b8e694f57548 /test/units/testsuite-17.11.sh | |
parent | tpm2: add support for a trusted SRK (diff) | |
download | systemd-56df2f6f9b0d37169b3d9112ad5701a4d3692b8d.tar.xz systemd-56df2f6f9b0d37169b3d9112ad5701a4d3692b8d.zip |
udev-rules: check tokens order
When invoked by udevadm verify, warn about rules that have PROGRAM
assignments specified after RESULT checks.
Diffstat (limited to '')
-rwxr-xr-x | test/units/testsuite-17.11.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/units/testsuite-17.11.sh b/test/units/testsuite-17.11.sh index e3a96e5cdb..ce6f58077f 100755 --- a/test/units/testsuite-17.11.sh +++ b/test/units/testsuite-17.11.sh @@ -300,6 +300,9 @@ test_syntax_error 'ACTION=="a" NAME="b"' 'A comma between tokens is expected.' test_syntax_error 'ACTION=="a",, NAME="b"' 'More than one comma between tokens.' test_syntax_error 'ACTION=="a" , NAME="b"' 'Stray whitespace before comma.' test_syntax_error 'ACTION=="a",NAME="b"' 'Whitespace after comma is expected.' +test_syntax_error 'RESULT=="a", PROGRAM="b"' 'Reordering RESULT check after PROGRAM assignment.' +test_syntax_error 'RESULT=="a*", PROGRAM="b", RESULT=="*c", PROGRAM="d"' \ + 'Reordering RESULT check after PROGRAM assignment.' cat >"${rules}" <<'EOF' KERNEL=="a|b", KERNEL=="a|c", NAME="d" @@ -308,6 +311,7 @@ KERNEL!="a", KERNEL!="b", NAME="c" KERNEL=="|a", KERNEL=="|b", NAME="c" KERNEL=="*", KERNEL=="a*", NAME="b" KERNEL=="a*", KERNEL=="c*|ab*", NAME="d" +PROGRAM="a", RESULT=="b" EOF assert_0 "${rules}" |