skip a test that uses +inf on valgrind (#7440)

On some platforms strtold("+inf") with valgrind returns a non-inf result

[err]: INCRBYFLOAT does not allow NaN or Infinity in tests/unit/type/incr.tcl
Expected 'ERR*would produce*' to equal or match '1189731495357231765085759.....'
This commit is contained in:
Oran Agra 2020-07-10 08:29:02 +03:00 committed by GitHub
parent 8e76e13472
commit 909bc97c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -130,15 +130,18 @@ start_server {tags {"incr"}} {
format $err
} {WRONGTYPE*}
test {INCRBYFLOAT does not allow NaN or Infinity} {
r set foo 0
set err {}
catch {r incrbyfloat foo +inf} err
set err
# p.s. no way I can force NaN to test it from the API because
# there is no way to increment / decrement by infinity nor to
# perform divisions.
} {ERR*would produce*}
# On some platforms strtold("+inf") with valgrind returns a non-inf result
if {!$::valgrind} {
test {INCRBYFLOAT does not allow NaN or Infinity} {
r set foo 0
set err {}
catch {r incrbyfloat foo +inf} err
set err
# p.s. no way I can force NaN to test it from the API because
# there is no way to increment / decrement by infinity nor to
# perform divisions.
} {ERR*would produce*}
}
test {INCRBYFLOAT decrement} {
r set foo 1