This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] Overhaul test_exception_storage.pass.cpp
ClosedPublic

Authored by ldionne on Nov 21 2022, 4:07 PM.

Details

Summary

I'm making a change in this area (https://reviews.llvm.org/D138461), so update the test:

  • Add proper synchronization instead of a sleep.
  • Avoid some unnecessary size_t casts.
  • Spawn the number of hardware threads instead of 10.
  • Check that __cxa_get_globals and __cxa_get_globals_fast return the same values.
  • Split the test in with-threads and without-threads tests to simplify the code.

Diff Detail

Event Timeline

smeenai created this revision.Nov 21 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 4:07 PM
Herald added a subscriber: mgrang. · View Herald Transcript
smeenai requested review of this revision.Nov 21 2022, 4:07 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 21 2022, 4:07 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
smeenai planned changes to this revision.Nov 22 2022, 11:00 AM

I need to look into the CI failures.

smeenai updated this revision to Diff 477295.Nov 22 2022, 2:17 PM

Print to stderr and add more details to error

smeenai edited the summary of this revision. (Show Details)Nov 22 2022, 2:17 PM
MaskRay accepted this revision.Nov 22 2022, 2:42 PM
MaskRay added inline comments.
libcxxabi/test/test_exception_storage.pass.cpp
19–21

static

23

Since #include <thread> is included, is there a reason to use std::__libcpp_thread_t instead of std::thread?

smeenai updated this revision to Diff 477322.Nov 22 2022, 3:24 PM
smeenai marked 2 inline comments as done.

Address comments

smeenai updated this revision to Diff 477392.Nov 22 2022, 11:39 PM

Mark test as unsupported for C++03

smeenai updated this revision to Diff 478466.Nov 28 2022, 11:13 PM

Rebase and synchronize threads to avoid duplicates

smeenai edited the summary of this revision. (Show Details)Nov 28 2022, 11:35 PM
smeenai updated this revision to Diff 478787.Nov 29 2022, 7:41 PM

Hopefully make CI happy this time

CI is happy now. Could someone from the libc++abi group please take a look?

Pinging the libc++abi reviewer group.

ldionne commandeered this revision.Sep 8 2023, 6:50 AM
ldionne added a reviewer: smeenai.
ldionne added a subscriber: ldionne.

[Github PR transition cleanup]

Commandeering to update. There's a few changes I want to make (for example it's not OK to disable this test when localization isn't supported).

ldionne updated this revision to Diff 556254.Sep 8 2023, 7:06 AM
ldionne edited the summary of this revision. (Show Details)

Rebase and make a few changes to avoid requiring localization support.

ldionne accepted this revision.Sep 8 2023, 7:07 AM

Will ship once CI is green.

This revision is now accepted and ready to land.Sep 8 2023, 7:07 AM
ldionne updated this revision to Diff 556268.Sep 8 2023, 8:46 AM

Fix C++03 and C++11 tests.

This revision was automatically updated to reflect the committed changes.