From: Frantisek Sumsal Date: Thu, 16 Dec 2021 10:59:09 +0000 (+0100) Subject: test: settle before checking logs X-Git-Tag: v250-rc3~35^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3a1af0633a4ebad8c4a46cc7c5819c829b357b;p=thirdparty%2Fsystemd.git 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. ``` --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index d41e807ef56..f75382d90a6 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