[darwin][asan] add test for application specific information in crash logs
authorEmily Shi <code@emi.sh>
Tue, 23 Feb 2021 17:22:01 +0000 (09:22 -0800)
committerDan Liew <dliew@apple.com>
Tue, 23 Feb 2021 17:22:11 +0000 (09:22 -0800)
commitb6099fa515b1c0bb80d2347a836c01c65d7bc253
treeb98ae298af8af2908ffd7b7643c95d2de050fb71
parenta6be26710bbdf8de39a16ad64526ec955dda6c59
[darwin][asan] add test for application specific information in crash logs

Added a lit test that finds its corresponding crash log and checks to make sure it has asn output under `Application Specific Information`.

This required adding two python commands:
- `get_pid_from_output`: takes the output from the asan instrumentation and parses out the process ID
- `print_crashreport_for_pid`: takes in the pid of the process and the file name of the binary that was run and prints the contents of the corresponding crash log.

This test was added in preparation for changing the integration with crash reporter from the old api to the new api, which is implemented in a subsequent commit.

rdar://69767688

Reviewed By: delcypher

Commited by Dan Liew on behalf of Emily Shi.

Differential Revision: https://reviews.llvm.org/D96737
compiler-rt/test/asan/TestCases/Darwin/asan_log_to_crashreporter.cpp [new file with mode: 0644]
compiler-rt/test/lit.common.cfg.py
compiler-rt/test/sanitizer_common/ios_commands/get_pid_from_output.py [new file with mode: 0644]
compiler-rt/test/sanitizer_common/ios_commands/print_crashreport_for_pid.py [new file with mode: 0644]