diff --git a/tests/lldb-dwz/main.fmf b/tests/lldb-dwz/main.fmf new file mode 100644 index 0000000..5105d08 --- /dev/null +++ b/tests/lldb-dwz/main.fmf @@ -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" diff --git a/tests/lldb-dwz/test.sh b/tests/lldb-dwz/test.sh new file mode 100755 index 0000000..d9f8a31 --- /dev/null +++ b/tests/lldb-dwz/test.sh @@ -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