Skip to content

Commit

Permalink
nbd/001: wait for the device node to show up before running parted
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and kawasaki committed Mar 1, 2024
1 parent c6f99ad commit 0520ff2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/nbd/001
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 0520ff2

Please sign in to comment.