From 2da9cd26d679180fa6c730e185ff2808be353bb4 Mon Sep 17 00:00:00 2001 From: Siva Chandra Date: Fri, 20 Feb 2015 22:58:00 +0000 Subject: [PATCH] Fix TestStubSetSID after unification in to a single lldb-server binary. Summary: lldb-server needs an explicit 'g' or 'p' argument now. Since lldb-server is started as a gdbserver in this test, 'g' should be passed to it explicitly. Test Plan: ./dotest.py -p TestStubSetSID Reviewers: flackr, ovyalov Reviewed By: ovyalov Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D7801 llvm-svn: 230082 --- lldb/test/tools/lldb-gdbserver/commandline/TestStubSetSID.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lldb/test/tools/lldb-gdbserver/commandline/TestStubSetSID.py b/lldb/test/tools/lldb-gdbserver/commandline/TestStubSetSID.py index cdaddde..65a4bb4 100644 --- a/lldb/test/tools/lldb-gdbserver/commandline/TestStubSetSID.py +++ b/lldb/test/tools/lldb-gdbserver/commandline/TestStubSetSID.py @@ -13,6 +13,11 @@ import tempfile import time from lldbtest import * + +def get_common_stub_args(): + return [] if 'darwin' in sys.platform else ['g'] + + class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): def get_stub_sid(self, extra_stub_args=None): # Launch debugserver @@ -34,11 +39,11 @@ class TestStubSetSIDTestCase(gdbremote_testcase.GdbRemoteTestCaseBase): self.assertEquals(stub_sid, os.getsid(0)) def sid_is_different_with_setsid(self): - stub_sid = self.get_stub_sid(" --setsid") + stub_sid = self.get_stub_sid(" %s --setsid" % ' '.join(get_common_stub_args())) self.assertNotEquals(stub_sid, os.getsid(0)) def sid_is_different_with_S(self): - stub_sid = self.get_stub_sid(" -S") + stub_sid = self.get_stub_sid(" %s -S" % ' '.join(get_common_stub_args())) self.assertNotEquals(stub_sid, os.getsid(0)) @debugserver_test -- 2.7.4