Skip to content

Commit b7bb579

Browse files
naotakdave
authored andcommitted
btrfs-progs: tests: add wait_for_nullbdevs
It is a nullb version of wait_for_loopdevs. It waits for all the nullb devices are ready to use. Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Naohiro Aota <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 8638aab commit b7bb579

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/common

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,14 @@ cleanup_nullbdevs()
984984
name=$(basename "$dev")
985985
run_check $SUDO_HELPER "$nullb" rm "$name"
986986
done
987+
unset nullb_devs
988+
}
989+
990+
wait_for_nullbdevs()
991+
{
992+
for dev in ${nullb_devs[@]}; do
993+
run_mayfail $SUDO_HELPER "$TOP/btrfs" device ready "$dev"
994+
done
987995
}
988996

989997
init_env()

0 commit comments

Comments
 (0)