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 <adilger@whamcloud.com>
Change-Id: I5e210e0ca6495df4497ef7071086ef5928c267eb
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58469
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
}
test_101a() {
- [ $PARALLEL == "yes" ] && skip "skip parallel run"
+ [[ $PARALLEL != "yes" ]] || skip "skip parallel run"
local s
local discard
# 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
}