From 88c183e978ed0aeaaf9d10d5b2554ba0244b372f Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Wed, 8 Dec 2021 13:38:35 +0100 Subject: [PATCH] [lldb] Fix TestDataFormatterGenericList Test is using "next" commands to make progress in the process. D115137 added an additional statement to the program, without adding a command to step over it. This only seemed to matter for the libc++ flavour of the test, possibly because libstdc++ list is "empty" in its uninitialized state. Since moving with step commands is a treacherous, this patch adds a run-to-breakpoint command to the test. It only does this for the affected step, but one may consider doing it elsewhere too. --- .../data-formatter-stl/generic/list/TestDataFormatterGenericList.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py index d430351..82fe84e 100644 --- a/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py +++ b/lldb/test/API/functionalities/data-formatter/data-formatter-stl/generic/list/TestDataFormatterGenericList.py @@ -161,7 +161,9 @@ class GenericListDataFormatterTestCase(TestBase): self.runCmd("type format delete int") - self.runCmd("n") + lldbutil.run_break_set_by_file_and_line(self, "main.cpp", + self.optional_line) + self.runCmd("continue") self.expect("frame variable text_list", substrs=['size=0', @@ -259,4 +261,4 @@ class GenericListDataFormatterTestCase(TestBase): @add_test_categories(["libc++"]) def test_ptr_and_ref_libcpp(self): - self.do_test_ptr_and_ref(USE_LIBCPP) \ No newline at end of file + self.do_test_ptr_and_ref(USE_LIBCPP) -- 2.7.4