]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: wait for the device node symlink being created
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 3 Apr 2025 03:04:11 +0000 (12:04 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 3 Apr 2025 07:41:35 +0000 (09:41 +0200)
Follow-up for 6e003d18bbf5e9f55c08b25d80b138b3a98d5f26.

Hopefully fixes the following failure:
```
[   50.650939] TEST-87-AUX-UTILS-VM.sh[3637]: + mkdir -p /tmp/validatefs-test.mount/somewhere/else
[   50.652499] TEST-87-AUX-UTILS-VM.sh[3637]: + mount /dev/disk/by-label/qnurx /tmp/validatefs-test.mount/somewhere/else
[   50.660885] /dev/disk/by-label/qnurx: Can't lookup blockdev
[   50.654964] TEST-87-AUX-UTILS-VM.sh[3731]: mount: /tmp/validatefs-test.mount/somewhere/else: special device /dev/disk/by-label/qnurx does not exist.
```

test/units/TEST-87-AUX-UTILS-VM.validatefs.sh

index b4f3c582397db8a75d3468ef84d1a18cb489e2c0..8fa361693018ffde2b4642525a4cdb8a41db325b 100755 (executable)
@@ -98,6 +98,7 @@ getfattr --dump /tmp/validatefs-test.mount/efi
 
 # the generic one we must mount by hand
 mkdir -p /tmp/validatefs-test.mount/somewhere/else
+udevadm wait --timeout=30 /dev/disk/by-label/qnurx
 mount /dev/disk/by-label/qnurx /tmp/validatefs-test.mount/somewhere/else
 getfattr --dump /tmp/validatefs-test.mount/somewhere/else