[Lldb-commits] [lldb] r231651 - Fix AttachDeniedTestCase on android

Tamas Berghammer tberghammer at google.com
Mon Mar 9 06:11:43 PDT 2015


Author: tberghammer
Date: Mon Mar  9 08:11:42 2015
New Revision: 231651

URL: http://llvm.org/viewvc/llvm-project?rev=231651&view=rev
Log:
Fix AttachDeniedTestCase on android

Failure caused by a missing mkfifo command in the android OS. This fix
replace mkfifo with "mknode p" command on android.

Modified:
    lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py

Modified: lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py?rev=231651&r1=231650&r2=231651&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py (original)
+++ lldb/trunk/test/functionalities/process_attach/attach_denied/TestAttachDenied.py Mon Mar  9 08:11:42 2015
@@ -31,7 +31,12 @@ class AttachDeniedTestCase(TestBase):
         pid_pipe_path = os.path.join(self.get_process_working_directory(),
                                      "pid_pipe_%d" % (int(time.time())))
 
-        err, _ = self.run_platform_command("mkfifo %s" % (pid_pipe_path))
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+        if re.match(".*-.*-.*-android", triple):
+            err, _ = self.run_platform_command("mknod %s p" % (pid_pipe_path))
+        else:
+            err, _ = self.run_platform_command("mkfifo %s" % (pid_pipe_path))
+
         self.assertTrue(err.Success(), "Failed to create FIFO %s: %s" % (pid_pipe_path, err.GetCString()))
 
         self.addTearDownHook(lambda: self.run_platform_command("rm %s" % (pid_pipe_path)))





More information about the lldb-commits mailing list