From 053edc5b04d8130a344eb1746f4b14a9823ac3ad Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Thu, 29 Mar 2018 07:20:57 +0300 Subject: [PATCH] tests: run `udevadm settle` after `sfdisk` (#8610) 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/test-functions b/test/test-functions index 17e83ccf3ff..963a32b5b54 100644 --- a/test/test-functions +++ b/test/test-functions @@ -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"