@skipIfNoSBHeaders
@skipIfWindows # clang-cl does not support throw or catch (llvm.org/pr24538)
@expectedFlakeyFreeBSD
- @expectedFailureLinux
+ @expectedFailureAll(oslist=["linux"])
def test_sb_api_listener_resume(self):
""" Test that a process can be resumed from a non-main thread. """
self.build_and_test('driver.cpp listener_test.cpp test_listener_resume.cpp',
def expectedFailureFreeBSD(bugnumber=None, compilers=None, debug_info=None):
return expectedFailureOS(['freebsd'], bugnumber, compilers, debug_info=debug_info)
-def expectedFailureLinux(bugnumber=None, compilers=None, debug_info=None, archs=None):
- return expectedFailureOS(['linux'], bugnumber, compilers, debug_info=debug_info, archs=archs)
-
-def expectedFailureNetBSD(bugnumber=None, compilers=None, debug_info=None):
- return expectedFailureOS(['netbsd'], bugnumber, compilers, debug_info=debug_info)
-
def expectedFailureAndroid(bugnumber=None, api_levels=None, archs=None):
""" Mark a test as xfail for Android.
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
+ @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@skipUnlessCompilerRt
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureLinux # non-core functionality, need to reenable and fix later (DES 2014.11.07)
+ @expectedFailureAll(oslist=["linux"], bugnumber="non-core functionality, need to reenable and fix later (DES 2014.11.07)")
@skipIfFreeBSD # llvm.org/pr21136 runtimes not yet available by default
@skipIfRemote
@skipUnlessCompilerRt
@skipIfRemote # test not remote-ready llvm.org/pr24813
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
- @expectedFailureLinux("llvm.org/pr26139")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr26139")
def test_command_script_immediate_output (self):
"""Test that LLDB correctly allows scripted commands to set an immediate output file."""
self.launch(timeout=5)
@skipIfWindows # libc++ not ported to Windows yet
@skipIf(compiler="gcc")
- @expectedFailureLinux # fails on clang 3.5 and tot
+ @expectedFailureAll(oslist=["linux"], bugnumber="fails on clang 3.5 and tot")
def test(self):
"""Test that that file and class static variables display correctly."""
self.build()
mydir = TestBase.compute_mydir(__file__)
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- @expectedFailureLinux("llvm.org/pr25338", archs=['arm'])
+ @expectedFailureAll(oslist=["linux"], archs=["arm"], bugnumber="llvm.org/pr25338")
def test_inferior_asserting(self):
"""Test that lldb reliably catches the inferior asserting (command)."""
self.build()
self.inferior_asserting_registers()
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm'])
+ @expectedFailureAll(oslist=["linux"], archs=["aarch64", "arm"], bugnumber="llvm.org/pr25338")
def test_inferior_asserting_disassemble(self):
"""Test that lldb reliably disassembles frames after asserting (command)."""
self.build()
self.inferior_asserting_python()
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm'])
+ @expectedFailureAll(oslist=["linux"], archs=["aarch64", "arm"], bugnumber="llvm.org/pr25338")
def test_inferior_asserting_expr(self):
"""Test that the lldb expression interpreter can read from the inferior after asserting (command)."""
self.build()
self.inferior_asserting_expr()
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
- @expectedFailureLinux("llvm.org/pr25338", archs=['aarch64', 'arm'])
+ @expectedFailureAll(oslist=["linux"], archs=["aarch64", "arm"], bugnumber="llvm.org/pr25338")
def test_inferior_asserting_step(self):
"""Test that lldb functions correctly after stepping through a call to assert()."""
self.build()
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureFreeBSD("llvm.org/pr22627 process launch w/ shell expansion not working")
- @expectedFailureLinux("llvm.org/pr22627 process launch w/ shell expansion not working")
- @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+ @expectedFailureAll(oslist=["windows", "linux", "freebsd"], bugnumber="llvm.org/pr24778 llvm.org/pr22627")
def test(self):
self.build()
exe = os.path.join (os.getcwd(), "a.out")
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
- @expectedFailureLinux("llvm.org/pr20231")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_step_out(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out."""
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
- @expectedFailureLinux("llvm.org/pr20231")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_step_over(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-over a longjmp."""
@skipIfDarwin # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
@skipIfFreeBSD # llvm.org/pr17214
- @expectedFailureLinux("llvm.org/pr20231")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_step_back_out(self):
"""Test stepping when the inferior calls setjmp/longjmp, in particular, thread step-out after thread step-in."""
# rdar://problem/9056462
# The process launch flag '-w' for setting the current working directory not working?
@not_remote_testsuite_ready
- @expectedFailureLinux("llvm.org/pr20265")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
def test_set_working_dir (self):
"""Test that '-w dir' sets the working dir when running the inferior."""
d = {'CXX_SOURCES' : 'print_cwd.cpp'}
import os
import lldb
import re
+from lldbsuite.test.lldbplatformutil import getDarwinOSTriples
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
# reset signal handling to default
self.set_handle(signal, default_pass, default_stop, default_notify)
- @expectedFailureLinux("llvm.org/pr24530") # the signal the inferior generates gets lost
- @expectedFailureDarwin("llvm.org/pr24530") # the signal the inferior generates gets lost
+ @expectedFailureAll(oslist=["linux"]+getDarwinOSTriples(), bugnumber="llvm.org/pr20231")
def test_restart_bug(self):
"""Test that we catch a signal in the edge case where the process receives it while we are
about to interrupt it"""
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
def test(self):
"""Test breakpoint handling after a thread join."""
self.build(dictionary=self.getBuildFlags())
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test_step_inst(self):
"""Test thread creation during step-inst handling."""
self.build(dictionary=self.getBuildFlags())
self.create_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test_step_over(self):
"""Test thread creation during step-over handling."""
self.build(dictionary=self.getBuildFlags())
self.create_during_step_base("thread step-over -m all-threads", 'stop reason = step over')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test_step_in(self):
"""Test thread creation during step-in handling."""
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test(self):
"""Test thread exit during breakpoint handling."""
# Find the line number for our breakpoint.
self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
- @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
- @expectedFailureFreeBSD("llvm.org/pr18190") # thread states not properly maintained
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
def test(self):
"""Test simultaneous breakpoints in multiple threads."""
mydir = TestBase.compute_mydir(__file__)
- @expectedFailureDarwin("rdar://15367566")
- @expectedFailureFreeBSD('llvm.org/pr15824')
- @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr15824 thread states not properly maintained")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18190 thread states not properly maintained")
def test_state_after_breakpoint(self):
"""Test thread state after breakpoint."""
self.build(dictionary=self.getBuildFlags(use_cpp11=False))
self.thread_state_after_breakpoint_test()
@skipIfDarwin # 'llvm.org/pr23669', cause Python crash randomly
- @expectedFailureDarwin('llvm.org/pr23669')
- @expectedFailureFreeBSD('llvm.org/pr15824')
+ @expectedFailureAll(oslist=lldbplatformutil.getDarwinOSTriples(), bugnumber="llvm.org/pr23669")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr15824")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24660")
def test_state_after_continue(self):
"""Test thread state after continue."""
mydir = TestBase.compute_mydir(__file__)
@skipIfLinux # Test occasionally times out on the Linux build bot
- @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
- @expectedFailureFreeBSD("llvm.org/pr18066") # inferior does not exit
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr18066 inferior does not exit")
@expectedFailureAll(oslist=["windows"])
def test_step_single_thread(self):
"""Test thread step out on one thread via command interpreter. """
self.step_out_test(self.step_out_single_thread_with_cmd)
@skipIfLinux # Test occasionally times out on the Linux build bot
- @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
- @expectedFailureFreeBSD("llvm.org/pr19347") # 2nd thread stops at breakpoint
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
@expectedFailureAll(oslist=["windows"])
def test_step_all_threads(self):
"""Test thread step out on all threads via command interpreter. """
self.step_out_test(self.step_out_all_threads_with_cmd)
@skipIfLinux # Test occasionally times out on the Linux build bot
- @expectedFailureLinux("llvm.org/pr23477") # Test occasionally times out on the Linux build bot
- @expectedFailureFreeBSD("llvm.org/pr19347")
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23477 Test occasionally times out on the Linux build bot")
+ @expectedFailureAll(oslist=["freebsd"], bugnumber="llvm.org/pr19347 2nd thread stops at breakpoint")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24681")
def test_python(self):
"""Test thread step out on one thread via Python API (dwarf)."""
return ['basic_process']
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureLinux(bugnumber="llvm.org/pr26031", archs=['aarch64', 'arm'])
+ @expectedFailureAll(oslist=["linux"], archs=['aarch64', 'arm'], bugnumber="llvm.org/pr26031")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
def test(self):
"""Test stepping over watchpoints."""
# Build dictionary to have unique executable names for each test method.
@expectedFailureAndroid(archs=['arm', 'aarch64']) # Watchpoints not supported
- @expectedFailureLinux(bugnumber="llvm.org/pr26031", archs=['aarch64', 'arm'])
+ @expectedFailureAll(oslist=["linux"], archs=['aarch64', 'arm'], bugnumber="llvm.org/pr26031")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
def test_watchlocation_using_watchpoint_set(self):
"""Test watching a location with 'watchpoint set expression -w write -s size' option."""
@skipIfFreeBSD
@expectedFailureDarwin('http://llvm.org/pr24302')
- @expectedFailureLinux('http://llvm.org/pr23456') # 'fopen' has unknown return type
+ @expectedFailureAll(oslist=["linux"], archs=['aarch64', 'arm'], bugnumber="http://llvm.org/pr23456 'fopen' has unknown return type")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
def test_expr(self):
if platform.system() == "Darwin" and platform.release() < StrictVersion('12.0.0'):
@add_test_categories(['pyapi'])
@expectedFailureFreeBSD('llvm.org/pr17932')
- @expectedFailureLinux # llvm.org/pr14437
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr14437")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24777")
def test_and_python_api(self):
"""Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
self.line = line_number('main.c', '// Find the line number of function "c" here.')
@add_test_categories(['pyapi'])
- @expectedFailureLinux("llvm.org/pr23730") # Flaky, fails ~1/10 cases
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23730 Flaky, fails ~1/10 cases")
def test_listen_for_and_print_event(self):
"""Exercise SBEvent API."""
self.build()
@skipIfFreeBSD # llvm.org/pr21325
@add_test_categories(['pyapi'])
- @expectedFailureLinux("llvm.org/pr23617") # Flaky, fails ~1/10 cases
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr23617 Flaky, fails ~1/10 cases")
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
def test_add_listener_to_broadcaster(self):
"""Exercise some SBBroadcaster APIs."""
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureLinux # Failing in ~11/600 dosep runs (build 3120-3122)
+ @expectedFailureAll(oslist=["linux"], bugnumber="Failing in ~11/600 dosep runs (build 3120-3122)")
def test_lldbmi_gdb_set_target_async_off(self):
"""Test that 'lldb-mi --interpreter' can execute commands in sync mode."""
@skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureLinux # llvm.org/pr25000: lldb-mi does not receive broadcasted notification from Core/Process about process stopped
+ @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr25000: lldb-mi does not receive broadcasted notification from Core/Process about process stopped")
def test_lldbmi_exec_run(self):
"""Test that 'lldb-mi --interpreter' can stop at entry."""
@skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureLinux # Failing in ~9/600 dosep runs (build 3120-3122)
+ @expectedFailureAll(oslist=["linux"], bugnumber="Failing in ~9/600 dosep runs (build 3120-3122)")
def test_lldbmi_settings_set_target_run_args_after(self):
"""Test that 'lldb-mi --interpreter' can set target arguments by 'setting set target.run-args' command after than target was created."""
@skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureLinux # new failure after r256863
+ @expectedFailureAll(oslist=["linux"], bugnumber="new failure after r256863")
def test_lldbmi_symbol_list_lines_file(self):
"""Test that 'lldb-mi --interpreter' works for -symbol-list-lines when file exists."""
@skipIfWindows #llvm.org/pr24452: Get lldb-mi tests working on Windows
@skipIfFreeBSD # llvm.org/pr22411: Failure presumably due to known thread races
- @expectedFailureLinux # Failing in ~6/600 dosep runs (build 3120-3122)
+ @expectedFailureAll(oslist=["linux"], bugnumber="Failing in ~6/600 dosep runs (build 3120-3122)")
def test_lldbmi_process_output(self):
"""Test that 'lldb-mi --interpreter' wraps process output correctly."""
@llgs_test
@expectedFailureAndroid(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
- @expectedFailureLinux(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
+ @expectedFailureAll(oslist=["linux"], archs=["arm", "aarch64"], bugnumber="llvm.org/pr24739")
def test_single_step_only_steps_one_instruction_with_s_llgs(self):
self.init_llgs_test()
self.build()
@llgs_test
@expectedFailureAndroid(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
- @expectedFailureLinux(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
+ @expectedFailureAll(oslist=["linux"], archs=["arm", "aarch64"], bugnumber="llvm.org/pr24739")
def test_single_step_only_steps_one_instruction_with_Hc_vCont_s_llgs(self):
self.init_llgs_test()
self.build()
@llgs_test
@expectedFailureAndroid(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
- @expectedFailureLinux(bugnumber="llvm.org/pr24739", archs=["arm", "aarch64"])
+ @expectedFailureAll(oslist=["linux"], archs=["arm", "aarch64"], bugnumber="llvm.org/pr24739")
def test_single_step_only_steps_one_instruction_with_vCont_s_thread_llgs(self):
self.init_llgs_test()
self.build()