minijail: add no-preload run_pid_pipes unittest

Restore the run_pid_pipes unittest with the non-preload
version of the function to avoid issues with Android.

BUG: 24577038
Change-Id: I3b39f9d874b0f0a831c35ed325595c483246c3fe
TEST: 'FEATURES=test emerge-samus chromeos-minijail' on ChromeOS.
diff --git a/libminijail_unittest.c b/libminijail_unittest.c
index 1a98741..d6de3c7 100644
--- a/libminijail_unittest.c
+++ b/libminijail_unittest.c
@@ -143,9 +143,7 @@
   EXPECT_EQ(-EINVAL, minijail_unmarshal(self->j, self->buf, sizeof(self->buf)));
 }
 
-/*
- * TODO(jorgelo): rewrite these tests to not depend on libminijailpreload.so.
-TEST(test_minijail_run_pid_pipes) {
+TEST(test_minijail_run_pid_pipes_no_preload) {
   pid_t pid;
   int child_stdin, child_stdout, child_stderr;
   int mj_run_ret;
@@ -162,8 +160,10 @@
 
   argv[0] = filename;
   argv[1] = NULL;
-  mj_run_ret = minijail_run_pid_pipes(j, argv[0], argv,
-                                      &pid, &child_stdin, &child_stdout, NULL);
+  mj_run_ret = minijail_run_pid_pipes_no_preload(j, argv[0], argv,
+                                                 &pid,
+                                                 &child_stdin, &child_stdout,
+                                                 NULL);
   EXPECT_EQ(mj_run_ret, 0);
 
   write_ret = write(child_stdin, teststr, teststr_len);
@@ -183,8 +183,9 @@
   argv[1] = "-c";
   argv[2] = "echo test >&2";
   argv[3] = NULL;
-  mj_run_ret = minijail_run_pid_pipes(j, argv[0], argv, &pid, &child_stdin,
-                                      &child_stdout, &child_stderr);
+  mj_run_ret = minijail_run_pid_pipes_no_preload(j, argv[0], argv, &pid,
+                                                 &child_stdin, &child_stdout,
+                                                 &child_stderr);
   EXPECT_EQ(mj_run_ret, 0);
 
   read_ret = read(child_stderr, buf, buf_len);
@@ -196,6 +197,5 @@
 
   minijail_destroy(j);
 }
-*/
 
 TEST_HARNESS_MAIN