Whamcloud - gitweb
LU-13977 tests: fix float comparison in sanity test_255a 01/40001/2
authorMr NeilBrown <neilb@suse.de>
Wed, 23 Sep 2020 01:16:06 +0000 (11:16 +1000)
committerOleg Drokin <green@whamcloud.com>
Fri, 2 Oct 2020 00:19:10 +0000 (00:19 +0000)
commitf3b8f3fad502354bed7c3f743e5346200f7a584e
treeef819b8c8519c7731365eb8166d47d8e0a605808
parent5c4f99955fff2044e155269faaeec5db916d51e8
LU-13977 tests: fix float comparison in sanity test_255a

  [ $a -gt $b ]
compares integers.

in ladvise_willread_performance(), average_ladvise and lowest_speedup
are calculated to 2 decimals, so they probably aren't integers.  So
this (nearly) always fails, but as the failure is not reported when a
VM is detected, the failure goes unnoticed.

The bash [[ ]] command can be used instead.  Its '>' operator compares
floats.

Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ifc674d5804b1269cebce82893a08eace9ffd9be4
Reviewed-on: https://review.whamcloud.com/40001
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lustre/tests/sanity.sh