From 83c30248efb1ce1d6f0c5de222159322ac2b9203 Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 15 Jan 2020 12:26:26 -0500 Subject: [PATCH] ZTS: Fix is_physical_device on FreeBSD This should have been using egrep. Reviewed-by: John Kennedy Reviewed-by: George Melikov Reviewed-by: Kjeld Schouten Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #9840 --- tests/zfs-tests/include/blkdev.shlib | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/zfs-tests/include/blkdev.shlib b/tests/zfs-tests/include/blkdev.shlib index 66c18b86b5..d87a52524e 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