chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rules: Fix by-path of mmc RPMB partitions and don't blkid them
[elogind.git]
/
test
/
udev-test.pl
diff --git
a/test/udev-test.pl
b/test/udev-test.pl
index 14f11df8af94d53e1860ffb135cc2f52ac160a19..d9b7967004414210bc5e11cefb20632b201c3f33 100755
(executable)
--- a/
test/udev-test.pl
+++ b/
test/udev-test.pl
@@
-27,6
+27,7
@@
my $udev_dev = "test/dev";
my $udev_run = "test/run";
my $udev_rules_dir = "$udev_run/udev/rules.d";
my $udev_rules = "$udev_rules_dir/udev-test.rules";
my $udev_run = "test/run";
my $udev_rules_dir = "$udev_run/udev/rules.d";
my $udev_rules = "$udev_rules_dir/udev-test.rules";
+my $EXIT_TEST_SKIP = 77;
my @tests = (
{
my @tests = (
{
@@
-1232,8
+1233,8
@@
EOF
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_name => "there",
rules => <<EOF
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_name => "there",
rules => <<EOF
-TEST=="/etc/
hosts
", SYMLINK+="there"
-TEST!="/etc/
hosts
", SYMLINK+="notthere"
+TEST=="/etc/
machine-id
", SYMLINK+="there"
+TEST!="/etc/
machine-id
", SYMLINK+="notthere"
EOF
},
{
EOF
},
{
@@
-1485,6
+1486,13
@@
if (!($<==0)) {
exit;
}
exit;
}
+# skip the test when running in a container
+system("systemd-detect-virt", "-c", "-q");
+if ($? >> 8 == 0) {
+ print "Running in a container, skipping the test.\n";
+ exit($EXIT_TEST_SKIP);
+}
+
udev_setup();
my $test_num = 1;
udev_setup();
my $test_num = 1;