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

Tests failing on arm #797

Closed
abliss opened this issue Oct 24, 2017 · 5 comments
Closed

Tests failing on arm #797

abliss opened this issue Oct 24, 2017 · 5 comments
Labels
platform: arm related to ARM architecture

Comments

@abliss
Copy link

abliss commented Oct 24, 2017

Hi, I see many tests currently failing after building on armv7hf with gcc5.4 on the "devel" branch. Is that expected?

Test  #7: test-cbor_default ...................***Failed   16.56 sec                                                                                            
Test  #8: test-cbor_all .......................***Failed  146.45 sec                                                                                            
Test #15: test-class_parser_default ...........***Failed    0.78 sec                                                                                            
Test #16: test-class_parser_all ...............***Failed    0.76 sec                                                                                            
Test #21: test-constructor1_default ...........***Failed    0.13 sec                                                                                            
Test #22: test-constructor1_all ...............***Failed    0.11 sec                                                                                            
Test #61: test-regression_default .............***Failed   20.09 sec                                                                                            
Test #62: test-regression_all .................***Failed   28.13 sec                                                                                            
Test #65: test-testsuites_default .............***Failed    4.16 sec                                                                                            
Test #66: test-testsuites_all .................***Failed    0.28 sec

e.g.:

test-algorithms            test-concepts              test-iterators1            test-pointer_access
abliss@localhost:~/json-develop/test$ ./test-cbor

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test-cbor is a Catch v1.9.7 host application.
Run with -? for options

-------------------------------------------------------------------------------
CBOR
  individual values
  number
  half-precision float (edge cases)
  exp = 0b11111
  infinity (0 11111 0000000000)
-------------------------------------------------------------------------------
/home/abliss/json-develop/test/src/unit-cbor.cpp:780
...............................................................................

/home/abliss/json-develop/test/src/unit-cbor.cpp:785: FAILED:
  CHECK( j.dump() == "null" )
with expansion:
  "inf.0" == "null"

-------------------------------------------------------------------------------
CBOR
  individual values
  number
  half-precision float (edge cases)
  exp = 0b11111
  -infinity (1 11111 0000000000)
-------------------------------------------------------------------------------
/home/abliss/json-develop/test/src/unit-cbor.cpp:788
...............................................................................

/home/abliss/json-develop/test/src/unit-cbor.cpp:793: FAILED:
  CHECK( j.dump() == "null" )
with expansion:
  "-inf.0" == "null"

-------------------------------------------------------------------------------
@nlohmann
Copy link
Owner

This is not expected, but I heard of issues with ARM before, see #303. Could you please provide logs for the other errors so I can have a look?

@nlohmann nlohmann added the platform: arm related to ARM architecture label Oct 24, 2017
@abliss
Copy link
Author

abliss commented Oct 24, 2017

It seems that the tests are being compiled with -ffast-math which turns on -ffinite-math-only. On my machine, under -ffinite-math-only, isfinite(INFINITY) actually returns 1, and this throws off the serialization tests.
I'm no expert on the spec, but it seems like this flag might be inappropriate for these tests.

@nlohmann
Copy link
Owner

This is really strange. Nowhere in the project is -ffast-math set. Or does CMake decide to add this when called on ARM? What did you execute prior to building the tests? Do the tests succeed without -ffast-math?

@abliss
Copy link
Author

abliss commented Oct 25, 2017

Ah! My bad! It was sneaking in through an errant env variable. Sorry for the noise.

@abliss abliss closed this as completed Oct 25, 2017
@nlohmann
Copy link
Owner

Thanks for checking back. Just to make sure: do all tests succeed now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: arm related to ARM architecture
Projects
None yet
Development

No branches or pull requests

2 participants