|
|
8d419f |
From 87e45d9c58c74ae7ba46f99a3f0e2db39cf345ff Mon Sep 17 00:00:00 2001
|
|
|
8d419f |
From: Michal Sekletar <msekleta@redhat.com>
|
|
|
8d419f |
Date: Thu, 24 Mar 2022 19:24:16 +0100
|
|
|
8d419f |
Subject: [PATCH] tests: reflect that we can now handle devices with very long
|
|
|
8d419f |
sysfs paths
|
|
|
8d419f |
|
|
|
8d419f |
(cherry picked from commit b26f4f0028e27b6ad46ef9af56aac7571caa3a25)
|
|
|
8d419f |
|
|
|
8d419f |
Related: #2083493
|
|
|
8d419f |
---
|
|
|
8d419f |
test/units/testsuite-64.sh | 5 +++--
|
|
|
8d419f |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
8d419f |
|
|
|
8d419f |
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh
|
|
|
8d419f |
index dc8b263b10..218b2ee8d1 100755
|
|
|
8d419f |
--- a/test/units/testsuite-64.sh
|
|
|
8d419f |
+++ b/test/units/testsuite-64.sh
|
|
|
8d419f |
@@ -674,6 +674,7 @@ testcase_long_sysfs_path() {
|
|
|
8d419f |
echo "UUID=deadbeef-dead-dead-beef-222222222222 $mpoint ext4 defaults 0 0" >>/etc/fstab
|
|
|
8d419f |
systemctl daemon-reload
|
|
|
8d419f |
mount "$mpoint"
|
|
|
8d419f |
+ systemctl status "$mpoint"
|
|
|
8d419f |
test -e "$mpoint/test"
|
|
|
8d419f |
umount "$mpoint"
|
|
|
8d419f |
|
|
|
8d419f |
@@ -684,9 +685,9 @@ testcase_long_sysfs_path() {
|
|
|
8d419f |
udevadm settle
|
|
|
8d419f |
|
|
|
8d419f |
logfile="$(mktemp)"
|
|
|
8d419f |
- journalctl -b -q --no-pager -o short-monotonic -p info --grep "Device path.*vda.?' too long to fit into unit name"
|
|
|
8d419f |
+ [[ "$(journalctl -b -q --no-pager -o short-monotonic -p info --grep "Device path.*vda.?' too long to fit into unit name" | wc -l)" -eq 0 ]]
|
|
|
8d419f |
# Make sure we don't unnecessarily spam the log
|
|
|
8d419f |
- journalctl -b -q --no-pager -o short-monotonic -p info --grep "/sys/devices/.+/vda[0-9]?" _PID=1 + UNIT=systemd-udevd.service | tee "$logfile"
|
|
|
8d419f |
+ { journalctl -b -q --no-pager -o short-monotonic -p info --grep "/sys/devices/.+/vda[0-9]?" _PID=1 + UNIT=systemd-udevd.service || :;} | tee "$logfile"
|
|
|
8d419f |
[[ "$(wc -l <"$logfile")" -lt 10 ]]
|
|
|
8d419f |
|
|
|
8d419f |
: >/etc/fstab
|