Skip to content

Commit

Permalink
tests: return /dev/ublkb-unknown if __create_ublk_dev() fails
Browse files Browse the repository at this point in the history
This way can make the following test failed easily.

Signed-off-by: Ming Lei <[email protected]>
  • Loading branch information
ming1 committed Dec 16, 2024
1 parent bf8347f commit 33ded74
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/common/fio_common
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,11 @@ __create_ublk_dev()
[ ${id} == "-" ] && echo "no free ublk device nodes" && exit -1
eval $UBLK add ${T_TYPE_PARAMS} -n $id > /dev/null 2>&1
udevadm settle
echo "/dev/ublkb${id}"
if [ -b /dev/ublkb0 ]; then
echo "/dev/ublkb${id}"
else
echo "/dev/ublkb-unknown"
fi
}

__recover_ublk_dev()
Expand Down

0 comments on commit 33ded74

Please sign in to comment.