Skip to content

[Bug]: A few test cases fail in StrErrorTest and TypedFormatConvertTest on PowerPC (libstdc++, C++17 / C++20) #2097

Description

@barracuda156

Describe the issue

I have spent quite some time today on abseil on powerpc (I need to debug an obscure failure in protobuf, and for that I need to ensure the bug is not caused by abseil), and got from 17 failing tests down to 4, two of which seem to be precision-related (thus not a big deal, we do not compute rocket designs).
There are two tests, however, which fail for a reason unclear to me, and it will be nice to fix their causes.

[ RUN      ] StrErrorTest.MultipleThreads
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

. . .

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/base/internal/strerror_test.cc:72: Failure
Value of: value
Expected: is equal to "Unknown error: 0"
  Actual: "Undefined error: 0" (of type std::string)

[  FAILED  ] StrErrorTest.MultipleThreads (306 ms)
[----------] 3 tests from StrErrorTest (307 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test suite ran. (307 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] StrErrorTest.MultipleThreads

 1 FAILED TEST
<end of output>
Test time =   0.35 sec
----------------------------------------------------------
Test Failed.
"absl_strerror_test" end time: Jun 30 01:14 CST
"absl_strerror_test" time elapsed: 00:00:00


[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/0.AllIntsWithFlags, where TypeParam = int (1441 ms)
[ RUN      ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/0.Char
[       OK ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/0.Char (1 ms)
[----------] 2 tests from TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/0 (1442 ms total)

[----------] 2 tests from TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1, where TypeParam = unsigned int
[ RUN      ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1.AllIntsWithFlags
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0"
  FormatPack(format, absl::MakeSpan(args))
    Which is: ""
Google Test trace:
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:579:  old_fmt: "%#.u"' new_fmt: "%#.d"
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:532: 0

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0"
  FormatPack(format, absl::MakeSpan(args))
    Which is: ""

. . .

[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1.AllIntsWithFlags, where TypeParam = unsigned int (1275 ms)
[ RUN      ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1.Char
[       OK ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1.Char (0 ms)
[----------] 2 tests from TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1 (1275 ms total)

[----------] 2 tests from TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/2, where TypeParam = int
[ RUN      ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/2.AllIntsWithFlags
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0"
  FormatPack(format, absl::MakeSpan(args))
    Which is: ""
Google Test trace:
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:579:  old_fmt: "%#.d"' new_fmt: "%#.d"
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:532: 0

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0"
  FormatPack(format, absl::MakeSpan(args))
    Which is: ""

. . .

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0         "
  FormatPack(format, absl::MakeSpan(args))
    Which is: "          "
Google Test trace:
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:579:  old_fmt: "%-#0+ 10.X"' new_fmt: "%-#0+ 10.X"
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:532: L'\x00000000'

/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:584: Failure
Expected equality of these values:
  old_result
    Which is: "0         "
  FormatPack(format, absl::MakeSpan(args))
    Which is: "          "
Google Test trace:
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:579:  old_fmt: "%-#0+ 10.0X"' new_fmt: "%-#0+ 10.0X"
/opt/local/var/macports/build/abseil-ec2faa01/work/abseil-cpp-20260526.0/absl/strings/internal/str_format/convert_test.cc:532: L'\x00000000'

[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/12.AllIntsWithFlags, where TypeParam = wchar_t (1453 ms)
[ RUN      ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/12.Char
[       OK ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/12.Char (0 ms)
[----------] 2 tests from TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/12 (1454 ms total)

[----------] Global test environment tear-down
[==========] 45 tests from 14 test suites ran. (83970 ms total)
[  PASSED  ] 31 tests.
[  SKIPPED ] 1 test, listed below:
[  SKIPPED ] FormatConvertTest.GlibcHasCorrectTraits
[  FAILED  ] 13 tests, listed below:
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/0.AllIntsWithFlags, where TypeParam = int
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/1.AllIntsWithFlags, where TypeParam = unsigned int
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/2.AllIntsWithFlags, where TypeParam = int
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/3.AllIntsWithFlags, where TypeParam = short
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/4.AllIntsWithFlags, where TypeParam = unsigned short
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/5.AllIntsWithFlags, where TypeParam = long
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/6.AllIntsWithFlags, where TypeParam = unsigned long
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/7.AllIntsWithFlags, where TypeParam = long long
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/8.AllIntsWithFlags, where TypeParam = unsigned long long
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/9.AllIntsWithFlags, where TypeParam = signed char
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/10.AllIntsWithFlags, where TypeParam = unsigned char
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/11.AllIntsWithFlags, where TypeParam = char
[  FAILED  ] TypedFormatConvertTestWithAllIntTypes/TypedFormatConvertTest/12.AllIntsWithFlags, where TypeParam = wchar_t

13 FAILED TESTS

Could someone please help with figuring out what goes wrong?

Steps to reproduce the problem

Run tests

What version of Abseil are you using?

20260526.0

What operating system and version are you using?

macOS 10.6.8 / powerpc

What compiler and version are you using?

gcc 16.1.0

C++17 / C++20 (these tests fail with either)

“Old” C++ ABI (-D_GLIBCXX_USE_CXX11_ABI=0)

What build system are you using?

MacPorts

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions