diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-12-16 11:59:09 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2021-12-16 11:59:09 +0100 |
commit | 7b3a1af0633a4ebad8c4a46cc7c5819c829b357b (patch) | |
tree | f34b32248d8976ba1b9eab4bf9c98534802ef749 /test/units | |
parent | 67cb0d4725af7593440c50125a63d01963d54d13 (diff) | |
download | systemd-7b3a1af0633a4ebad8c4a46cc7c5819c829b357b.tar.gz |
test: settle before checking logs
Otherwise we might miss the "Device path too long" message:
```
[ 21.083274] testsuite-64.sh[374]: swapoff /dev/vda1
[ 21.089841] testsuite-64.sh[376]: ++ mktemp
[ 21.095115] testsuite-64.sh[271]: + logfile=/tmp/tmp.a1MULA35wL
[ 21.095115] testsuite-64.sh[271]: + journalctl -b -q --no-pager -o short-monotonic -p info --grep 'Device path.*vda.?'\'' too long to fit into unit name'
...
[ 21.277360] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE
[ 21.277508] systemd[1]: testsuite-64.service: Failed with result 'exit-code'.
...
[ 21.323500] systemd[1]: Device path '/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/0000:0b:00.0/0000:0c:00.0/0000:0d:00.0/0000:0e:00.0/0000:0f:00.0/0000:10:00.0/0000:11:00.0/0000:12:00.0/0000:13:00.0/0000:14:00.0/0000:15:00.0/0000:16:00.0/0000:17:00.0/0000:18:00.0/0000:19:00.0/0000:1a:00.0/virtio0/block/vda/vda1' too long to fit into unit name, ignoring device.
```
Diffstat (limited to 'test/units')
-rwxr-xr-x | test/units/testsuite-64.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index d41e807ef5..f75382d90a 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -673,6 +673,8 @@ testcase_long_sysfs_path() { swapon -v -L swap_vol swapoff -v -L swap_vol + 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" # Make sure we don't unnecessarily spam the log |