Blame SOURCES/0709-tests-run-udevadm-settle-after-fdisk.patch

17b0f1
From b1759ccd2f83bf75871333524cffb4c5b312ea93 Mon Sep 17 00:00:00 2001
17b0f1
From: Frantisek Sumsal <fsumsal@redhat.com>
17b0f1
Date: Fri, 15 Feb 2019 18:13:22 +0100
17b0f1
Subject: [PATCH] tests: run `udevadm settle` after `fdisk`
17b0f1
17b0f1
This makes the script wait for the newly created partition to
17b0f1
show up before trying to put a filesystem on it, which should
17b0f1
prevent the tests from failing with the following error:
17b0f1
```
17b0f1
Command (m for help): Building a new DOS disklabel with disk identifier 0x614565d4.
17b0f1
17b0f1
Command (m for help): Partition type:
17b0f1
   p   primary (0 primary, 0 extended, 4 free)
17b0f1
   e   extended
17b0f1
Select (default p): Partition number (1-4, default 1): First sector (2048-819199, default 2048): Using default value 2048
17b0f1
Last sector, +sectors or +size{K,M,G} (2048-819199, default 819199): Partition 1 of type Linux and of size 290 MiB is set
17b0f1
17b0f1
Command (m for help): Partition type:
17b0f1
   p   primary (1 primary, 0 extended, 3 free)
17b0f1
   e   extended
17b0f1
Select (default p): Partition number (2-4, default 2): First sector (595968-819199, default 595968): Using default value 595968
17b0f1
Last sector, +sectors or +size{K,M,G} (595968-819199, default 819199): Partition 2 of type Linux and of size 50 MiB is set
17b0f1
17b0f1
Command (m for help): The partition table has been altered!
17b0f1
17b0f1
Calling ioctl() to re-read partition table.
17b0f1
Syncing disks.
17b0f1
/dev/loop1p1: No such file or directory
17b0f1
Usage: mkfs.xfs
17b0f1
<snip>
17b0f1
mount: /dev/loop1p1 is write-protected, mounting read-only
17b0f1
mount: unknown filesystem type '(null)'
17b0f1
```
17b0f1
17b0f1
Based on 053edc5b04d8130a344eb1746f4b14a9823ac3ad
17b0f1
---
17b0f1
 test/test-functions | 2 +-
17b0f1
 1 file changed, 1 insertion(+), 1 deletion(-)
17b0f1
17b0f1
diff --git a/test/test-functions b/test/test-functions
17b0f1
index def16d3277..78e725d5b9 100644
17b0f1
--- a/test/test-functions
17b0f1
+++ b/test/test-functions
17b0f1
@@ -160,7 +160,7 @@ p
17b0f1
 w
17b0f1
 q
17b0f1
 EOF
17b0f1
-    partprobe "$LOOPDEV"
17b0f1
+    udevadm settle
17b0f1
     mkfs.xfs -L systemd "${LOOPDEV}p1"
17b0f1
 }
17b0f1