teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

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

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