]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
nbd/001: wait for the device node to show up before running parted
authorChristoph Hellwig <hch@lst.de>
Thu, 29 Feb 2024 14:34:27 +0000 (06:34 -0800)
committerShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 1 Mar 2024 06:37:11 +0000 (15:37 +0900)
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 <hch@lst.de>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
tests/nbd/001

index 9427f8ed60cfdaa7376b17609f958522fba67be7..5fd0d432ad96c85279a41f7abe12f4756b82b119 100755 (executable)
@@ -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