|
|
bd1529 |
From 134a415c2d690e57d0f1add23e900e60bcef4627 Mon Sep 17 00:00:00 2001
|
|
|
bd1529 |
From: Martin Wilck <mwilck@suse.com>
|
|
|
bd1529 |
Date: Tue, 24 Apr 2018 18:09:50 +0200
|
|
|
bd1529 |
Subject: [PATCH] test/udev-test.pl: Make some tests a little harder
|
|
|
bd1529 |
|
|
|
bd1529 |
Add some rules that make it a bit harder to pass, mainly the
|
|
|
bd1529 |
non-existence checks.
|
|
|
bd1529 |
|
|
|
bd1529 |
(cherry picked from commit 06d4d4e24e7d0b51120b165e540d278842e8b1a3)
|
|
|
bd1529 |
|
|
|
bd1529 |
Related: #1642728
|
|
|
bd1529 |
---
|
|
|
bd1529 |
test/udev-test.pl | 13 +++++++++----
|
|
|
bd1529 |
1 file changed, 9 insertions(+), 4 deletions(-)
|
|
|
bd1529 |
|
|
|
bd1529 |
diff --git a/test/udev-test.pl b/test/udev-test.pl
|
|
|
bd1529 |
index a9c2dd95f1..7465b5859e 100755
|
|
|
bd1529 |
--- a/test/udev-test.pl
|
|
|
bd1529 |
+++ b/test/udev-test.pl
|
|
|
bd1529 |
@@ -1358,7 +1358,7 @@ EOF
|
|
|
bd1529 |
exp_links => ["sda-part-1"],
|
|
|
bd1529 |
}],
|
|
|
bd1529 |
rules => <
|
|
|
bd1529 |
-SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-1"
|
|
|
bd1529 |
+SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-%n"
|
|
|
bd1529 |
EOF
|
|
|
bd1529 |
},
|
|
|
bd1529 |
{
|
|
|
bd1529 |
@@ -1486,6 +1486,7 @@ SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true"
|
|
|
bd1529 |
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="absolutely-\$env{ASSIGN}"
|
|
|
bd1529 |
SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
|
|
|
bd1529 |
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="yes", SYMLINK+="no"
|
|
|
bd1529 |
+SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="true", SYMLINK+="bad"
|
|
|
bd1529 |
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="absolutely-true", SYMLINK+="true"
|
|
|
bd1529 |
EOF
|
|
|
bd1529 |
},
|
|
|
bd1529 |
@@ -1497,6 +1498,11 @@ EOF
|
|
|
bd1529 |
exp_links => ["part"],
|
|
|
bd1529 |
not_exp_links => ["disk"],
|
|
|
bd1529 |
},
|
|
|
bd1529 |
+ {
|
|
|
bd1529 |
+ devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
|
|
|
bd1529 |
+ exp_links => ["disk"],
|
|
|
bd1529 |
+ not_exp_links => ["part"],
|
|
|
bd1529 |
+ },
|
|
|
bd1529 |
],
|
|
|
bd1529 |
rules => <
|
|
|
bd1529 |
SUBSYSTEM=="block", KERNEL=="*[0-9]", ENV{PARTITION}="true", ENV{MAINDEVICE}="false"
|
|
|
bd1529 |
@@ -1588,7 +1594,7 @@ EOF
|
|
|
bd1529 |
}],
|
|
|
bd1529 |
rules => <
|
|
|
bd1529 |
KERNEL=="sda", GROUP:="tty"
|
|
|
bd1529 |
-KERNEL=="sda", GROUP="not-ok", MODE="0640", SYMLINK+="ok"
|
|
|
bd1529 |
+KERNEL=="sda", GROUP="root", MODE="0640", SYMLINK+="ok"
|
|
|
bd1529 |
EOF
|
|
|
bd1529 |
},
|
|
|
bd1529 |
{
|
|
|
bd1529 |
@@ -1602,7 +1608,7 @@ EOF
|
|
|
bd1529 |
rules => <
|
|
|
bd1529 |
KERNEL=="sda", GROUP:="tty"
|
|
|
bd1529 |
SUBSYSTEM=="block", MODE:="640"
|
|
|
bd1529 |
-KERNEL=="sda", GROUP="not-ok", MODE="0666", SYMLINK+="ok"
|
|
|
bd1529 |
+KERNEL=="sda", GROUP="root", MODE="0666", SYMLINK+="ok"
|
|
|
bd1529 |
EOF
|
|
|
bd1529 |
},
|
|
|
bd1529 |
{
|
|
|
bd1529 |
@@ -1983,7 +1989,6 @@ EOF
|
|
|
bd1529 |
{
|
|
|
bd1529 |
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
|
|
|
bd1529 |
exp_perms => "1:1:0400",
|
|
|
bd1529 |
- exp_rem_error => "yes",
|
|
|
bd1529 |
}],
|
|
|
bd1529 |
rules => <
|
|
|
bd1529 |
KERNEL=="sda", MODE="666"
|