Hi,

[This is redis 4.0-rc2]

The "Test HINCRBYFLOAT for correct float representation" appears to be failing on non x86 architectures. See, for example:

  • https://buildd.debian.org/status/fetch.php?pkg=redis&arch=armel&ver=4%3A4.0-rc2-2&stamp=1483816143&raw=0
  • https://buildd.debian.org/status/fetch.php?pkg=redis&arch=armhf&ver=4%3A4.0-rc2-2&stamp=1483816489&raw=0
  • https://buildd.debian.org/status/fetch.php?pkg=redis&arch=mips&ver=4%3A4.0-rc2-2&stamp=1483817927&raw=0
  • https://buildd.debian.org/status/fetch.php?pkg=redis&arch=mipsel&ver=4%3A4.0-rc2-2&stamp=1483817273&raw=0

See also https://github.com/antirez/redis/issues/2846

Comment From: dandrei

Same issue when testing on the Bash available as a Linux Subsystem under Windows 10 x64.

Version: 4.0.1 stable The two tests that fail are:

*** [err]: Test HINCRBYFLOAT for correct float representation (issue #2846) in tests/unit/type/hash.tcl Expected condition '[r hincrbyfloat myhash float 1.23] eq {1.23}' to be true ([r hincrbyfloat myhash float 1.23] eq {1.23}) *** [err]: PUBLISH/PSUBSCRIBE after PUNSUBSCRIBE without arguments in tests/unit/pubsub.tcl

Comment From: lensbart

Same on MacBook Air (M1, 2020)

Comment From: addos

Same on MacBook Air (M1, 2020)

Can confirm, I get this error trying to run the tests on my Macbook air m1 as well.

!!! WARNING The following tests failed:

*** [err]: Test HINCRBYFLOAT for correct float representation (issue #2846) in tests/unit/type/hash.tcl
Expected [r hincrbyfloat myhash float 1.23] eq {1.23} (context: type eval line 3 cmd {assert {[r hincrbyfloat myhash float 1.23] eq {1.23}}} proc ::test)
Cleanup: may take some time... OK
make[1]: *** [test] Error 1
make: *** [test] Error 2

Comment From: sundb

@addos on different CPU architecture or platform, floating precision will be different, and this test had been skipped on non-x86 platform in https://github.com/redis/redis/commit/fceaa46dda37a2d4db4e0a48cc1dab3fe208cb2c.

Comment From: addos

It failed for me trying to build on the latest stable code from the redis site.

Comment From: sundb

@addos can you use redis-cli info server to see what version of redis you are using?

Comment From: addos

Server

redis_version:7.0.4 redis_git_sha1:00000000 redis_git_dirty:0 redis_build_id:4457624d50a7d053 redis_mode:standalone os:Darwin 21.5.0 arm64 arch_bits:64 monotonic_clock:POSIX clock_gettime multiplexing_api:kqueue atomicvar_api:c11-builtin gcc_version:4.2.1 process_id:77265 process_supervised:no run_id:9fbb763fd02afdeef3b908098788271be0cdd61b tcp_port:6379 server_time_usec:1658926411682797 uptime_in_seconds:13 uptime_in_days:0 hz:10 configured_hz:10 lru_clock:14759243

Comment From: sundb

@addos Can you see what uname -a outputs? This test is skipped in my mac m1.

Comment From: addos

Darwin addos-air.lan 21.5.0 Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101 arm64

Comment From: sundb

@addos It's odd that this test never enters under mac m1. can you try ./runtest --single unit/type/hash --only "Test HINCRBYFLOAT for correct float representation*" again and see the output?

Comment From: addos

Said it passed: Cleanup: may take some time... OK Starting test server at port 21079

Testing unit/type/hash

skip: HSET/HLEN - Small hash creation skip: Is the small hash encoded with a listpack? skip: HRANDFIELD - listpack skip: HRANDFIELD - hashtable skip: HRANDFIELD with RESP3 skip: HRANDFIELD count of 0 is handled correctly skip: HRANDFIELD with against non existing key skip: HRANDFIELD count of 0 is handled correctly - emptyarray skip: HRANDFIELD with against non existing key - emptyarray skip: HRANDFIELD with - hashtable skip: HRANDFIELD with - listpack skip: HSET/HLEN - Big hash creation skip: Is the big hash encoded with an hash table? skip: HGET against the small hash skip: HGET against the big hash skip: HGET against non existing key skip: HSET in update and insert mode skip: HSETNX target key missing - small hash skip: HSETNX target key exists - small hash skip: HSETNX target key missing - big hash skip: HSETNX target key exists - big hash skip: HSET/HMSET wrong number of args skip: HMSET - small hash skip: HMSET - big hash skip: HMGET against non existing key and fields skip: HMGET against wrong type skip: HMGET - small hash skip: HMGET - big hash skip: HKEYS - small hash skip: HKEYS - big hash skip: HVALS - small hash skip: HVALS - big hash skip: HGETALL - small hash skip: HGETALL - big hash skip: HDEL and return value skip: HDEL - more than a single value skip: HDEL - hash becomes empty before deleting all specified fields

skip: Is a ziplist encoded Hash promoted on big payload? skip: HINCRBY against non existing database key skip: HINCRBY against non existing hash key skip: HINCRBY against hash key created by hincrby itself skip: HINCRBY against hash key originally set with HSET skip: HINCRBY over 32bit value skip: HINCRBY over 32bit value with over 32bit increment skip: HINCRBY fails against hash value with spaces (left) skip: HINCRBY fails against hash value with spaces (right) skip: HINCRBY can detect overflows skip: HINCRBYFLOAT against non existing database key skip: HINCRBYFLOAT against non existing hash key skip: HINCRBYFLOAT against hash key created by hincrby itself skip: HINCRBYFLOAT against hash key originally set with HSET skip: HINCRBYFLOAT over 32bit value skip: HINCRBYFLOAT over 32bit value with over 32bit increment skip: HINCRBYFLOAT fails against hash value with spaces (left) skip: HINCRBYFLOAT fails against hash value with spaces (right) skip: HINCRBYFLOAT fails against hash value that contains a null-terminator in the middle skip: HSTRLEN against the small hash skip: HSTRLEN against the big hash skip: HSTRLEN against non existing field skip: HSTRLEN corner cases skip: HINCRBYFLOAT over hash-max-listpack-value encoded with a listpack skip: Hash ziplist regression test for large keys skip: Hash fuzzing #1 - 10 fields skip: Hash fuzzing #2 - 10 fields skip: Hash fuzzing #1 - 512 fields skip: Hash fuzzing #2 - 512 fields skip: Stress test the hash ziplist -> hashtable encoding conversion skip: Test HINCRBYFLOAT for correct float representation (issue #2846) skip: Hash ziplist of various encodings skip: Hash ziplist of various encodings - sanitize dump

               The End

Execution time of different units: 0 seconds - unit/type/hash

\o/ All tests passed without errors!

Cleanup: may take some time... OK

Comment From: sundb

@addos thanks, but it's so wired, Test HINCRBYFLOAT for correct float representation was skipped, normally, make test will also skip it, do you have any special steps?

Comment From: addos

Re-ran "make test" it says this:

Testing solo test [ignore]: Test LPUSH and LPOP on plain nodes over 4GB: large memory flag not provided [ignore]: Test LINDEX and LINSERT on plain nodes over 4GB: large memory flag not provided [ignore]: Test LTRIM on plain nodes over 4GB: large memory flag not provided [ignore]: Test LREM on plain nodes over 4GB: large memory flag not provided [ignore]: Test LSET on plain nodes over 4GB: large memory flag not provided [ignore]: Test LMOVE on plain nodes over 4GB: large memory flag not provided

Testing solo test [ignore]: SADD, SCARD, SISMEMBER - large data: large memory flag not provided

Testing solo test [ignore]: BIT pos larger than UINT_MAX: large memory flag not provided [ignore]: SETBIT values larger than UINT32_MAX and lzf_compress/lzf_decompress correctly: large memory flag not provided

Testing solo test [ignore]: XADD one huge field: large memory flag not provided [ignore]: XADD one huge field - 1: large memory flag not provided [ignore]: several XADD big fields: large memory flag not provided [ignore]: single XADD big fields: large memory flag not provided [ignore]: hash with many big fields: large memory flag not provided [ignore]: hash with one huge field: large memory flag not provided

Testing solo test

               The End

Execution time of different units: 1 seconds - unit/printver 1 seconds - unit/info-command 1 seconds - unit/type/incr 2 seconds - unit/info 2 seconds - unit/protocol 2 seconds - unit/keyspace 4 seconds - unit/auth 0 seconds - unit/quit 5 seconds - unit/type/stream-cgroups 9 seconds - unit/type/hash 7 seconds - unit/multi 9 seconds - unit/scan 0 seconds - unit/acl-v2 5 seconds - unit/acl 11 seconds - unit/type/string 11 seconds - unit/type/set 13 seconds - unit/sort 12 seconds - unit/other 15 seconds - unit/type/list 15 seconds - unit/type/list-3 16 seconds - unit/expire 14 seconds - integration/replication-3 11 seconds - integration/shutdown 15 seconds - integration/replication-2 20 seconds - unit/latency-monitor 29 seconds - unit/type/list-2 1 seconds - integration/convert-ziplist-hash-on-load 2 seconds - integration/convert-zipmap-hash-on-load 31 seconds - unit/dump 2 seconds - integration/convert-ziplist-zset-on-load 2 seconds - integration/logging 35 seconds - unit/type/zset 27 seconds - integration/block-repl 25 seconds - integration/aof 22 seconds - integration/aof-multi-part 16 seconds - integration/rdb 7 seconds - integration/failover 3 seconds - integration/redis-benchmark 2 seconds - integration/dismiss-mem 1 seconds - unit/pubsub 9 seconds - integration/psync2-master-restart 30 seconds - integration/replication-buffer 1 seconds - unit/slowlog 2 seconds - unit/pubsubshard 20 seconds - integration/corrupt-dump-fuzzer 1 seconds - unit/limits 5 seconds - unit/functions 18 seconds - integration/psync2-pingoff 6 seconds - unit/introspection-2 27 seconds - integration/corrupt-dump 2 seconds - unit/bitfield 24 seconds - integration/psync2-reg 17 seconds - integration/redis-cli 8 seconds - unit/bitops 2 seconds - unit/pause 3 seconds - unit/lazyfree 16 seconds - unit/introspection 1 seconds - unit/tls 5 seconds - unit/wait 0 seconds - unit/oom-score-adj 3 seconds - unit/querybuf 2 seconds - unit/tracking 1 seconds - unit/shutdown 2 seconds - unit/networking 17 seconds - unit/obuf-limits 0 seconds - unit/violations 21 seconds - unit/scripting 1 seconds - unit/replybufsize 13 seconds - unit/memefficiency 2 seconds - unit/cluster-scripting 66 seconds - unit/aofrw 43 seconds - integration/psync2 17 seconds - unit/pendingquerybuf 14 seconds - unit/client-eviction 27 seconds - unit/hyperloglog 17 seconds - unit/cluster 71 seconds - integration/replication-4 84 seconds - unit/type/stream 59 seconds - unit/geo 76 seconds - unit/maxmemory 168 seconds - integration/replication-psync 187 seconds - integration/replication 0 seconds - list-large-memory 1 seconds - set-large-memory 0 seconds - bitops-large-memory 1 seconds - violations 1 seconds - defrag

!!! WARNING The following tests failed:

*** [err]: Test HINCRBYFLOAT for correct float representation (issue #2846) in tests/unit/type/hash.tcl Expected [r hincrbyfloat myhash float 1.23] eq {1.23} (context: type eval line 3 cmd {assert {[r hincrbyfloat myhash float 1.23] eq {1.23}}} proc ::test) Cleanup: may take some time... OK make[1]: *** [test] Error 1 make: *** [test] Error 2

Comment From: addos

Here is the full output: test.txt .

Comment From: CrissyHoo

how to solve this problem 555

Comment From: oranagra

looking at this, what @addos reported is really odd (running ./runtest skips that test, but make test doesn't). there must be something we're missing here.

@CrissyHoo please specify which version you're using, how you're using it and on which platform. please include output of uname -a

Comment From: linzihao1999

Hi everyone

I make a change for this issue, please give any idea. Thanks

Comment From: oranagra

solved long ago by 7c8ddab4f8 (part of redis 5.0)