From 33ca884cc5cce678f35e98412acab80482f7bd6c Mon Sep 17 00:00:00 2001 From: Oran Agra Date: Fri, 10 Jul 2020 08:29:02 +0300 Subject: [PATCH] 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.....' (cherry picked from commit 909bc97c526db757a3d022b29911ff6d08eba59c) --- tests/unit/type/incr.tcl | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/unit/type/incr.tcl b/tests/unit/type/incr.tcl index b7a135203..dbf45e455 100644 --- a/tests/unit/type/incr.tcl +++ b/tests/unit/type/incr.tcl @@ -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