From: Andreas Dilger Date: Thu, 20 Mar 2025 00:22:45 +0000 (-0600) Subject: LU-18837 tests: fix numeric comparison in sanity/101a X-Git-Tag: 2.16.54~9 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f8a22b656dd6bc8cb9cd0bca464ffe6d3cc74fc0;p=fs%2Flustre-release.git LU-18837 tests: fix numeric comparison in sanity/101a Use (( ... )) instead of [[ ... ]] for numeric comparisons. Test-Parameters: trivial Fixes: ff78e1aa33 ("LU-4322 tests: re-enable 101a in dne config") Signed-off-by: Andreas Dilger Change-Id: I5e210e0ca6495df4497ef7071086ef5928c267eb Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58469 Reviewed-by: Arshad Hussain Reviewed-by: Jian Yu Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 25a04292..1ad09ec 100755 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -12331,7 +12331,7 @@ function get_named_value() } test_101a() { - [ $PARALLEL == "yes" ] && skip "skip parallel run" + [[ $PARALLEL != "yes" ]] || skip "skip parallel run" local s local discard @@ -12362,8 +12362,8 @@ test_101a() { # Discard is generally zero, but sometimes a few random reads line up # and trigger larger readahead, which is wasted & leads to discards. - if [[ $(($discard)) -gt $nreads ]]; then - error "too many ($discard) discarded pages" + if (( $discard > $nreads )); then + error "too many discarded pages ($discard > $nreads)" fi rm -f $DIR/$tfile || true }