dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
6136c1
From 03b766cc937ffa4dcb7cfb25b2ac20d8a00cb6db Mon Sep 17 00:00:00 2001
6136c1
From: gaoyi <ymuemc@163.com>
6136c1
Date: Sun, 12 Jul 2020 03:27:45 -0400
6136c1
Subject: [PATCH] test: add test case for multi matches when use "||"
6136c1
6136c1
Signed-off-by: gaoyi <ymuemc@163.com>
6136c1
(cherry picked from commit 0d3a8bc7ebd76591e14f7098b4266fd2065ac4db)
6136c1
6136c1
Related: #1642728
6136c1
---
6136c1
 test/udev-test.pl | 11 +++++++++++
6136c1
 1 file changed, 11 insertions(+)
6136c1
6136c1
diff --git a/test/udev-test.pl b/test/udev-test.pl
6136c1
index 50d978391b..4bf97d82bb 100755
6136c1
--- a/test/udev-test.pl
6136c1
+++ b/test/udev-test.pl
6136c1
@@ -1322,6 +1322,17 @@ EOF
6136c1
 KERNEL=="sda", TAG=""
6136c1
 TAGS=="foo|", SYMLINK+="found"
6136c1
 TAGS=="aaa|bbb", SYMLINK+="bad"
6136c1
+EOF
6136c1
+        },
6136c1
+        {
6136c1
+                desc            => "test multi matches 11",
6136c1
+                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
6136c1
+                exp_name        => "found",
6136c1
+                not_exp_name    => "bad",
6136c1
+                rules           => <
6136c1
+KERNEL=="sda", TAG="c"
6136c1
+TAGS=="foo||bar||c", SYMLINK+="found"
6136c1
+TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
6136c1
 EOF
6136c1
         },
6136c1
         {