From: Michal Sekletar Date: Thu, 24 Mar 2022 18:24:16 +0000 (+0100) Subject: tests: reflect that we can now handle devices with very long sysfs paths X-Git-Tag: v251-rc2~129^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F22759%2Fhead;p=thirdparty%2Fsystemd.git tests: reflect that we can now handle devices with very long sysfs paths --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index 5f50131dd5d..efe254419aa 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -515,6 +515,7 @@ testcase_long_sysfs_path() { echo "UUID=deadbeef-dead-dead-beef-222222222222 $mpoint ext4 defaults 0 0" >>/etc/fstab systemctl daemon-reload mount "$mpoint" + systemctl status "$mpoint" test -e "$mpoint/test" umount "$mpoint" @@ -525,9 +526,9 @@ testcase_long_sysfs_path() { udevadm settle logfile="$(mktemp)" - journalctl -b -q --no-pager -o short-monotonic -p info --grep "Device path.*vda.?' too long to fit into unit name" + [[ "$(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 ]] # Make sure we don't unnecessarily spam the log - journalctl -b -q --no-pager -o short-monotonic -p info --grep "/sys/devices/.+/vda[0-9]?" _PID=1 + UNIT=systemd-udevd.service | tee "$logfile" + { journalctl -b -q --no-pager -o short-monotonic -p info --grep "/sys/devices/.+/vda[0-9]?" _PID=1 + UNIT=systemd-udevd.service || :;} | tee "$logfile" [[ "$(wc -l <"$logfile")" -lt 10 ]] : >/etc/fstab