[Lldb-commits] [lldb] [lldb][FrameRecognizer] Display the first non-std frame on verbose_trap (PR #108825)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 17 08:51:24 PDT 2024


================
@@ -0,0 +1,13 @@
+# Tests that we show the first non-STL frame when
+# a verbose_trap triggers from within the STL.
+
+# UNSUPPORTED: system-windows
+#
+# RUN: %clang_host -g -O0 %S/Inputs/verbose_trap-in-stl-nested.cpp -o %t.out
+# RUN: %lldb -b -s %s %t.out | FileCheck %s --check-prefixes=CHECK
----------------
Michael137 wrote:

I find it much easier to understand what the test is trying to check when it's done as a `Shell` test. Especially for when we just want to inspect the format of the frame. (FWIW, all the other frame format tests are also `Shell` tests).

>From the [Testing FAQ](https://lldb.llvm.org/resources/test.html):
> API tests: Integration tests that interact with the debugger through the SB API. These are written in Python and use LLDB’s dotest.py testing framework on top of Python’s [unittest](https://docs.python.org/3/library/unittest.html).

And later:
> A good rule of thumb is to prefer shell tests when what is being tested is relatively simple. Expressivity is limited compared to the API tests, which means that you have to have a well-defined test scenario that you can easily match with FileCheck.

IMO these tests fit into the latter category.

But I'm happy to change these to API tests if that is more appropriate.

https://github.com/llvm/llvm-project/pull/108825


More information about the lldb-commits mailing list