]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: run `udevadm settle` after `sfdisk` (#8610)
authorEvgeny Vereshchagin <evvers@ya.ru>
Thu, 29 Mar 2018 04:20:57 +0000 (07:20 +0300)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 29 Mar 2018 04:20:57 +0000 (13:20 +0900)
This makes the script wait for the newly created partition to
show up before trying to put a filesystem on it, which should
prevent the tests from failing with the following error:
```
New situation:
Disklabel type: dos
Disk identifier: 0x3541a0ec

Device       Boot  Start    End Sectors  Size Id Type
/dev/loop6p1        2048 800767  798720  390M 83 Linux
/dev/loop6p2      800768 819199   18432    9M 83 Linux

The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
The file /dev/loop6p1 does not exist and no size was specified.
make: *** [setup] Error 1
F: Failed to mkfs -t ext4
Makefile:4: recipe for target 'setup' failed
```

test/test-functions

index 17e83ccf3ff8bcbc2b83e678d1de3f0f3b9469db..963a32b5b54f1b4e534a172ef1d594e09e3baa66 100644 (file)
@@ -365,6 +365,8 @@ create_empty_image() {
 ,
 EOF
 
+    udevadm settle
+
     local _label="-L systemd"
     # mkfs.reiserfs doesn't know -L. so, use --label instead
     [[ "$FSTYPE" == "reiserfs" ]] && _label="--label systemd"