This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Regarding chi2_quality.cc test in libstdc++-v3 testsuite for gcc
- From: Renlin Li <renlin dot li at arm dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: austern at google dot com
- Date: Wed, 30 Oct 2013 10:53:56 +0000
- Subject: Regarding chi2_quality.cc test in libstdc++-v3 testsuite for gcc
- Authentication-results: sourceware.org; auth=none
Hi all,
@austern, sorry to brother you, I forgot to bring the discussion to the
mailing list.
Has anyone noticed that, this test fails for 32bit architecture linking
with glibc? The VERIFY statement ( VERIFY( chi2 < k*1.1 );) in
test_uniform_random() and test_bit_flip_set() fail.
I have tested it on x86_32 and arm-none-linux-eabi, they both fail with
the same result. However it passes for x86_64 and aarch64-none-linux-gnu.
Basically the random number generated using rand() are the same, it's
the std::hash<> makes the difference.
If the target linked with newlib, this test case for 32-bit arm target
passes. However, it's because the implementation of rand() function is
different from glibc. If I feed the same set "random" data to the test
case(instead of calling rand() function), the results are identical,
which means the compiler behaves correctly.
Do you know how to address this? Is the condition for the assertion too
strict?
Any information is appreciated!
Kind regards,
Renlin Li