8 Star 0 Fork 50

src-anolis-os/systemd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0566-test-udev-test.pl-drop-test-cases-that-add-mutliple-.patch 10.83 KB
一键复制 编辑 原始数据 按行查看 历史
renbo02 提交于 2021-12-27 17:02 . update to systemd-239-51.el8
From 94ad224240140a7287f9e2be5905b9c506350193 Mon Sep 17 00:00:00 2001
From: Michal Sekletar <msekleta@redhat.com>
Date: Mon, 17 May 2021 15:54:10 +0200
Subject: [PATCH] test/udev-test.pl: drop test cases that add mutliple devices
[msekleta: It is easier to delete test-cases that would make
udev test fail. Once we reintroduce the fix for link_update()
we will revert this commit.]
Related: #1942299
---
test/udev-test.pl | 179 ----------------------------------------------
1 file changed, 179 deletions(-)
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 0612859cda..343d9c01ae 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -2041,185 +2041,6 @@ TAGS=="foo", SYMLINK+="found"
TAGS=="aaa", SYMLINK+="bad"
EOF
},
- {
- desc => "multiple devices",
- devices => [
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
- exp_links => ["part-1"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
- exp_links => ["part-5"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
- exp_links => ["part-6"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
- exp_links => ["part-7"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
- exp_links => ["part-8"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
- exp_links => ["part-9"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
- exp_links => ["part-10"],
- },
- ],
- rules => <<EOF
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
-EOF
- },
- {
- desc => "multiple devices, same link name, positive prio",
- repeat => 100,
- devices => [
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
- exp_links => ["part-1"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
- exp_links => ["part-5"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
- not_exp_links => ["partition"],
- exp_links => ["part-6"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
- exp_links => ["part-7", "partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
- not_exp_links => ["partition"],
- exp_links => ["part-8"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
- not_exp_links => ["partition"],
- exp_links => ["part-9"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
- not_exp_links => ["partition"],
- exp_links => ["part-10"],
- },
- ],
- rules => <<EOF
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
-KERNEL=="*7", OPTIONS+="link_priority=10"
-EOF
- },
- {
- desc => "multiple devices, same link name, negative prio",
- devices => [
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
- exp_links => ["part-1"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
- exp_links => ["part-5"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
- not_exp_links => ["partition"],
- exp_links => ["part-6"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
- exp_links => ["part-7", "partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
- not_exp_links => ["partition"],
- exp_links => ["part-8"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
- not_exp_links => ["partition"],
- exp_links => ["part-9"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
- not_exp_links => ["partition"],
- exp_links => ["part-10"],
- },
- ],
- rules => <<EOF
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
-KERNEL!="*7", OPTIONS+="link_priority=-10"
-EOF
- },
- {
- desc => "multiple devices, same link name, positive prio, sleep",
- devices => [
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
- exp_links => ["part-1"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
- exp_links => ["part-5"],
- not_exp_links => ["partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
- not_exp_links => ["partition"],
- exp_links => ["part-6"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
- exp_links => ["part-7", "partition"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
- not_exp_links => ["partition"],
- exp_links => ["part-8"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
- not_exp_links => ["partition"],
- exp_links => ["part-9"],
- },
- {
- devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
- not_exp_links => ["partition"],
- exp_links => ["part-10"],
- },
- ],
- sleep_us => 10000,
- rules => <<EOF
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
-KERNEL=="*7", OPTIONS+="link_priority=10"
-EOF
- },
- {
- desc => 'all_block_devs',
- generator => expect_for_some("\\/sda6\$", ["blockdev"]),
- repeat => 10,
- rules => <<EOF
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sd*", SYMLINK+="blockdev"
-KERNEL=="sda6", OPTIONS+="link_priority=10"
-EOF
- }
);
sub create_rules {
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/systemd.git
git@gitee.com:src-anolis-os/systemd.git
src-anolis-os
systemd
systemd
a8

搜索帮助