diff options
author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2022-03-11 22:54:08 +0000 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2022-04-02 00:57:55 +0000 |
commit | 75746e9a40e15e7994fb99799f0b02912155f179 (patch) | |
tree | 22847835880445548c6066b9dbdbff4e6208fa48 /tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh | |
parent | 72f3516094cd772053c4367cb8549fd697a6c107 (diff) | |
download | src-75746e9a40e15e7994fb99799f0b02912155f179.tar.gz src-75746e9a40e15e7994fb99799f0b02912155f179.zip |
tests: review every awk(1) invocation
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259
Diffstat (limited to 'tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh')
-rwxr-xr-x | tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh b/tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh index 615b41f312b6..c9cefcd43dae 100755 --- a/tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh +++ b/tests/zfs-tests/tests/functional/checksum/filetest_001_pos.ksh @@ -85,7 +85,7 @@ log_must zpool import $TESTPOOL log_must zpool scrub $TESTPOOL log_must wait_scrubbed $TESTPOOL -cksum=$(zpool status -P -v $TESTPOOL | grep "$firstvdev" | awk '{print $5}') +cksum=$(zpool status -P -v $TESTPOOL | awk -v v="$firstvdev" '$0 ~ v {print $5}') log_assert "Normal file write test saw $cksum checksum errors" log_must [ $cksum -eq 0 ] @@ -105,8 +105,7 @@ while [[ $j -lt ${#CHECKSUM_TYPES[*]} ]]; do log_must zpool scrub $TESTPOOL log_must wait_scrubbed $TESTPOOL - cksum=$(zpool status -P -v $TESTPOOL | grep "$firstvdev" | \ - awk '{print $5}') + cksum=$(zpool status -P -v $TESTPOOL | awk -v v="$firstvdev" '$0 ~ v {print $5}') log_assert "Checksum '$type' caught $cksum checksum errors" log_must [ $cksum -ne 0 ] |