[Lldb-commits] [lldb] r182030 - Fix Linux 'platform status' command. Its output is now closer to that on Mac OS X

Daniel Malea daniel.malea at intel.com
Thu May 16 10:52:04 PDT 2013


Author: dmalea
Date: Thu May 16 12:52:04 2013
New Revision: 182030

URL: http://llvm.org/viewvc/llvm-project?rev=182030&view=rev
Log:
Fix Linux 'platform status' command. Its output is now closer to that on Mac OS X
- resolves llvm.org/pr14806

Patch by Matthew Sorrels!


Modified:
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/test/functionalities/platform/TestPlatformCommand.py

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=182030&r1=182029&r2=182030&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu May 16 12:52:04 2013
@@ -336,12 +336,14 @@ PlatformLinux::GetStatus (Stream &strm)
 {
     struct utsname un;
 
-    if (uname(&un)) {
-        strm << "Linux";
+    Platform::GetStatus(strm);
+
+    if (uname(&un))
         return;
-    }
 
-    strm << un.sysname << ' ' << un.release << ' ' << un.version << '\n';
+    strm.Printf ("    Kernel: %s\n", un.sysname);
+    strm.Printf ("   Release: %s\n", un.release);
+    strm.Printf ("   Version: %s\n", un.version);
 }
 
 size_t

Modified: lldb/trunk/test/functionalities/platform/TestPlatformCommand.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/platform/TestPlatformCommand.py?rev=182030&r1=182029&r2=182030&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/platform/TestPlatformCommand.py (original)
+++ lldb/trunk/test/functionalities/platform/TestPlatformCommand.py Thu May 16 12:52:04 2013
@@ -27,7 +27,6 @@ class PlatformCommandTestCase(TestBase):
         self.expect("platform process info", error=True,
             substrs = ['one or more process id(s) must be specified'])
 
-    @expectedFailureLinux # due to llvm.org/pr14806 -- "platform status" prints more information on Mac OS X than on Linux
     def test_status(self):
         self.expect("platform status",
             substrs = ['Platform', 'Triple', 'OS Version', 'Kernel', 'Hostname'])





More information about the lldb-commits mailing list