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

This commit is contained in:
Jesus Checa Hidalgo 2022-07-05 16:55:36 +02:00
parent 4bfcd31c9f
commit a56b3645fc
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