Index: test/dotest.py =================================================================== --- test/dotest.py +++ test/dotest.py @@ -361,13 +361,13 @@ def unique_string_match(yourentry,list): - candidate = None - for item in list: - if item.startswith(yourentry): - if candidate: - return None - candidate = item - return candidate + candidate = None + for item in list: + if item.startswith(yourentry): + if candidate: + return None + candidate = item + return candidate def validate_categories(categories): """For each category in categories, ensure that it's a valid category (or a prefix thereof). @@ -606,8 +606,8 @@ if args.d: sys.stdout.write("Suspending the process %d to wait for debugger to attach...\n" % os.getpid()) - sys.stdout.flush() - os.kill(os.getpid(), signal.SIGSTOP) + sys.stdout.flush() + os.kill(os.getpid(), lldbutil.get_signal_number('SIGSTOP')) if args.e: if args.e.startswith('-'): @@ -1014,7 +1014,7 @@ lldb_dash_p_result = subprocess.check_output([lldbtest_config.lldbExec, "-P"], stderr=subprocess.STDOUT) if lldb_dash_p_result and not lldb_dash_p_result.startswith(("<", "lldb: invalid option:")) \ - and not lldb_dash_p_result.startswith("Traceback"): + and not lldb_dash_p_result.startswith("Traceback"): lines = lldb_dash_p_result.splitlines() # Workaround for readline vs libedit issue on FreeBSD. If stdout Index: test/functionalities/process_group/TestChangeProcessGroup.py =================================================================== --- test/functionalities/process_group/TestChangeProcessGroup.py +++ test/functionalities/process_group/TestChangeProcessGroup.py @@ -73,7 +73,7 @@ lldb.remote_platform.Kill(int(pid)) else: if os.path.exists("/proc/" + pid): - os.kill(int(pid), signal.SIGKILL) + os.kill(int(pid), lldbutil.get_signal_number('SIGKILL')) self.addTearDownHook(cleanupChild) # Create a target by the debugger. Index: test/lldbtest.py =================================================================== --- test/lldbtest.py +++ test/lldbtest.py @@ -294,15 +294,15 @@ def terminate(self): if self._proc.poll() == None: # Terminate _proc like it does the pexpect - self._proc.send_signal(signal.SIGHUP) + self._proc.send_signal(lldbutil.get_signal_number('SIGHUP')) time.sleep(self._delayafterterminate) if self._proc.poll() != None: return - self._proc.send_signal(signal.SIGCONT) + self._proc.send_signal(lldbutil.get_signal_number('SIGCONT')) time.sleep(self._delayafterterminate) if self._proc.poll() != None: return - self._proc.send_signal(signal.SIGINT) + self._proc.send_signal(lldbutil.get_signal_number('SIGINT')) time.sleep(self._delayafterterminate) if self._proc.poll() != None: return @@ -1331,7 +1331,7 @@ # Ensure any forked processes are cleaned up for pid in self.forkedProcessPids: if os.path.exists("/proc/" + str(pid)): - os.kill(pid, signal.SIGTERM) + os.kill(pid, lldbutil.get_signal_number('SIGTERM')) def spawnSubprocess(self, executable, args=[], install_remote=True): """ Creates a subprocess.Popen object with the specified executable and arguments, Index: test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py =================================================================== --- test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py +++ test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py @@ -21,7 +21,8 @@ hex_exit_code = context.get("hex_exit_code") self.assertIsNotNone(hex_exit_code) - self.assertEquals(int(hex_exit_code, 16), signal.SIGABRT) + self.assertEquals(int(hex_exit_code, 16), + lldbutil.get_signal_number('SIGABRT')) @debugserver_test @dsym_test Index: test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py =================================================================== --- test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py +++ test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py @@ -37,4 +37,4 @@ def test_inferior_seg_fault_received_llgs_dwarf(self): self.init_llgs_test() self.buildDwarf() - self.inferior_seg_fault_received(signal.SIGSEGV) + self.inferior_seg_fault_received(lldbutil.get_signal_number('SIGSEGV'))