diff options
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh | 4 | ||||
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh index 9bc3603d4..7e484ca47 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_checksum.ksh @@ -53,9 +53,9 @@ log_note "file $init_data has object number $obj" output=$(zdb -ddddddbbbbbb $TESTPOOL/$TESTFS $obj 2> /dev/null \ |grep -m 1 "L0 DVA" |head -n1) -dva=$(grep -oP 'DVA\[0\]=<\K.*?(?=>)' <<< "$output") +dva=$(sed -Ene 's/^.+DVA\[0\]=<(.+)>.*$/\1/p' <<< "$output") log_note "block 0 of $init_data has a DVA of $dva" -cksum_expected=$(grep -oP '(?<=cksum=)[ A-Za-z0-9:]*' <<< "$output") +cksum_expected=$(sed -Ene 's/^.+ cksum=([a-z0-9:]+)$/\1/p' <<< "$output") log_note "expecting cksum $cksum_expected" output=$(zdb -R $TESTPOOL $dva:c 2> /dev/null) result=$(grep $cksum_expected <<< "$output") diff --git a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh index 0e468d7c9..2777cfc20 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zdb/zdb_decompress.ksh @@ -74,11 +74,11 @@ log_note "file $init_data has object number $obj" output=$(zdb -ddddddbbbbbb $TESTPOOL/$TESTFS $obj 2> /dev/null \ |grep -m 1 "L0 DVA" |head -n1) -dva=$(grep -oP 'DVA\[0\]=<\K.*?(?=>)' <<< "$output") +dva=$(sed -Ene 's/^.+DVA\[0\]=<(.+)>.*$/\1/p' <<< "$output") log_note "block 0 of $init_data has a DVA of $dva" # use the length reported by zdb -ddddddbbbbbb -size_str=$(grep -oP 'size=\K.*?(?= )' <<< "$output") +size_str=$(sed -Ene 's/^.+ size=([^ ]+) .*$/\1/p' <<< "$output") log_note "block size $size_str" vdev=$(echo "$dva" |awk '{split($0,array,":")} END{print array[1]}') |