1 Star 0 Fork 50

zhongling.h/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0533-test-udev-test.pl-Make-some-tests-a-little-harder.patch 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 134a415c2d690e57d0f1add23e900e60bcef4627 Mon Sep 17 00:00:00 2001
From: Martin Wilck <[email protected]>
Date: Tue, 24 Apr 2018 18:09:50 +0200
Subject: [PATCH] test/udev-test.pl: Make some tests a little harder
Add some rules that make it a bit harder to pass, mainly the
non-existence checks.
(cherry picked from commit 06d4d4e24e7d0b51120b165e540d278842e8b1a3)
Related: #1642728
---
test/udev-test.pl | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/test/udev-test.pl b/test/udev-test.pl
index a9c2dd95f1..7465b5859e 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1358,7 +1358,7 @@ EOF
exp_links => ["sda-part-1"],
}],
rules => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-1"
+SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="%P-part-%n"
EOF
},
{
@@ -1486,6 +1486,7 @@ SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="true"
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}="absolutely-\$env{ASSIGN}"
SUBSYSTEMS=="scsi", KERNEL=="sda1", SYMLINK+="before"
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="yes", SYMLINK+="no"
+SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="true", SYMLINK+="bad"
SUBSYSTEMS=="scsi", KERNEL=="sda1", ENV{ASSIGN}=="absolutely-true", SYMLINK+="true"
EOF
},
@@ -1497,6 +1498,11 @@ EOF
exp_links => ["part"],
not_exp_links => ["disk"],
},
+ {
+ devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+ exp_links => ["disk"],
+ not_exp_links => ["part"],
+ },
],
rules => <<EOF
SUBSYSTEM=="block", KERNEL=="*[0-9]", ENV{PARTITION}="true", ENV{MAINDEVICE}="false"
@@ -1588,7 +1594,7 @@ EOF
}],
rules => <<EOF
KERNEL=="sda", GROUP:="tty"
-KERNEL=="sda", GROUP="not-ok", MODE="0640", SYMLINK+="ok"
+KERNEL=="sda", GROUP="root", MODE="0640", SYMLINK+="ok"
EOF
},
{
@@ -1602,7 +1608,7 @@ EOF
rules => <<EOF
KERNEL=="sda", GROUP:="tty"
SUBSYSTEM=="block", MODE:="640"
-KERNEL=="sda", GROUP="not-ok", MODE="0666", SYMLINK+="ok"
+KERNEL=="sda", GROUP="root", MODE="0666", SYMLINK+="ok"
EOF
},
{
@@ -1983,7 +1989,6 @@ EOF
{
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_perms => "1:1:0400",
- exp_rem_error => "yes",
}],
rules => <<EOF
KERNEL=="sda", MODE="666"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhonglingh/systemd.git
[email protected]:zhonglingh/systemd.git
zhonglingh
systemd
systemd
a8

搜索帮助