<commit_before>"""
Test number of threads.
"""

import os, time
import unittest2
import lldb
from lldbtest import *
import lldbutil

class ExitDuringStepTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    @skipUnlessDarwin
    @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
    @dsym_test
    def test_thread_state_is_stopped_with_dsym(self):
        """Test thread exit during step handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.thread_state_is_stopped()

    @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
    @dwarf_test
    def test_thread_state_is_stopped_with_dwarf(self):
        """Test thread exit during step handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.thread_state_is_stopped()

    @skipUnlessDarwin
    @dsym_test
    def test_with_dsym(self):
        """Test thread exit during step handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_inst_test()

    @skipUnlessDarwin
    @dsym_test
    def test_step_over_with_dsym(self):
        """Test thread exit during step-over handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_over_test()

    @skipUnlessDarwin
    @dsym_test
    def test_step_in_with_dsym(self):
        """Test thread exit during step-in handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_in_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @dwarf_test
    def test_with_dwarf(self):
        """Test thread exit during step handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_inst_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
    @dwarf_test
    def test_step_over_with_dwarf(self):
        """Test thread exit during step-over handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_over_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @expectedFailureLinux("llvm.org/pr15824") # thread states not properly maintained
    @dwarf_test
    def test_step_in_with_dwarf(self):
        """Test thread exit during step-in handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_in_test()

    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)
        # Find the line numbers to break and continue.
        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
        self.continuepoint = line_number('main.cpp', '// Continue from here')

    def exit_during_step_inst_test(self):
        """Test thread exit while using step-inst."""
        self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False)
<commit_msg>Enable a couple of tests in TestExitDuringStep on linux<commit_after>"""
Test number of threads.
"""

import os, time
import unittest2
import lldb
from lldbtest import *
import lldbutil

class ExitDuringStepTestCase(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    @skipUnlessDarwin
    @expectedFailureDarwin("llvm.org/pr15824") # thread states not properly maintained
    @dsym_test
    def test_thread_state_is_stopped_with_dsym(self):
        """Test thread exit during step handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.thread_state_is_stopped()

    @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
    @dwarf_test
    def test_thread_state_is_stopped_with_dwarf(self):
        """Test thread exit during step handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.thread_state_is_stopped()

    @skipUnlessDarwin
    @dsym_test
    def test_with_dsym(self):
        """Test thread exit during step handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_inst_test()

    @skipUnlessDarwin
    @dsym_test
    def test_step_over_with_dsym(self):
        """Test thread exit during step-over handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_over_test()

    @skipUnlessDarwin
    @dsym_test
    def test_step_in_with_dsym(self):
        """Test thread exit during step-in handling."""
        self.buildDsym(dictionary=self.getBuildFlags())
        self.exit_during_step_in_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @dwarf_test
    def test_with_dwarf(self):
        """Test thread exit during step handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_inst_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @dwarf_test
    def test_step_over_with_dwarf(self):
        """Test thread exit during step-over handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_over_test()

    @skipIfFreeBSD # llvm.org/pr21411: test is hanging
    @dwarf_test
    def test_step_in_with_dwarf(self):
        """Test thread exit during step-in handling."""
        self.buildDwarf(dictionary=self.getBuildFlags())
        self.exit_during_step_in_test()

    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)
        # Find the line numbers to break and continue.
        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
        self.continuepoint = line_number('main.cpp', '// Continue from here')

    def exit_during_step_inst_test(self):
        """Test thread exit while using step-inst."""
        self.exit_during_step_base("thread step-inst -m all-threads", 'stop reason = instruction step', False)

{'fraction_non_alphanumeric': 0.09977542508822586, 'fraction_numerical': 0.01315367340391402, 'mean_word_length': 3.6014760147601477, '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': '5629118', 'n_tokens_mistral': 1994, 'n_tokens_neox': 1855, 'n_words': 406}