Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redis make test fails on bash on windows #4537

Open
samiujan opened this issue Dec 14, 2017 · 9 comments
Open

redis make test fails on bash on windows #4537

samiujan opened this issue Dec 14, 2017 · 9 comments

Comments

@samiujan
Copy link

Environment: Windows 10 Pro 64-bit running Ubuntu subsystem (Ubuntu 16.04.2 LTS)

make install failed with

!!! WARNING The following tests failed:

*** [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})
Cleanup: may take some time... OK
Makefile:242: recipe for target 'test' failed
make[1]: *** [test] Error 1
make[1]: Leaving directory '/home/sami/redis/redis-4.0.6/src'
Makefile:6: recipe for target 'test' failed
make: *** [test] Error 2

@kienerj
Copy link

kienerj commented Jan 22, 2018

Can confirm. I get the exact same issue when running make test.

@ghost
Copy link

ghost commented Jan 27, 2018

I'm having the same issues! I tried OpenSUSE with the exact same error

@MicahWoodrowPhillips
Copy link

18 months later, same issue here.

@diegoclair
Copy link

The same here

1 similar comment
@scorpiohjx
Copy link

The same here

@oranagra
Copy link
Member

it seems some compilers on Windows consider long double as a synonym for double.
please run uname -a and let me know what you see.
we should improve this check to skip that test on this platform:

    # The following test can only be executed if we don't use Valgrind, and if
    # we are using x86_64 architecture, because:
    #
    # 1) Valgrind has floating point limitations, no support for 80 bits math.
    # 2) Other archs may have the same limits.
    #
    # 1.23 cannot be represented correctly with 64 bit doubles, so we skip
    # the test, since we are only testing pretty printing here and is not
    # a bug if the program outputs things like 1.299999...
    if {!$::valgrind && [string match *x86_64* [exec uname -a]]} {

@yossigo
Copy link
Member

yossigo commented Nov 22, 2020

@oranagra I noticed that as well on WSL which is not really distinguishable from any other Linux/x86_64 environment. I think we may need to relax this test or come up with some way to indicate 80-bit floats are not supported.

@yossigo
Copy link
Member

yossigo commented Nov 22, 2020

So it seems like WSL sets the FPU control register's PC bits to 10 (double precision) while Linux uses 11 (extended precision). It's possible to use macros in fpu_control.h to query or modify this, although I'm quite reluctant to go into this trouble just for WSL support. That might not be very portable and introduce other hardware-specific issues (header file warns that x86_64 SSE is unaffected by this and requires other configuration, for example).

It might make more sense to just relax the tests. @oranagra what do you think?

@oranagra
Copy link
Member

oranagra commented Nov 22, 2020

i'm ok with relaxing that test a little bit (but still making sure it hits it's purpose).
i.e. find a combination of numbers that have pretty printing using 64 bit long double too.

on the other hand, i'm also ok to add an info field that exposes the precision to clients (maybe it'll be useful for others too).

maybe @guybe7 has some feedback about this (i remember he messed with some other long-double related issues with tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants