From: Christoph Hellwig Date: Thu, 29 Feb 2024 14:34:27 +0000 (-0800) Subject: nbd/001: wait for the device node to show up before running parted X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0520ff2417188c2e24e0ac9e4e4b87d4acb06fd9;p=users%2Fsagi%2Fblktests.git nbd/001: wait for the device node to show up before running parted The parted call can happen before the device is settled and thus fail. Currently this happens very rarely for me (about 1 in 500 runs), but a pending change to freeze the queues for updating the limits will make it much more likely to hit. Signed-off-by: Christoph Hellwig Signed-off-by: Shin'ichiro Kawasaki --- diff --git a/tests/nbd/001 b/tests/nbd/001 index 9427f8e..5fd0d43 100755 --- a/tests/nbd/001 +++ b/tests/nbd/001 @@ -18,6 +18,8 @@ test() { echo "Running ${TEST_NAME}" _start_nbd_server nbd-client -L -N export localhost /dev/nbd0 >> "$FULL" 2>&1 + udevadm settle + parted -s /dev/nbd0 print 2>> "$FULL" | grep 'Disk /dev/nbd0' lsblk --raw --noheadings /dev/nbd0