daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
b677e7
From 94ad224240140a7287f9e2be5905b9c506350193 Mon Sep 17 00:00:00 2001
b677e7
From: Michal Sekletar <msekleta@redhat.com>
b677e7
Date: Mon, 17 May 2021 15:54:10 +0200
b677e7
Subject: [PATCH] test/udev-test.pl: drop test cases that add mutliple devices
b677e7
b677e7
[msekleta: It is easier to delete test-cases that would make
b677e7
udev test fail. Once we reintroduce the fix for link_update()
b677e7
we will revert this commit.]
b677e7
b677e7
Related: #1942299
b677e7
---
b677e7
 test/udev-test.pl | 179 ----------------------------------------------
b677e7
 1 file changed, 179 deletions(-)
b677e7
b677e7
diff --git a/test/udev-test.pl b/test/udev-test.pl
b677e7
index 0612859cda..343d9c01ae 100755
b677e7
--- a/test/udev-test.pl
b677e7
+++ b/test/udev-test.pl
b677e7
@@ -2041,185 +2041,6 @@ TAGS=="foo", SYMLINK+="found"
b677e7
 TAGS=="aaa", SYMLINK+="bad"
b677e7
 EOF
b677e7
         },
b677e7
-        {
b677e7
-                desc            => "multiple devices",
b677e7
-                devices => [
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
b677e7
-                                exp_links       => ["part-1"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
b677e7
-                                exp_links       => ["part-5"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
b677e7
-                                exp_links       => ["part-6"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
b677e7
-                                exp_links       => ["part-7"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
b677e7
-                                exp_links       => ["part-8"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
b677e7
-                                exp_links       => ["part-9"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
b677e7
-                                exp_links       => ["part-10"],
b677e7
-                        },
b677e7
-                    ],
b677e7
-                rules          => <
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
b677e7
-EOF
b677e7
-        },
b677e7
-        {
b677e7
-                desc            => "multiple devices, same link name, positive prio",
b677e7
-                repeat          => 100,
b677e7
-                devices => [
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
b677e7
-                                exp_links       => ["part-1"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
b677e7
-                                exp_links       => ["part-5"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-6"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
b677e7
-                                exp_links       => ["part-7", "partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-8"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-9"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-10"],
b677e7
-                        },
b677e7
-                    ],
b677e7
-                rules          => <
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
b677e7
-KERNEL=="*7", OPTIONS+="link_priority=10"
b677e7
-EOF
b677e7
-        },
b677e7
-        {
b677e7
-                desc            => "multiple devices, same link name, negative prio",
b677e7
-                devices => [
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
b677e7
-                                exp_links       => ["part-1"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
b677e7
-                                exp_links       => ["part-5"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-6"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
b677e7
-                                exp_links       => ["part-7", "partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-8"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-9"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-10"],
b677e7
-                        },
b677e7
-                    ],
b677e7
-                rules          => <
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
b677e7
-KERNEL!="*7", OPTIONS+="link_priority=-10"
b677e7
-EOF
b677e7
-        },
b677e7
-        {
b677e7
-                desc            => "multiple devices, same link name, positive prio, sleep",
b677e7
-                devices => [
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
b677e7
-                                exp_links       => ["part-1"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5",
b677e7
-                                exp_links       => ["part-5"],
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-6"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7",
b677e7
-                                exp_links       => ["part-7", "partition"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-8"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-9"],
b677e7
-                        },
b677e7
-                        {
b677e7
-                                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10",
b677e7
-                                not_exp_links   => ["partition"],
b677e7
-                                exp_links       => ["part-10"],
b677e7
-                        },
b677e7
-                    ],
b677e7
-                sleep_us       => 10000,
b677e7
-                rules          => <
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="part-%n"
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sda?*", ENV{DEVTYPE}=="partition", SYMLINK+="partition"
b677e7
-KERNEL=="*7", OPTIONS+="link_priority=10"
b677e7
-EOF
b677e7
-        },
b677e7
-        {
b677e7
-                desc           => 'all_block_devs',
b677e7
-                generator      => expect_for_some("\\/sda6\$", ["blockdev"]),
b677e7
-                repeat         => 10,
b677e7
-                rules          => <
b677e7
-SUBSYSTEM=="block", SUBSYSTEMS=="scsi", KERNEL=="sd*", SYMLINK+="blockdev"
b677e7
-KERNEL=="sda6", OPTIONS+="link_priority=10"
b677e7
-EOF
b677e7
-        }
b677e7
 );
b677e7
 
b677e7
 sub create_rules {