[X86] Use NSW/NUW flags on ISD::TRUNCATE nodes to improve X86 PACKSS/PACKUS lowering...
[llvm-project.git] / lldb / test / API / tools / lldb-server / commandline / TestStubSetSID.py
blob41bed72b5618958dc176b4ad7166670590a4296b
1 import gdbremote_testcase
2 import lldbgdbserverutils
3 import os
4 import select
5 from lldbsuite.test.decorators import *
6 from lldbsuite.test.lldbtest import *
7 from lldbsuite.test import lldbutil
10 class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase):
11 def get_stub_sid(self, extra_stub_args=None):
12 # Launch debugserver
13 if extra_stub_args:
14 self.debug_monitor_extra_args += extra_stub_args
16 server = self.launch_debug_monitor()
17 self.assertIsNotNone(server)
18 self.assertTrue(lldbgdbserverutils.process_is_running(server.pid, True))
20 # Get the process id for the stub.
21 return os.getsid(server.pid)
23 @skipIfWindows
24 @skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
25 def test_sid_is_same_without_setsid(self):
26 self.set_inferior_startup_launch()
28 stub_sid = self.get_stub_sid()
29 self.assertEqual(stub_sid, os.getsid(0))
31 @skipIfWindows
32 @skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
33 def test_sid_is_different_with_setsid(self):
34 self.set_inferior_startup_launch()
36 stub_sid = self.get_stub_sid(["--setsid"])
37 self.assertNotEqual(stub_sid, os.getsid(0))
39 @skipIfWindows
40 @skipIfRemote # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
41 def test_sid_is_different_with_S_llgs(self):
42 self.set_inferior_startup_launch()
44 stub_sid = self.get_stub_sid(["-S"])
45 self.assertNotEqual(stub_sid, os.getsid(0))