Skip to content

Commit cdc38c9

Browse files
committed
[lldb] Skip parts of TestCallOverriddenMethod.py on Linux
The function call and the constructor call fail now several Linux bots (Swift CI, my own bot and Stella's Debian system), so let's disable the relevant test parts until we can figure out why it is failing.
1 parent 7dddfa2 commit cdc38c9

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def setUp(self):
2626
# Find the line number to break for main.c.
2727
self.line = line_number('main.cpp', '// Set breakpoint here')
2828

29-
def test(self):
29+
def test_call_on_base(self):
3030
"""Test calls to overridden methods in derived classes."""
3131
self.build()
3232

@@ -42,14 +42,28 @@ def test(self):
4242
# class method is never an override).
4343
self.expect("expr b->foo()", substrs=["2"])
4444

45+
# Test calling the base class.
46+
self.expect("expr realbase.foo()", substrs=["1"])
47+
48+
@skipIfLinux # Returns wrong result code on some platforms.
49+
def test_call_on_derived(self):
50+
"""Test calls to overridden methods in derived classes."""
51+
self.build()
52+
53+
# Set breakpoint in main and run exe
54+
self.runCmd("file " + self.getBuildArtifact("a.out"),
55+
CURRENT_EXECUTABLE_SET)
56+
lldbutil.run_break_set_by_file_and_line(
57+
self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
58+
59+
self.runCmd("run", RUN_SUCCEEDED)
60+
4561
# Test call to overridden method in derived class (this will fail if the
4662
# overrides table is not correctly set up, as Derived::foo will be assigned
4763
# a vtable entry that does not exist in the compiled program).
4864
self.expect("expr d.foo()", substrs=["2"])
4965

50-
# Test calling the base class.
51-
self.expect("expr realbase.foo()", substrs=["1"])
52-
66+
@skipIfLinux # Calling constructor causes SIGABRT
5367
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr43707")
5468
def test_call_on_temporary(self):
5569
"""Test calls to overridden methods in derived classes."""

0 commit comments

Comments
 (0)