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

Base64 test of folly passes on s390x (Linux on IBM zSystems) #1993

Closed
karuvally opened this issue May 2, 2023 · 3 comments
Closed

Base64 test of folly passes on s390x (Linux on IBM zSystems) #1993

karuvally opened this issue May 2, 2023 · 3 comments

Comments

@karuvally
Copy link

Hi Team,

This is to build upon an issue I raised previously within the community (#1951) where we were having trouble building the folly library with s390x (Linux on IBM zSystems mainframe).

Specifically, we were having trouble due to an assertion in folly/detail/base64_detail/Base64SWAR.cpp, which checked if the host machine was big-endian (IBM zSystems are big-endian). I was advised to understand the SWAR table used in the Base64 decode process and adapt it for big-endian platform.

For debugging, I tried commenting out the assertion and built folly on s390x. Also, I tried pulling out folly/test/base64_test.cpp and built it manually. Strangely, the test succeeds when run.

Running main() from /root/vcpkg/buildtrees/gtest/src/v1.13.0-0674f4ed11.clean/googletest/src/gtest_main.cc
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from Base64Test
[ RUN      ] Base64Test.NormalTest
[       OK ] Base64Test.NormalTest (0 ms)
[----------] 1 test from Base64Test (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (0 ms total)
[  PASSED  ] 1 test.

Can someone shed some light into why the test is succeeding on the big-endian IBM zSystems?
I was of understanding that the little-endian specific implementation of SWAR table used would cause the test to fail.

Thanks!

@Orvid
Copy link
Contributor

Orvid commented May 8, 2023

I believe the initial lockout of big endian systems was out of precaution (since we don't have any readily accessible means of testing). If it's passing tests and working fine, we can probably just remove the assert that was keeping things from compiling on big endian hosts.

@karuvally
Copy link
Author

Thanks @Orvid!
We will continue our tests and update here if we hit any endian related roadblocks :)

@barracuda156
Copy link

This may fix #1834 perhaps for MacOS too. Let me try.

facebook-github-bot pushed a commit that referenced this issue Jan 24, 2024
Summary:
It doesn't appear to actually be needed as the tests pass on big endian platforms:
#1993 (comment)

Fixes: #1993

Reviewed By: Gownta

Differential Revision: D52974667

fbshipit-source-id: 89193ec75e58d54f05e1300b56d17775aab856d2
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

3 participants