<commit_before>"""
Test calling a function that waits a while, and make sure the timeout option to expr works.
"""

from __future__ import print_function



import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *

class ExprCommandWithTimeoutsTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)

        self.main_source = "wait-a-while.cpp"
        self.main_source_spec = lldb.SBFileSpec (self.main_source)


    @expectedFlakeyFreeBSD("llvm.org/pr19605")
    @expectedFlakeyLinux("llvm.org/pr20275")
    @expectedFailureWindows("llvm.org/pr21765")
    def test(self):
        """Test calling std::String member function."""
        self.build()

        exe_name = "a.out"
        exe = os.path.join(os.getcwd(), exe_name)

        target = self.dbg.CreateTarget(exe)
        self.assertTrue(target, VALID_TARGET)

        breakpoint = target.BreakpointCreateBySourceRegex('stop here in main.',self.main_source_spec)
        self.assertTrue(breakpoint, VALID_BREAKPOINT)
        self.runCmd("breakpoint list")

        # Launch the process, and do not stop at the entry point.
        process = target.LaunchSimple (None, None, self.get_process_working_directory())

        self.assertTrue(process, PROCESS_IS_VALID)

        # Frame #0 should be on self.step_out_of_malloc.
        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)<commit_msg>Remove flaky annotation for TestCallWithTimeout on linux<commit_after>"""
Test calling a function that waits a while, and make sure the timeout option to expr works.
"""

from __future__ import print_function



import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *

class ExprCommandWithTimeoutsTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)

        self.main_source = "wait-a-while.cpp"
        self.main_source_spec = lldb.SBFileSpec (self.main_source)


    @expectedFlakeyFreeBSD("llvm.org/pr19605")
    @expectedFailureWindows("llvm.org/pr21765")
    def test(self):
        """Test calling std::String member function."""
        self.build()

        exe_name = "a.out"
        exe = os.path.join(os.getcwd(), exe_name)

        target = self.dbg.CreateTarget(exe)
        self.assertTrue(target, VALID_TARGET)

        breakpoint = target.BreakpointCreateBySourceRegex('stop here in main.',self.main_source_spec)
        self.assertTrue(breakpoint, VALID_BREAKPOINT)
        self.runCmd("breakpoint list")

        # Launch the process, and do not stop at the entry point.
        process = target.LaunchSimple (None, None, self.get_process_working_directory())

        self.assertTrue(process, PROCESS_IS_VALID)

        # Frame #0 should be on self.step_out_of_malloc.
        threads = lldbutil.get_threads_stopped_at_breakpoint (process, breakpoint)
{'fraction_non_alphanumeric': 0.09594953519256308, 'fraction_numerical': 0.008964143426294821, 'mean_word_length': 3.404970760233918, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4943526', 'n_tokens_mistral': 982, 'n_tokens_neox': 926, 'n_words': 210}