From: Pavel Labath Date: Wed, 8 Dec 2021 12:38:35 +0000 (+0100) Subject: [lldb] Fix TestDataFormatterGenericList X-Git-Tag: upstream/15.0.7~23660 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88c183e978ed0aeaaf9d10d5b2554ba0244b372f;p=platform%2Fupstream%2Fllvm.git [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. --- 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)