Merge #49 tests: add lldb-dwz to test lldb doesn't crash with dwz debuginfo

This commit is contained in:
Serge Guelton 2022-07-06 12:09:54 +00:00
commit 3d6567023a
2 changed files with 26 additions and 0 deletions

17
tests/lldb-dwz/main.fmf Normal file
View File

@ -0,0 +1,17 @@
summary: "Test that lldb doesn't crash with dwz debuginfo"
test: "$WITH_SCL ./test.sh"
require:
- coreutils-debuginfo
adjust:
# Common requirements when LLVM is not SCL-ized
- require+:
- lldb
when: "collection is not defined"
# Requirements for SCL-ized LLVM
- require+:
- llvm-toolset-13.0-lldb
when: "collection == llvm-toolset-13.0"
- require+:
- llvm-toolset-14.0-lldb
when: "collection == llvm-toolset-14.0"

9
tests/lldb-dwz/test.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh -eux
lldb -b -o 'b main' -o run -o c -- true 2>&1 | tee lldb.log
# lldb should report unsupported dwarf data, yet shouldn't crash
grep "unsupported DW_FORM values" lldb.log
grep "stop reason = breakpoint" lldb.log
# Ensure the process ends successfully (no crashes)
grep -E "Process [0-9]+ exited with status = 0" lldb.log