This is an archive of the discontinued LLVM Phabricator instance.

[llvm][support] Fix ScopedPrinterTest on AIX
ClosedPublic

Authored by paulkirth on Mar 21 2023, 9:44 AM.

Details

Summary

The test strings we used for infinity and NAN were not correct on AIX.
This patch creates those dynamically instead of hard-coded.

Diff Detail

Event Timeline

paulkirth created this revision.Mar 21 2023, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 9:44 AM
paulkirth requested review of this revision.Mar 21 2023, 9:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 9:44 AM

LGTM, thanks for the quick fix!

This revision is now accepted and ready to land.Mar 21 2023, 9:48 AM
jhenderson added inline comments.Mar 21 2023, 9:51 AM
llvm/unittests/Support/ScopedPrinterTest.cpp
598

Dumb question maybe, but why the "5.1"?

paulkirth marked an inline comment as done.Mar 21 2023, 10:16 AM
paulkirth added inline comments.
llvm/unittests/Support/ScopedPrinterTest.cpp
598

"%5.1" is the format string we use in printNumber(). IIRC that was what was taken from existing code in ElfDumper.

This revision was landed with ongoing or failed builds.Mar 21 2023, 10:36 AM
This revision was automatically updated to reflect the committed changes.
paulkirth marked an inline comment as done.

Hi @paulkirth, this testcase is still failing the same way on the AIX bot even after this change https://lab.llvm.org/buildbot/#/builders/214/builds/6557. Can this change be reverted until we figure out the proper fix?

Ugh, I see this issue. I missed that the "INF/inf" discrepancy also happens for JSON output, but only changed the non-JSON test string. I should have a forward fix very soon. If that causes issues, we'll either need to revert the original patch, the 2 fixes and the HasHistogram patch, or disable the test for float/double,until we sort it out.

If you really need the bot to progress, I'm fine w/ you reverting things, though.

paulkirth added a comment.EditedMar 23 2023, 10:15 AM

@abhina.sreeskantharajan is there a way to test AIX things locally? i.e. as in run on a bot "somewhere"? or a simple QEMU image we can use, etc?

Ugh, I see this issue. I missed that the "INF/inf" discrepancy also happens for JSON output, but only changed the non-JSON test string. I should have a forward fix very soon. If that causes issues, we'll either need to revert the original patch, the 2 fixes and the HasHistogram patch, or disable the test for float/double,until we sort it out.

If you really need the bot to progress, I'm fine w/ you reverting things, though.

Thanks, I see you already put up a fix so we can see if that fixes it

@abhina.sreeskantharajan is there a way to test AIX things locally? i.e. as in run on a bot "somewhere"? or a simple QEMU image we can use, etc?

I believe you can get access to AIX systems in GCC Compile Farm system http://gcc.gnu.org/wiki/CompileFarm