[Lldb-commits] [lldb] r355774 - [lldb] [test] Adjust XFAIL list to match buildbot results
Author: mgorny Date: Sat Mar 9 04:47:38 2019 New Revision: 355774 URL: http://llvm.org/viewvc/llvm-project?rev=355774&view=rev Log: [lldb] [test] Adjust XFAIL list to match buildbot results Adjust the XFAIL-ing tests to match consistent results from buildbot. I'm going to work on differences between them and my local results following this. Modified: lldb/trunk/lit/SymbolFile/DWARF/debug-line-basic.s lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s lldb/trunk/lit/SymbolFile/DWARF/dir-separator-posix.s lldb/trunk/lit/SymbolFile/DWARF/dir-separator-windows.s lldb/trunk/lit/SymbolFile/DWARF/find-inline-method.s lldb/trunk/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py lldb/trunk/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py lldb/trunk/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py Modified: lldb/trunk/lit/SymbolFile/DWARF/debug-line-basic.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/debug-line-basic.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/debug-line-basic.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/debug-line-basic.s Sat Mar 9 04:47:38 2019 @@ -1,5 +1,4 @@ # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s Sat Mar 9 04:47:38 2019 @@ -3,7 +3,6 @@ # style, so we will just treat them as native host paths. # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s Sat Mar 9 04:47:38 2019 @@ -2,7 +2,6 @@ # compile unit does not have a DW_AT_comp_dir attribute. # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/lit/SymbolFile/DWARF/dir-separator-posix.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/dir-separator-posix.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/dir-separator-posix.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/dir-separator-posix.s Sat Mar 9 04:47:38 2019 @@ -2,7 +2,6 @@ # separator does not match the separator of the compile unit. # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/lit/SymbolFile/DWARF/dir-separator-windows.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/dir-separator-windows.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/dir-separator-windows.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/dir-separator-windows.s Sat Mar 9 04:47:38 2019 @@ -2,7 +2,6 @@ # separator does not match the separator of the compile unit. # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/lit/SymbolFile/DWARF/find-inline-method.s URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/SymbolFile/DWARF/find-inline-method.s?rev=355774&r1=355773&r2=355774&view=diff == --- lldb/trunk/lit/SymbolFile/DWARF/find-inline-method.s (original) +++ lldb/trunk/lit/SymbolFile/DWARF/find-inline-method.s Sat Mar 9 04:47:38 2019 @@ -1,5 +1,4 @@ # REQUIRES: lld -# XFAIL: system-netbsd # RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o # RUN: ld.lld %t.o -o %t Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Pyth
[Lldb-commits] [PATCH] D59177: [lldb] [test] Make 2lwp_process_SIGSEGV test more portable
mgorny created this revision. mgorny added reviewers: labath, krytarowski. Herald added a subscriber: abidh. Herald added a reviewer: serge-sans-paille. Herald added a project: LLDB. Fix 2lwp_process_SIGSEGV NetBSD core test to terminate inside regular function rather than libc call, in order to get reproducible backtrace on different platforms. Repository: rLLDB LLDB https://reviews.llvm.org/D59177 Files: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64 lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.amd64.core lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py Index: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py === --- lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py +++ lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py @@ -206,11 +206,10 @@ thread = process.GetSelectedThread() self.assertTrue(thread) self.assertEqual(thread.GetThreadID(), 2) -self.assertEqual(thread.GetThreadID(), 2) self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal) self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV) -backtrace = ["_kill", "bar", "foo", "lwp_main"] +backtrace = ["bar", "foo", "lwp_main"] self.check_backtrace(thread, filename, backtrace) # thread 1 should have the same signal @@ -219,8 +218,7 @@ self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV) -@skipIf # TODO: fails with non-netbsd libc @skipIfLLVMTargetMissing("X86") def test_amd64(self): """Test double-threaded amd64 core dump where process is signalled.""" -self.do_test("2lwp_process_SIGSEGV.amd64", pid=141, region_count=24) +self.do_test("2lwp_process_SIGSEGV.amd64", pid=665, region_count=24) Index: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c === --- lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c +++ lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c @@ -6,7 +6,7 @@ static void bar() { char F = 'b'; - kill(getpid(), SIGSEGV); // Frame bar + while (1); // Frame bar } static void foo(void (*boomer)()) { @@ -28,5 +28,7 @@ stack = malloc(ssize); _lwp_makecontext(&uc, lwp_main, NULL, NULL, stack, ssize); _lwp_create(&uc, 0, &lid); + sleep(1); + kill(getpid(), SIGSEGV); _lwp_wait(lid, NULL); } Index: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py === --- lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py +++ lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py @@ -206,11 +206,10 @@ thread = process.GetSelectedThread() self.assertTrue(thread) self.assertEqual(thread.GetThreadID(), 2) -self.assertEqual(thread.GetThreadID(), 2) self.assertEqual(thread.GetStopReason(), lldb.eStopReasonSignal) self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV) -backtrace = ["_kill", "bar", "foo", "lwp_main"] +backtrace = ["bar", "foo", "lwp_main"] self.check_backtrace(thread, filename, backtrace) # thread 1 should have the same signal @@ -219,8 +218,7 @@ self.assertEqual(thread.GetStopReasonDataCount(), 1) self.assertEqual(thread.GetStopReasonDataAtIndex(0), signal.SIGSEGV) -@skipIf # TODO: fails with non-netbsd libc @skipIfLLVMTargetMissing("X86") def test_amd64(self): """Test double-threaded amd64 core dump where process is signalled.""" -self.do_test("2lwp_process_SIGSEGV.amd64", pid=141, region_count=24) +self.do_test("2lwp_process_SIGSEGV.amd64", pid=665, region_count=24) Index: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c === --- lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c +++ lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c @@ -6,7 +6,7 @@ static v
[Lldb-commits] [PATCH] D59177: [lldb] [test] Make 2lwp_process_SIGSEGV test more portable
krytarowski added inline comments. Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c:9 char F = 'b'; - kill(getpid(), SIGSEGV); // Frame bar + while (1); // Frame bar } Just style, but I would use `while (1) continue;` Comment at: lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/2lwp_process_SIGSEGV.c:31 _lwp_create(&uc, 0, &lid); + sleep(1); + kill(getpid(), SIGSEGV); It's a style but I would replace `sleep(1)` with a global volatile int that is switched in `bar` and here we could wait with: `while (!initialized) continue;` Repository: rLLDB LLDB CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59177/new/ https://reviews.llvm.org/D59177 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D58125: Add ability to import std module into expression parser to improve C++ debugging
teemperor updated this revision to Diff 189995. teemperor added a comment. - Addressed Pavel's comments (thanks!). - Reworked test setup code (thanks Adrian!) - Rebased the patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58125/new/ https://reviews.llvm.org/D58125 Files: lldb/include/lldb/Expression/ExpressionSourceCode.h lldb/include/lldb/Target/Platform.h lldb/include/lldb/Target/Target.h lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h lldb/packages/Python/lldbsuite/test/make/Makefile.rules lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.cpp lldb/source/Plugins/ExpressionParser/Clang/ASTUtils.h lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp lldb/source/Plugins/Platform/Linux/PlatformLinux.h lldb/source/Target/Target.cpp Index: lldb/source/Target/Target.cpp === --- lldb/source/Target/Target.cpp +++ lldb/source/Target/Target.cpp @@ -3327,6 +3327,9 @@ {"auto-import-clang-modules", OptionValue::eTypeBoolean, false, true, nullptr, {}, "Automatically load Clang modules referred to by the program."}, +{"import-std-module", OptionValue::eTypeBoolean, false, false, + nullptr, {}, + "Import the C++ std module to improve debugging STL containers."}, {"auto-apply-fixits", OptionValue::eTypeBoolean, false, true, nullptr, {}, "Automatically apply fix-it hints to expressions."}, {"notify-about-fixits", OptionValue::eTypeBoolean, false, true, nullptr, @@ -3465,6 +3468,7 @@ ePropertyDebugFileSearchPaths, ePropertyClangModuleSearchPaths, ePropertyAutoImportClangModules, + ePropertyImportStdModule, ePropertyAutoApplyFixIts, ePropertyNotifyAboutFixIts, ePropertySaveObjects, @@ -3887,6 +3891,12 @@ nullptr, idx, g_properties[idx].default_uint_value != 0); } +bool TargetProperties::GetEnableImportStdModule() const { + const uint32_t idx = ePropertyImportStdModule; + return m_collection_sp->GetPropertyAtIndexAsBoolean( + nullptr, idx, g_properties[idx].default_uint_value != 0); +} + bool TargetProperties::GetEnableAutoApplyFixIts() const { const uint32_t idx = ePropertyAutoApplyFixIts; return m_collection_sp->GetPropertyAtIndexAsBoolean( Index: lldb/source/Plugins/Platform/Linux/PlatformLinux.h === --- lldb/source/Plugins/Platform/Linux/PlatformLinux.h +++ lldb/source/Plugins/Platform/Linux/PlatformLinux.h @@ -52,6 +52,9 @@ bool CanDebugProcess() override; + std::vector + GetSystemIncludeDirectories(lldb::LanguageType lang) override; + lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info, Debugger &debugger, Target *target, Status &error) override; Index: lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp === --- lldb/source/Plugins/Platform/Linux/PlatformLinux