[Lldb-commits] [lldb] e7c91e3 - [lldb/Test] Skip remaining 'side_effect' tests with reproducers.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Thu May 14 10:39:05 PDT 2020
Author: Jonas Devlieghere
Date: 2020-05-14T10:38:56-07:00
New Revision: e7c91e3124b66cb1454a45dfd75c0a350852d6a6
URL: https://github.com/llvm/llvm-project/commit/e7c91e3124b66cb1454a45dfd75c0a350852d6a6
DIFF: https://github.com/llvm/llvm-project/commit/e7c91e3124b66cb1454a45dfd75c0a350852d6a6.diff
LOG: [lldb/Test] Skip remaining 'side_effect' tests with reproducers.
The side_effect Python package bypasses the reproducer instrumentation
and therefore these tests are not expected to replay from a reproducer.
Added:
Modified:
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
Removed:
################################################################################
diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py b/lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
index 15a31201c565..5a6e94da594d 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
@@ -18,16 +18,18 @@ class PythonBreakpointCommandSettingTestCase(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@add_test_categories(['pyapi'])
+ @skipIfReproducer # side_effect bypasses reproducer
def test_step_out_python(self):
"""Test stepping out using a python breakpoint command."""
self.build()
self.do_set_python_command_from_python()
+ @skipIfReproducer # side_effect bypasses reproducer
def test_bkpt_cmd_bad_arguments(self):
"""Test what happens when pass structured data to a command:"""
self.build()
self.do_bad_args_to_python_command()
-
+
def setUp(self):
TestBase.setUp(self)
self.main_source = "main.c"
@@ -93,7 +95,7 @@ def do_set_python_command_from_python(self):
(error.GetCString()))
self.expect("command script import --allow-reload ./bktptcmd.py")
-
+
func_bkpt.SetScriptCallbackFunction("bktptcmd.function")
extra_args = lldb.SBStructuredData()
@@ -102,11 +104,11 @@ def do_set_python_command_from_python(self):
extra_args.SetFromJSON(stream)
error = fancy_bkpt.SetScriptCallbackFunction("bktptcmd.another_function", extra_args)
self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
-
+
stream.Clear()
stream.Print('{"side_effect" : "I am so much fancier"}')
extra_args.SetFromJSON(stream)
-
+
# Fancier's callback is set up from the command line
id = fancier_bkpt.GetID()
self.expect("breakpoint command add -F bktptcmd.a_third_function -k side_effect -v 'I am fancier' %d"%(id))
@@ -115,14 +117,14 @@ def do_set_python_command_from_python(self):
empty_args = lldb.SBStructuredData()
error = not_so_fancy_bkpt.SetScriptCallbackFunction("bktptcmd.empty_extra_args", empty_args)
self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
-
+
# Clear out canary variables
side_effect.bktptcmd = None
side_effect.callback = None
side_effect.fancy = None
side_effect.fancier = None
side_effect.not_so_fancy = None
-
+
# Now launch the process, and do not stop at entry point.
self.process = self.target.LaunchSimple(
None, None, self.get_process_working_directory())
@@ -157,7 +159,7 @@ def do_bad_args_to_python_command(self):
# Pass a breakpoint command function that doesn't take extra_args,
# but pass it extra args:
-
+
extra_args = lldb.SBStructuredData()
stream = lldb.SBStream()
stream.Print('{"side_effect" : "I am fancy"}')
@@ -171,4 +173,4 @@ def do_bad_args_to_python_command(self):
error = bkpt.SetScriptCallbackFunction("bktptcmd.nosuch_function", extra_args)
self.assertTrue(error.Fail(), "Can't pass extra args if the function doesn't exist.")
-
+
diff --git a/lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py b/lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
index 4c6f32b08964..afeccbef3bae 100644
--- a/lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
+++ b/lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
@@ -15,41 +15,47 @@ class BreakpointSerialization(TestBase):
NO_DEBUG_INFO_TESTCASE = True
@add_test_categories(['pyapi'])
+ @skipIfReproducer # side_effect bypasses reproducer
def test_resolvers(self):
"""Use Python APIs to test that we serialize resolvers."""
self.build()
self.setup_targets_and_cleanup()
self.do_check_resolvers()
+ @skipIfReproducer # side_effect bypasses reproducer
def test_filters(self):
"""Use Python APIs to test that we serialize search filters correctly."""
self.build()
self.setup_targets_and_cleanup()
self.do_check_filters()
+ @skipIfReproducer # side_effect bypasses reproducer
def test_options(self):
"""Use Python APIs to test that we serialize breakpoint options correctly."""
self.build()
self.setup_targets_and_cleanup()
self.do_check_options()
+ @skipIfReproducer # side_effect bypasses reproducer
def test_appending(self):
"""Use Python APIs to test that we serialize breakpoint options correctly."""
self.build()
self.setup_targets_and_cleanup()
self.do_check_appending()
+ @skipIfReproducer # side_effect bypasses reproducer
def test_name_filters(self):
"""Use python APIs to test that reading in by name works correctly."""
self.build()
self.setup_targets_and_cleanup()
self.do_check_names()
-
+
+ @skipIfReproducer # side_effect bypasses reproducer
def test_scripted_extra_args(self):
self.build()
self.setup_targets_and_cleanup()
self.do_check_extra_args()
-
+
def setup_targets_and_cleanup(self):
def cleanup ():
self.RemoveTempFile(self.bkpts_file_path)
@@ -328,13 +334,13 @@ def do_check_extra_args(self):
self.copy_target.DeleteAllBreakpoints()
# Now try one with extra args:
-
+
extra_args = lldb.SBStructuredData()
stream = lldb.SBStream()
stream.Print('{"first_arg" : "first_value", "second_arg" : "second_value"}')
extra_args.SetFromJSON(stream)
self.assertTrue(extra_args.IsValid(), "SBStructuredData is valid.")
-
+
bkpt = self.orig_target.BreakpointCreateFromScript("resolver.Resolver",
extra_args, lldb.SBFileSpecList(), lldb.SBFileSpecList())
self.assertTrue(bkpt.IsValid(), "Bkpt is valid")
More information about the lldb-commits
mailing list