Skip to content

Commit

Permalink
tests: reflect that we can now handle devices with very long sysfs paths
Browse files Browse the repository at this point in the history
  • Loading branch information
msekletar committed Apr 13, 2022
1 parent 2ef0101 commit b26f4f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/units/testsuite-64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
Expand Down

0 comments on commit b26f4f0

Please sign in to comment.