Re: [Lldb-commits] [lldb] f939a32 - [lldb] Fix TestImportStdModule on some setups by testing minmax instead of abs
Would this fix https://bugs.llvm.org/show_bug.cgi?id=51446 by any chance? Should I give it a spin on the release branch? On Wed, 29 Sept 2021 at 17:04, Raphael Isemann via lldb-commits < lldb-commits@lists.llvm.org> wrote: > > Author: Raphael Isemann > Date: 2021-09-29T17:03:37+02:00 > New Revision: f939a32e5c483686af16561211d77c06a5579011 > > URL: > https://github.com/llvm/llvm-project/commit/f939a32e5c483686af16561211d77c06a5579011 > DIFF: > https://github.com/llvm/llvm-project/commit/f939a32e5c483686af16561211d77c06a5579011.diff > > LOG: [lldb] Fix TestImportStdModule on some setups by testing minmax > instead of abs > > Some downstream forks of LLDB change parts of the test setup in a way that > causes lldb to somehow resolve `std::abs` (probably to `::abs`). This patch > changes the tested function here to be `std::minmax` which (hopefully) > doesn't > have any identically named functions that LLDB could find and call. Just > to be > extra safe this also explicitly specified the template arguments so that in > case there is a `minmax` non-template function we still don't end up > calling it > from this test. > > Added: > > > Modified: > > lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > > Removed: > > > > > > diff --git > a/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > b/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > index c60e280dd65d6..695d00b08a0f5 100644 > --- > a/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > +++ > b/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > @@ -24,6 +24,8 @@ def test(self): > self.runCmd("settings set target.import-std-module true") > # Calling some normal std functions that return non-template > types. > self.expect_expr("std::abs(-42)", result_type="int", > result_value="42") > +self.expect_expr("std::minmax(1, 2).first", > result_type="const int", > +result_value="1") > self.expect_expr("std::div(2, 1).quot", > result_type="int", > result_value="2") > @@ -50,7 +52,7 @@ def test_non_cpp_language(self): > self.runCmd("settings set target.import-std-module true") > # These languages don't support C++ modules, so they shouldn't > # be able to evaluate the expression. > -self.expect("expr -l C -- std::abs(-42)", error=True) > -self.expect("expr -l C99 -- std::abs(-42)", error=True) > -self.expect("expr -l C11 -- std::abs(-42)", error=True) > -self.expect("expr -l ObjC -- std::abs(-42)", error=True) > +self.expect("expr -l C -- std::minmax(1, 2).first", > error=True) > +self.expect("expr -l C99 -- std::minmax(1, 2).first", > error=True) > +self.expect("expr -l C11 -- std::minmax(1, 2).first", > error=True) > +self.expect("expr -l ObjC -- std::minmax(1, 2).first", > error=True) > > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] f939a32 - [lldb] Fix TestImportStdModule on some setups by testing minmax instead of abs
Cool, thanks! On Thu, 30 Sept 2021 at 11:12, Raphael Isemann wrote: > I'm pretty sure this isn't going to fix that specific bug. I've seen a > similar failure on one of my machines though, so let me see if fixing > that also fixes your bug. > > Am Do., 30. Sept. 2021 um 10:48 Uhr schrieb Diana Picus > : > > > > Would this fix https://bugs.llvm.org/show_bug.cgi?id=51446 by any > chance? Should I give it a spin on the release branch? > > > > On Wed, 29 Sept 2021 at 17:04, Raphael Isemann via lldb-commits < > lldb-commits@lists.llvm.org> wrote: > >> > >> > >> Author: Raphael Isemann > >> Date: 2021-09-29T17:03:37+02:00 > >> New Revision: f939a32e5c483686af16561211d77c06a5579011 > >> > >> URL: > https://github.com/llvm/llvm-project/commit/f939a32e5c483686af16561211d77c06a5579011 > >> DIFF: > https://github.com/llvm/llvm-project/commit/f939a32e5c483686af16561211d77c06a5579011.diff > >> > >> LOG: [lldb] Fix TestImportStdModule on some setups by testing minmax > instead of abs > >> > >> Some downstream forks of LLDB change parts of the test setup in a way > that > >> causes lldb to somehow resolve `std::abs` (probably to `::abs`). This > patch > >> changes the tested function here to be `std::minmax` which (hopefully) > doesn't > >> have any identically named functions that LLDB could find and call. > Just to be > >> extra safe this also explicitly specified the template arguments so > that in > >> case there is a `minmax` non-template function we still don't end up > calling it > >> from this test. > >> > >> Added: > >> > >> > >> Modified: > >> > > lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > >> > >> Removed: > >> > >> > >> > >> > > >> diff --git > a/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > b/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > >> index c60e280dd65d6..695d00b08a0f5 100644 > >> --- > a/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > >> +++ > b/lldb/test/API/commands/expression/import-std-module/basic/TestImportStdModule.py > >> @@ -24,6 +24,8 @@ def test(self): > >> self.runCmd("settings set target.import-std-module true") > >> # Calling some normal std functions that return non-template > types. > >> self.expect_expr("std::abs(-42)", result_type="int", > result_value="42") > >> +self.expect_expr("std::minmax(1, 2).first", > result_type="const int", > >> +result_value="1") > >> self.expect_expr("std::div(2, 1).quot", > >> result_type="int", > >> result_value="2") > >> @@ -50,7 +52,7 @@ def test_non_cpp_language(self): > >> self.runCmd("settings set target.import-std-module true") > >> # These languages don't support C++ modules, so they shouldn't > >> # be able to evaluate the expression. > >> -self.expect("expr -l C -- std::abs(-42)", error=True) > >> -self.expect("expr -l C99 -- std::abs(-42)", error=True) > >> -self.expect("expr -l C11 -- std::abs(-42)", error=True) > >> -self.expect("expr -l ObjC -- std::abs(-42)", error=True) > >> +self.expect("expr -l C -- std::minmax(1, 2).first", > error=True) > >> +self.expect("expr -l C99 -- std::minmax(1, 2).first", > error=True) > >> +self.expect("expr -l C11 -- std::minmax(1, 2).first", > error=True) > >> +self.expect("expr -l ObjC -- std::minmax(1, 2).first", > error=True) > >> > >> > >> > >> ___ > >> lldb-commits mailing list > >> lldb-commits@lists.llvm.org > >> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits > ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] e03a06b - Fix typos in docs. NFC
Author: Diana Picus Date: 2019-11-14T12:11:57+01:00 New Revision: e03a06b348ba49d774aa948f97bce3fac638a797 URL: https://github.com/llvm/llvm-project/commit/e03a06b348ba49d774aa948f97bce3fac638a797 DIFF: https://github.com/llvm/llvm-project/commit/e03a06b348ba49d774aa948f97bce3fac638a797.diff LOG: Fix typos in docs. NFC Added: Modified: lldb/docs/resources/contributing.rst Removed: diff --git a/lldb/docs/resources/contributing.rst b/lldb/docs/resources/contributing.rst index 4305cdcaaf44..81171ec8524b 100644 --- a/lldb/docs/resources/contributing.rst +++ b/lldb/docs/resources/contributing.rst @@ -24,7 +24,7 @@ Policy in the following respects. folder on disk for examples. - **Coding Style**: LLDB's code style diff ers from LLVM's coding style. - Unfortunately there is no document describing the diff erent. Please be + Unfortunately there is no document describing the diff erences. Please be consistent with the existing code. For anything not explicitly listed here, assume that LLDB follows the LLVM @@ -61,7 +61,7 @@ rules of thumb: what allows us to refactor and evolve the LLDB code base. * Logging. LLDB provides a very rich logging API. When recoverable - errors cannot reasonably by surfaced to the end user, the error may + errors cannot reasonably be surfaced to the end user, the error may be written to a topical log channel. * Soft assertions. LLDB provides `lldb_assert()` as a soft ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] 5f0c3ba - Fix TestFormatters.py stepping too far
Author: Diana Picus Date: 2019-11-15T14:20:25+01:00 New Revision: 5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d URL: https://github.com/llvm/llvm-project/commit/5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d DIFF: https://github.com/llvm/llvm-project/commit/5f0c3bad2f03b9bba7f899d7b0ce667ca355f69d.diff LOG: Fix TestFormatters.py stepping too far TestFormatters.py has a sequence of three 'next' commands to get past all the initializations in the test function. On AArch64 (and potentially other platforms), this was one 'next' too many and we ended up outside our frame. This patch replaces the sequence with a 'thread until ' the line of the return from the function, so we should stop after all the initializations but before actually returning. Differential Revision: https://reviews.llvm.org/D70303 Added: Modified: lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp Removed: diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py index 011dabce6e9d..4d86ac5daa68 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py @@ -231,9 +231,8 @@ def cleanup(): 0) == 122, '*a_ptr = 122') -self.runCmd("n") -self.runCmd("n") -self.runCmd("n") +ret = line_number("main.cpp", "Done initializing") +self.runCmd("thread until " + str(ret)) self.expect("frame variable numbers", substrs=['1', '2', '3', '4', '5']) diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp index 1b8ce48041f9..4ca2504ff8cb 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char** argv) foo1.b.i = ; int numbers[5] = {1,2,3,4,5}; - - return 0; - + + return 0; // Done initializing + } ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] bb7c8e9 - Mark PR44037 tests as XFAIL on AArch64 Linux dwo
Author: Diana Picus Date: 2019-11-19T10:49:00+01:00 New Revision: bb7c8e984f87e1de7c80abd33d00025ac366efa6 URL: https://github.com/llvm/llvm-project/commit/bb7c8e984f87e1de7c80abd33d00025ac366efa6 DIFF: https://github.com/llvm/llvm-project/commit/bb7c8e984f87e1de7c80abd33d00025ac366efa6.diff LOG: Mark PR44037 tests as XFAIL on AArch64 Linux dwo These tests are failing with various assertion failures, but they all throw the following error message first: error: a.out 0x002d: adding range [0x14-0x24) which has a base that is less than the function's low PC 0x40060c. See llvm.org/pr44037. Differential Revision: https://reviews.llvm.org/D70381 Added: Modified: lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py Removed: diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py index 052b125143f2..1dc12e94eaf6 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py @@ -16,17 +16,26 @@ class BreakpointLocationsTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528") +@expectedFailureAll(archs=["aarch64"], oslist=["linux"], +debug_info=["dwo"], +bugnumber="llvm.org/pr44037") def test_enable(self): """Test breakpoint enable/disable for a breakpoint ID with multiple locations.""" self.build() self.breakpoint_locations_test() +@expectedFailureAll(archs=["aarch64"], oslist=["linux"], +debug_info=["dwo"], +bugnumber="llvm.org/pr44037") def test_shadowed_cond_options(self): """Test that options set on the breakpoint and location behave correctly.""" self.build() self.shadowed_bkpt_cond_test() +@expectedFailureAll(archs=["aarch64"], oslist=["linux"], +debug_info=["dwo"], +bugnumber="llvm.org/pr44037") def test_shadowed_command_options(self): """Test that options set on the breakpoint and location behave correctly.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py index 311c5ec8e120..1e829901cf11 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py +++ b/lldb/packages/Python/lldbsuite/test/lang/c/inlines/TestRedefinitionsInInlines.py @@ -6,4 +6,8 @@ [decorators.expectedFailureAll(compiler="clang", compiler_version=["<", "3.5"], - bugnumber="llvm.org/pr27845")]) + bugnumber="llvm.org/pr27845"), + decorators.expectedFailureAll(archs="aarch64", + oslist="linux", + debug_info="dwo", + bugnumber="llvm.org/pr44037")]) diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py b/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py index c07acf9c540d..ac964a35fecb 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py +++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py @@ -1,4 +1,5 @@ import lldb +from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * import lldbsuite.test.lldbutil as lldbutil @@ -7,6 +8,9 @@ class TestMembersAndLocalsWithSameName(TestBase): mydir = TestBase.compute_mydir(__file__) +@expectedFailureAll(archs=["aarch64"], oslist=["linux"], +debug_info=["dwo"
[Lldb-commits] [lldb] 6d18e53 - Mark some tests as xfail on AArch64 Linux
Author: Diana Picus Date: 2019-12-03T10:57:42+01:00 New Revision: 6d18e5366c9a0bffe45b179a830483b3f2ec9fa9 URL: https://github.com/llvm/llvm-project/commit/6d18e5366c9a0bffe45b179a830483b3f2ec9fa9 DIFF: https://github.com/llvm/llvm-project/commit/6d18e5366c9a0bffe45b179a830483b3f2ec9fa9.diff LOG: Mark some tests as xfail on AArch64 Linux I have either opened new bug reports for these tests, or added links to existing bugs. This should help make the lldb-aarch64-ubuntu buildbot green (there will still be some unexpected passes that someone should look into, but those can be handled later). Added: Modified: lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py Removed: diff --git a/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py b/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py index e350e6ef930f..61107077f9cf 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py +++ b/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py @@ -7,6 +7,8 @@ class StaticInitializers(TestBase): mydir = TestBase.compute_mydir(__file__) +@expectedFailureAll(archs="aarch64", oslist="linux", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44053";) def test(self): """ Test a static initializer. """ self.build() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py index 020974ee469a..4a571787f011 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py @@ -26,6 +26,8 @@ def test_breakpoint(self): self.assertTrue(breakpoint.IsHardware()) @skipIfWindows +@expectedFailureAll(archs="aarch64", oslist="linux", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055";) def test_step_range(self): """Test stepping when hardware breakpoints are required.""" self.build() @@ -47,6 +49,8 @@ def test_step_range(self): in error.GetCString()) @skipIfWindows +@expectedFailureAll(archs="aarch64", oslist="linux", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055";) def test_step_out(self): """Test stepping out when hardware breakpoints are required.""" self.build() @@ -67,6 +71,8 @@ def test_step_out(self): in error.GetCString()) @skipIfWindows +@expectedFailureAll(archs="aarch64", oslist="linux", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055";) def test_step_over(self): """Test stepping over when hardware breakpoints are required.""" self.build() @@ -85,6 +91,8 @@ def test_step_over(self): ]) @skipIfWindows +@expectedFailureAll(archs="aarch64", oslist="linux", + bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055";) def test_step_until(self): """Test stepping until when hardware breakpoints are required.""" self.build() diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py b/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py index a52cd4dd6865..ce4572361d93 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py @@ -18,6
[Lldb-commits] [lldb] 057626b - Fixup 6d18e53: xfail TestShowLocationDwarf5.py properly
Author: Diana Picus Date: 2019-12-03T11:53:28+01:00 New Revision: 057626b4393836e11712bd694afda121d8309973 URL: https://github.com/llvm/llvm-project/commit/057626b4393836e11712bd694afda121d8309973 DIFF: https://github.com/llvm/llvm-project/commit/057626b4393836e11712bd694afda121d8309973.diff LOG: Fixup 6d18e53: xfail TestShowLocationDwarf5.py properly Forgot to squash this... Added: Modified: lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py Removed: diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py b/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py index 2ceeed6a8f15..1d4bc6f13450 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py @@ -9,7 +9,7 @@ class TestTargetSourceMap(TestBase): mydir = TestBase.compute_mydir(__file__) -@skipIf(archs="aarch64", oslist="linux", debug_info="dwo", +@skipIf(archs="aarch64", oslist="linux", bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44180";) def test_source_map(self): # Set the target soure map to map "./" to the current test directory. ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits