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

Unit Test Failure on IBM Power9 Platform #360

Closed
cameronrutherford opened this issue Jun 24, 2021 · 6 comments
Closed

Unit Test Failure on IBM Power9 Platform #360

cameronrutherford opened this issue Jun 24, 2021 · 6 comments

Comments

@cameronrutherford
Copy link

cameronrutherford commented Jun 24, 2021

Using gcc/7.4.0 and cmake/3.19.6 modules, I am getting errors running the unit test suite.

$ cmake -B seal-build -S seal-src -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_USE_ZSTD=OFF -DSEAL_BUILD_TESTS=ON
$ cd seal-build
$ make -j
$ cd bin
$ ./sealtest
[==========] Running 253 tests from 41 test suites.
[----------] Global test environment set-up.
[----------] 2 tests from CiphertextTest
[ RUN      ] CiphertextTest.CiphertextBasics
[       OK ] CiphertextTest.CiphertextBasics (1 ms)
...
[----------] 10 tests from Common
[ RUN      ] Common.Constants
[       OK ] Common.Constants (0 ms)
[ RUN      ] Common.UnsignedComparisons
/<redacted>/SEAL/native/tests/seal/util/common.cpp:59: Failure
Value of: unsigned_lt(pos_uc_max, neg_c)
  Actual: false
Expected: true
[  FAILED  ] Common.UnsignedComparisons (0 ms)
[ RUN      ] Common.SafeArithmetic
[       OK ] Common.SafeArithmetic (0 ms)
[ RUN      ] Common.FitsIn
/<redacted>/SEAL/native/tests/seal/util/common.cpp:120: Failure
Value of: fits_in<char>(pos_uc_max)
  Actual: true
Expected: false
[  FAILED  ] Common.FitsIn (0 ms)
[ RUN      ] Common.DivideRoundUp
...
[----------] Global test environment tear-down
[==========] 253 tests from 41 test suites ran. (1652 ms total)
[  PASSED  ] 251 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] Common.UnsignedComparisons
[  FAILED  ] Common.FitsIn

 2 FAILED TESTS
@WeiDaiWD
Copy link
Contributor

WeiDaiWD commented Jun 24, 2021

This issue is similar to #347 which is on ARM64. On PowerPC the char type is by default unsigned, causing these two tests to fail. SEAL does not rely on any arithmetic operations on char. Please just ignore or manually remove the failed tests, since they do not affect the correctness of SEAL. Thank you for reporting this.

@cameronrutherford
Copy link
Author

I will ignore accordingly. Glad I could get a quick answer :) thank you!

@WeiDaiWD
Copy link
Contributor

Would you please test this fix? I don't have access to a PowerPC.

@cameronrutherford
Copy link
Author

cameronrutherford commented Jun 24, 2021

@WeiDaiWD your branch fixed one of the two failing tests. Common.FitsIn still fails:

[ RUN      ] Common.FitsIn
<redacted>/SEAL/native/tests/seal/util/common.cpp:120: Failure
Value of: fits_in<char>(pos_uc_max)
  Actual: true
Expected: false
[  FAILED  ] Common.FitsIn (0 ms)
...
[----------] Global test environment tear-down
[==========] 253 tests from 41 test suites ran. (1658 ms total)
[  PASSED  ] 252 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Common.FitsIn

 1 FAILED TEST

@WeiDaiWD
Copy link
Contributor

It should work now. Same branch.

@cameronrutherford
Copy link
Author

Fixed! Thanks again.

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

2 participants