d53fc5220782f20ec58e7d91aa8281f17b4c5802
[openbsd] /
1 """
2 Test calling user defined functions using expression evaluation.
3 This test checks that typesystem lookup works correctly for typedefs of
4 untagged structures.
5
6 Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
7 """
8
9
10 import lldb
11
12 from lldbsuite.test.decorators import *
13 from lldbsuite.test.lldbtest import *
14 from lldbsuite.test import lldbutil
15
16
17 class TestExprLookupAnonStructTypedef(TestBase):
18     mydir = TestBase.compute_mydir(__file__)
19
20     def setUp(self):
21         TestBase.setUp(self)
22         # Find the breakpoint
23         self.line = line_number('main.cpp', '// lldb testsuite break')
24
25     @expectedFailureAll(
26         oslist=['linux'],
27         archs=['arm'],
28         bugnumber="llvm.org/pr27868")
29     def test(self):
30         """Test typedeffed untagged struct arguments for function call expressions"""
31         self.build()
32
33         self.runCmd("file "+self.getBuildArtifact("a.out"),
34                     CURRENT_EXECUTABLE_SET)
35         lldbutil.run_break_set_by_file_and_line(
36             self,
37             "main.cpp",
38             self.line,
39             num_expected_locations=-1,
40             loc_exact=True
41         )
42
43         self.runCmd("run", RUN_SUCCEEDED)
44         self.expect("expr multiply(&s)", substrs=['$0 = 1'])