From 8f078e9499a06a8b577e32206bced91f56caf4a7 Mon Sep 17 00:00:00 2001 From: WangRunji Date: Tue, 5 Mar 2019 21:13:52 +0800 Subject: [PATCH] fix bin path in tests --- test/pipe/main.c | 2 +- test/spawn/main.c | 2 +- test/spawn_and_exit_latency/main.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/pipe/main.c b/test/pipe/main.c index b3bc7da0..faa0a553 100644 --- a/test/pipe/main.c +++ b/test/pipe/main.c @@ -25,7 +25,7 @@ int main(int argc, const char* argv[]) { posix_spawn_file_actions_addclose(&file_actions, pipe_rd_fd); const char* msg = "Echo!\n"; - const char* child_prog = "hello_world/bin.encrypted"; + const char* child_prog = "../hello_world/bin.encrypted"; const char* child_argv[3] = { child_prog, msg, NULL }; int child_pid; if (posix_spawn(&child_pid, child_prog, &file_actions, diff --git a/test/spawn/main.c b/test/spawn/main.c index f098fc9d..1c1ae4b7 100644 --- a/test/spawn/main.c +++ b/test/spawn/main.c @@ -8,7 +8,7 @@ int main(int argc, const char* argv[]) { int ret, child_pid, status; printf("Run a parent process has pid = %d and ppid = %d\n", getpid(), getppid()); - ret = posix_spawn(&child_pid, "getpid/bin.encrypted", NULL, NULL, NULL, NULL); + ret = posix_spawn(&child_pid, "../getpid/bin.encrypted", NULL, NULL, NULL, NULL); if (ret < 0) { printf("ERROR: failed to spawn a child process\n"); return -1; diff --git a/test/spawn_and_exit_latency/main.c b/test/spawn_and_exit_latency/main.c index 8713c995..b3a3896f 100644 --- a/test/spawn_and_exit_latency/main.c +++ b/test/spawn_and_exit_latency/main.c @@ -13,7 +13,7 @@ int main(int argc, const char* argv[]) { gettimeofday(&tv_start, NULL); for (unsigned long i = 0; i < NREPEATS; i++) { int child_pid, status; - if (posix_spawn(&child_pid, "empty/bin.encrypted", NULL, NULL, NULL, NULL) <0) { + if (posix_spawn(&child_pid, "../empty/bin.encrypted", NULL, NULL, NULL, NULL) <0) { printf("ERROR: failed to spawn (# of repeats = %lu)\n", i); return -1; }