Ensure kyua list working when there is no /dev/nvme*

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Li-Wen Hsu 2020-04-13 21:08:54 +00:00
parent ab485b018a
commit 862ac3b74a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=359903

View File

@ -33,7 +33,7 @@
DANGEROUS=false # Set to true to run "dangerous" tests
# Select a nvme device to use for testing. If none exist, use nvme0.
TEST_DEV=$(cd /dev/;ls nvme[0-9]* | grep 'nvme[0-9][0-9]*$' | head -1) 2>/dev/null
TEST_DEV=$(cd /dev/; ls -1 nvme[0-9]* 2> /dev/null | grep -E 'nvme[0-9][0-9]*$' | head -n 1)
TEST_DEV=${TEST_DEV:-nvme0}
TEST_DEV_PATH=/dev/${TEST_DEV}
INV_OPT="-z"