svn commit: r359904 - stable/12/sbin/nvmecontrol/tests
Li-Wen Hsu
lwhsu at FreeBSD.org
Mon Apr 13 21:23:40 UTC 2020
Author: lwhsu
Date: Mon Apr 13 21:23:39 2020
New Revision: 359904
URL: https://svnweb.freebsd.org/changeset/base/359904
Log:
MFC r359903:
Ensure `kyua list` working when there is no /dev/nvme*
Sponsored by: The FreeBSD Foundation
Modified:
stable/12/sbin/nvmecontrol/tests/basic.sh
Directory Properties:
stable/12/ (props changed)
Modified: stable/12/sbin/nvmecontrol/tests/basic.sh
==============================================================================
--- stable/12/sbin/nvmecontrol/tests/basic.sh Mon Apr 13 21:08:54 2020 (r359903)
+++ stable/12/sbin/nvmecontrol/tests/basic.sh Mon Apr 13 21:23:39 2020 (r359904)
@@ -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"
More information about the svn-src-all
mailing list