rabauke/trng4

Version 4.26: Test uint128 i/o operations fails on aarch64

badshah400 opened this issue · 6 comments

When building trng 4.26 on openSUSE for the aarch64 architecture, we notice that one of the tests fails when running ctest, with the following log:

[   59s]  5/59 Test  #5: uint128 i/o operations ........................***Failed    0.06 sec
[   59s] Filters: uint128 i/o operations
[   59s] 
[   59s] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[   59s] test_all is a Catch v2.13.10 host application.
[   59s] Run with -? for options
[   59s] 
[   59s] -------------------------------------------------------------------------------
[   59s] uint128 i/o operations
[   59s]   decimal output
[   59s] -------------------------------------------------------------------------------
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:432
[   59s] ...............................................................................
[   59s] 
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:444: FAILED:
[   59s]   REQUIRE( strstr.str() == a_y.y )
[   59s] with expansion:
[   59s]   "75594757214061742522368" == "0"
[   59s] 
[   59s] -------------------------------------------------------------------------------
[   59s] uint128 i/o operations
[   59s]   hex output
[   59s] -------------------------------------------------------------------------------
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:452
[   59s] ...............................................................................
[   59s] 
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:464: FAILED:
[   59s]   REQUIRE( strstr.str() == a_y.y )
[   59s] with expansion:
[   59s]   "10080000000000000000" == "0"
[   59s] 
[   59s] -------------------------------------------------------------------------------
[   59s] uint128 i/o operations
[   59s]   octal output
[   59s] -------------------------------------------------------------------------------
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:472
[   59s] ...............................................................................
[   59s] 
[   59s] /home/abuild/rpmbuild/BUILD/trng4-4.26/tests/test_uint128.cc:484: FAILED:
[   59s]   REQUIRE( strstr.str() == a_y.y )
[   59s] with expansion:
[   59s]   "20200000000000000000000000" == "0"
[   59s] 
[   59s] ===============================================================================
[   59s] test cases:  1 |  0 passed | 1 failed
[   59s] assertions: 33 | 30 passed | 3 failed

The test suite runs fine with version 4.25 on the same build environment.

Here is the full build log just in case: log.zip.

Thanks for the very useful library.

@badshah400 Thanks for this report. Issues will be fixed in the next release.

@badshah400 I tried to reproduce the issue on a Raspberry Pi 4 running Ubuntu 24.4 for ARM 64 using GCC 13.2.0. I am not able to reproduce the reported issues. All unit tests run without any failure. Though, the provided log file suggests that the issues have been observed on ARM 64 with a 32-bit ABI (instead of a 64bit ABI).

[    0s] Using BUILD_ROOT=/var/cache/obs/worker/root_26/.mount
[    0s] Using BUILD_ARCH=aarch64:aarch64_ilp32:armv8l
[    0s] Doing kvm build in /var/cache/obs/worker/root_26/root
[    0s] 
[    0s] 
[    0s] i03-armsrv2 started "build trng.spec" at Mon Jul 22 12:25:19 UTC 2024.
[    0s] 

@badshah400 I am also not able to reproduce the issue on a Raspberry Pi 4 running Raspberry Pi OS (32-Bit, Raspbian GNU/Linux 12 (bookworm)) using GCC 12.2.0. All unit tests run without any failure.

@badshah400 I am still unable to reproduce the issue. Though, I think I am able to understand the root cause from investigating the provided log files. Can you please check if the issue still occurs for the latest version from git master (which contains two fixes)?

Tested just now. Works perfectly with commits bb7f1ea and a58e64b applied. Big thanks.

@badshah400 Thanks for testing and feedback. I will prepare a new release soon.