[Lldb-commits] [lldb] r231479 - Rename test/tools/lldb-gdbserver to test/tools/lldb-server

Robert Flack flackr at gmail.com
Fri Mar 6 06:36:33 PST 2015


Author: flackr
Date: Fri Mar  6 08:36:33 2015
New Revision: 231479

URL: http://llvm.org/viewvc/llvm-project?rev=231479&view=rev
Log:
Rename test/tools/lldb-gdbserver to test/tools/lldb-server

As requested in http://reviews.llvm.org/D7545 this change moves test/tools/lldb-gdbserver to test/tools/lldb-server ot match the name of the target being tested.

Differential Revision: http://reviews.llvm.org/D8061

Added:
    lldb/trunk/test/tools/lldb-server/
      - copied from r231478, lldb/trunk/test/tools/lldb-gdbserver/
Removed:
    lldb/trunk/test/tools/lldb-gdbserver/
Modified:
    lldb/trunk/test/dotest.py
    lldb/trunk/test/lldbtest.py
    lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
    lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
    lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py
    lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
    lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py
    lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp
    lldb/trunk/tools/lldb-server/lldb-platform.cpp

Modified: lldb/trunk/test/dotest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dotest.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/dotest.py (original)
+++ lldb/trunk/test/dotest.py Fri Mar  6 08:36:33 2015
@@ -136,7 +136,7 @@ dont_do_dwarf_test = False
 # Something for Windows here?
 dont_do_debugserver_test = "linux" in sys.platform or "freebsd" in sys.platform
 
-# Don't do lldb-gdbserver (llgs) tests on anything except Linux.
+# Don't do lldb-server (llgs) tests on anything except Linux.
 dont_do_llgs_test = not ("linux" in sys.platform)
 
 # The blacklist is optional (-b blacklistFile) and allows a central place to skip

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Fri Mar  6 08:36:33 2015
@@ -494,7 +494,7 @@ def debugserver_test(func):
     return wrapper
 
 def llgs_test(func):
-    """Decorate the item as a lldb-gdbserver test."""
+    """Decorate the item as a lldb-server test."""
     if isinstance(func, type) and issubclass(func, unittest2.TestCase):
         raise Exception("@llgs_test can only be used to decorate a test method")
     @wraps(func)

Modified: lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py (original)
+++ lldb/trunk/test/tools/lldb-mi/signal/TestMiSignal.py Fri Mar  6 08:36:33 2015
@@ -13,6 +13,7 @@ import unittest2
 class MiSignalTestCase(lldbmi_testcase.MiTestCaseBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    lldb_server_path = "lldb-server"
 
     @lldbmi_test
     @expectedFailureWindows("llvm.org/pr22274: need a pexpect replacement for windows")
@@ -88,7 +89,7 @@ class MiSignalTestCase(lldbmi_testcase.M
         """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (remote)."""
 
         # Prepare debugserver
-        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "lldb-gdbserver")))
+        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", lldb_server_path)))
         import lldbgdbserverutils
         debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
         if not debugserver_exe:
@@ -164,7 +165,7 @@ class MiSignalTestCase(lldbmi_testcase.M
         """Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (remote)."""
 
         # Prepare debugserver
-        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "lldb-gdbserver")))
+        sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "lldb-server")))
         import lldbgdbserverutils
         debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
         if not debugserver_exe:

Modified: lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py (original)
+++ lldb/trunk/test/tools/lldb-server/TestLldbGdbServer.py Fri Mar  6 08:36:33 2015
@@ -1,8 +1,8 @@
 """
 Test case for testing the gdbremote protocol.
 
-Tests run against debugserver and lldb-gdbserver (llgs).
-lldb-gdbserver tests run where the lldb-gdbserver exe is
+Tests run against debugserver and lldb-server (llgs).
+lldb-server tests run where the lldb-server exe is
 available.
 
 This class will be broken into smaller test case classes by
@@ -52,8 +52,8 @@ class LldbGdbServerTestCase(gdbremote_te
 
         self.add_no_ack_remote_stream()
         self.test_sequence.add_log_lines(
-            ["lldb-gdbserver <  26> read packet: $QThreadSuffixSupported#e4",
-             "lldb-gdbserver <   6> send packet: $OK#9a"],
+            ["lldb-server <  26> read packet: $QThreadSuffixSupported#e4",
+             "lldb-server <   6> send packet: $OK#9a"],
             True)
 
         self.expect_gdbremote_sequence()
@@ -74,8 +74,8 @@ class LldbGdbServerTestCase(gdbremote_te
 
         self.add_no_ack_remote_stream()
         self.test_sequence.add_log_lines(
-            ["lldb-gdbserver <  27> read packet: $QListThreadsInStopReply#21",
-             "lldb-gdbserver <   6> send packet: $OK#9a"],
+            ["lldb-server <  27> read packet: $QListThreadsInStopReply#21",
+             "lldb-server <   6> send packet: $OK#9a"],
             True)
         self.expect_gdbremote_sequence()
 
@@ -95,7 +95,6 @@ class LldbGdbServerTestCase(gdbremote_te
 
         # build launch args
         launch_args = [os.path.abspath('a.out')]
-
         self.add_no_ack_remote_stream()
         self.test_sequence.add_log_lines(
             ["read packet: %s" % lldbgdbserverutils.build_gdbremote_A_packet(launch_args),

Modified: lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py (original)
+++ lldb/trunk/test/tools/lldb-server/commandline/TestStubSetSID.py Fri Mar  6 08:36:33 2015
@@ -29,7 +29,7 @@ class TestStubSetSIDTestCase(gdbremote_t
         server = self.launch_debug_monitor()
         self.assertIsNotNone(server)
         self.assertTrue(server.isalive())
-        server.expect("(debugserver|lldb-gdbserver)", timeout=10)
+        server.expect("(debugserver|lldb-server)", timeout=10)
 
         # Get the process id for the stub.
         return os.getsid(server.pid)

Modified: lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py (original)
+++ lldb/trunk/test/tools/lldb-server/gdbremote_testcase.py Fri Mar  6 08:36:33 2015
@@ -134,9 +134,9 @@ class GdbRemoteTestCaseBase(TestBase):
         return stub_port
 
     def init_llgs_test(self, use_named_pipe=True):
-        self.debug_monitor_exe = get_lldb_gdbserver_exe()
+        self.debug_monitor_exe = get_lldb_server_exe()
         if not self.debug_monitor_exe:
-            self.skipTest("lldb_gdbserver exe not found")
+            self.skipTest("lldb-server exe not found")
         dname = os.path.join(os.environ["LLDB_TEST"],
                              os.environ["LLDB_SESSION_DIRNAME"])
         self.debug_monitor_extra_args = " gdbserver -c 'log enable -T -f {}/process-{}.log lldb break process thread' -c 'log enable -T -f {}/packets-{}.log gdb-remote packets'".format(dname, self.id(), dname, self.id())
@@ -161,7 +161,7 @@ class GdbRemoteTestCaseBase(TestBase):
         def shutdown_socket():
             if sock:
                 try:
-                    # send the kill packet so lldb-gdbserver shuts down gracefully
+                    # send the kill packet so lldb-server shuts down gracefully
                     sock.sendall(GdbRemoteTestCaseBase._GDBREMOTE_KILL_PACKET)
                 except:
                     logger.warning("failed to send kill packet to debug monitor: {}; ignoring".format(sys.exc_info()[0]))
@@ -204,7 +204,7 @@ class GdbRemoteTestCaseBase(TestBase):
         # Start the server.
         server = pexpect.spawn(commandline, logfile=logfile)
         self.assertIsNotNone(server)
-        server.expect(r"(debugserver|lldb-gdbserver)", timeout=10)
+        server.expect(r"(debugserver|lldb-server)", timeout=10)
 
         # If we're receiving the stub's listening port from the named pipe, do that here.
         if self.named_pipe:

Modified: lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py (original)
+++ lldb/trunk/test/tools/lldb-server/lldbgdbserverutils.py Fri Mar  6 08:36:33 2015
@@ -1,4 +1,4 @@
-"""Module for supporting unit testing of the lldb-gdbserver debug monitor exe.
+"""Module for supporting unit testing of the lldb-server debug monitor exe.
 """
 
 import os
@@ -49,8 +49,8 @@ def _get_debug_monitor_from_lldb(lldb_ex
         return None
 
 
-def get_lldb_gdbserver_exe():
-    """Return the lldb-gdbserver exe path.
+def get_lldb_server_exe():
+    """Return the lldb-server exe path.
 
     Returns:
         A path to the lldb-gdbserver exe if it is found to exist; otherwise,
@@ -86,7 +86,7 @@ def get_debugserver_exe():
         return None
 
 
-_LOG_LINE_REGEX = re.compile(r'^(lldb-gdbserver|debugserver)\s+<\s*(\d+)>' +
+_LOG_LINE_REGEX = re.compile(r'^(lldb-server|debugserver)\s+<\s*(\d+)>' +
     '\s+(read|send)\s+packet:\s+(.+)$')
 
 
@@ -831,8 +831,8 @@ def process_is_running(pid, unknown_valu
     return pid in process_ids
 
 if __name__ == '__main__':
-    EXE_PATH = get_lldb_gdbserver_exe()
+    EXE_PATH = get_lldb_server_exe()
     if EXE_PATH:
-        print "lldb-gdbserver path detected: {}".format(EXE_PATH)
+        print "lldb-server path detected: {}".format(EXE_PATH)
     else:
-        print "lldb-gdbserver could not be found"
+        print "lldb-server could not be found"

Modified: lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-gdbserver.cpp Fri Mar  6 08:36:33 2015
@@ -42,7 +42,7 @@
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
 
 #ifndef LLGS_PROGRAM_NAME
-#define LLGS_PROGRAM_NAME "lldb-gdbserver"
+#define LLGS_PROGRAM_NAME "lldb-server"
 #endif
 
 #ifndef LLGS_VERSION_STR
@@ -98,9 +98,9 @@ signal_handler(int signo)
 {
     Log *log (GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-    fprintf (stderr, "lldb-gdbserver:%s received signal %d\n", __FUNCTION__, signo);
+    fprintf (stderr, "lldb-server:%s received signal %d\n", __FUNCTION__, signo);
     if (log)
-        log->Printf ("lldb-gdbserver:%s received signal %d", __FUNCTION__, signo);
+        log->Printf ("lldb-server:%s received signal %d", __FUNCTION__, signo);
 
     switch (signo)
     {
@@ -112,7 +112,7 @@ signal_handler(int signo)
 
         // For now, swallow SIGHUP.
         if (log)
-            log->Printf ("lldb-gdbserver:%s swallowing SIGHUP (receive count=%d)", __FUNCTION__, g_sighup_received_count);
+            log->Printf ("lldb-server:%s swallowing SIGHUP (receive count=%d)", __FUNCTION__, g_sighup_received_count);
         signal (SIGHUP, signal_handler);
         break;
     }
@@ -644,7 +644,7 @@ main_gdbserver (int argc, char *argv[])
     Log *log(lldb_private::GetLogIfAnyCategoriesSet (GDBR_LOG_VERBOSE));
     if (log)
     {
-        log->Printf ("lldb-gdbserver launch");
+        log->Printf ("lldb-server launch");
         for (int i = 0; i < argc; i++)
         {
             log->Printf ("argv[%i] = '%s'", i, argv[i]);
@@ -687,7 +687,7 @@ main_gdbserver (int argc, char *argv[])
 
     ConnectToRemote (gdb_server, reverse_connect, host_and_port, progname, subcommand, named_pipe_path.c_str ());
 
-    fprintf(stderr, "lldb-gdbserver exiting...\n");
+    fprintf(stderr, "lldb-server exiting...\n");
 
     return 0;
 }

Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=231479&r1=231478&r2=231479&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Fri Mar  6 08:36:33 2015
@@ -82,7 +82,7 @@ signal_handler(int signo)
         // Use SIGINT first, if that does not work, use SIGHUP as a last resort.
         // And we should not call exit() here because it results in the global destructors
         // to be invoked and wreaking havoc on the threads still running.
-        Host::SystemLog(Host::eSystemLogWarning, "SIGHUP received, exiting lldb-platform...\n");
+        Host::SystemLog(Host::eSystemLogWarning, "SIGHUP received, exiting lldb-server...\n");
         abort();
         break;
     }
@@ -305,7 +305,7 @@ main_platform (int argc, char *argv[])
         }
     } while (g_stay_alive);
 
-    fprintf(stderr, "lldb-platform exiting...\n");
+    fprintf(stderr, "lldb-server exiting...\n");
 
     return 0;
 }





More information about the lldb-commits mailing list