fix false valgrind error on new hash test (#11200)

New test fails on valgrind because strtold("+inf") with valgrind returns a non-inf result
same thing is done in incr.tcl.

(cherry picked from commit c3b7bde914)
This commit is contained in:
Oran Agra 2022-08-29 10:25:24 +03:00
parent 61cf011388
commit 6c3aedc06f

View File

@ -541,8 +541,11 @@ start_server {tags {"hash"}} {
}
}
test {HINCRBYFLOAT does not allow NaN or Infinity} {
assert_error "*value is NaN or Infinity*" {r hincrbyfloat hfoo field +inf}
assert_equal 0 [r exists hfoo]
# On some platforms strtold("+inf") with valgrind returns a non-inf result
if {!$::valgrind} {
test {HINCRBYFLOAT does not allow NaN or Infinity} {
assert_error "*value is NaN or Infinity*" {r hincrbyfloat hfoo field +inf}
assert_equal 0 [r exists hfoo]
}
}
}