1 Star 0 Fork 49

wangkaiyuan/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0536-test-udev-test.pl-merge-import-parent-tests-into-one.patch 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 06e937177bf23d8ea8e5060a856cce02d5436eb4 Mon Sep 17 00:00:00 2001
From: Martin Wilck <mwilck@suse.com>
Date: Tue, 24 Apr 2018 18:30:09 +0200
Subject: [PATCH] test/udev-test.pl: merge import parent tests into one
As we can test multiple devices and multiple links per device
in one test now, these two tests can be merged into one.
(cherry picked from commit a96cd21d31cb7af211862768e133b50b085634e7)
Related: #1642728
---
test/udev-test.pl | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 880a73b10b..0344d2e89c 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1781,28 +1781,21 @@ TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
EOF
},
{
- desc => "IMPORT parent test sequence 1/2 (keep)",
+ desc => "IMPORT parent test",
devices => [
{
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
exp_links => ["parent"],
- }],
- option => "keep",
- rules => <<EOF
-KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
-KERNEL=="sda", SYMLINK+="parent"
-EOF
- },
- {
- desc => "IMPORT parent test sequence 2/2 (keep)",
- devices => [
+ },
{
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
exp_links => ["parentenv-parent_right"],
}],
- option => "clean",
+ sleep_us => 500000, # Serialized! We need to sleep here after adding sda
rules => <<EOF
KERNEL=="sda1", IMPORT{parent}="PARENT*", SYMLINK+="parentenv-\$env{PARENT_KEY}\$env{WRONG_PARENT_KEY}"
+KERNEL=="sda", IMPORT{program}="/bin/echo -e \'PARENT_KEY=parent_right\\nWRONG_PARENT_KEY=parent_wrong'"
+KERNEL=="sda", SYMLINK+="parent"
EOF
},
{
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangkaiyuan01/systemd.git
git@gitee.com:wangkaiyuan01/systemd.git
wangkaiyuan01
systemd
systemd
a8

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385