This is an archive of the discontinued LLVM Phabricator instance.

[lldb] [test] Make 2lwp_process_SIGSEGV test more portable
ClosedPublic

Authored by mgorny on Mar 9 2019, 10:03 AM.

Details

Summary

Fix 2lwp_process_SIGSEGV NetBSD core test to terminate inside regular
function rather than libc call, in order to get reproducible backtrace
on different platforms.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny created this revision.Mar 9 2019, 10:03 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: abidh. · View Herald Transcript
krytarowski added inline comments.Mar 9 2019, 11:26 AM
lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c
9 ↗(On Diff #189989)

Just style, but I would use while (1) continue;

31 ↗(On Diff #189989)

It's a style but I would replace sleep(1) with a global volatile int that is switched in bar and here we could wait with: while (!initialized) continue;

mgorny updated this revision to Diff 190004.Mar 10 2019, 12:41 AM

Updated as requested by @krytarowski

mgorny marked an inline comment as done.Mar 10 2019, 12:42 AM
krytarowski accepted this revision.Mar 10 2019, 1:45 AM
This revision is now accepted and ready to land.Mar 10 2019, 1:45 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 10 2019, 1:49 AM