summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-01-15 12:26:26 -0500
committerBrian Behlendorf <[email protected]>2020-01-15 09:26:26 -0800
commit83c30248efb1ce1d6f0c5de222159322ac2b9203 (patch)
tree87c209f5767f320375bff3843a021e73945fa491 /tests
parent900010daf1d45f970917dc0169c754e59a59ad07 (diff)
ZTS: Fix is_physical_device on FreeBSD
This should have been using egrep. Reviewed-by: John Kennedy <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Kjeld Schouten <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #9840
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/include/blkdev.shlib15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/zfs-tests/include/blkdev.shlib b/tests/zfs-tests/include/blkdev.shlib
index 66c18b86b..d87a52524 100644
--- a/tests/zfs-tests/include/blkdev.shlib
+++ b/tests/zfs-tests/include/blkdev.shlib
@@ -98,14 +98,13 @@ function is_physical_device #device
return $?
elif is_freebsd; then
is_disk_device "$DEV_DSKDIR/$device" && \
- echo $device | grep -q \
- -e '^a?da[0-9]+$' \
- -e '^md[0-9]+$' \
- -e '^mfid[0-9]+$' \
- -e '^nda[0-9]+$' \
- -e '^nvd[0-9]+$' \
- -e '^vtbd[0-9]+$' \
- > /dev/null 2>&1
+ echo $device | egrep -q \
+ -e '^a?da[0-9]+$' \
+ -e '^md[0-9]+$' \
+ -e '^mfid[0-9]+$' \
+ -e '^nda[0-9]+$' \
+ -e '^nvd[0-9]+$' \
+ -e '^vtbd[0-9]+$'
return $?
else
echo $device | egrep "^c[0-F]+([td][0-F]+)+$" > /dev/null 2>&1