fix bin path in tests
This commit is contained in:
parent
557eb7dc60
commit
8f078e9499
@ -25,7 +25,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
posix_spawn_file_actions_addclose(&file_actions, pipe_rd_fd);
|
posix_spawn_file_actions_addclose(&file_actions, pipe_rd_fd);
|
||||||
|
|
||||||
const char* msg = "Echo!\n";
|
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 };
|
const char* child_argv[3] = { child_prog, msg, NULL };
|
||||||
int child_pid;
|
int child_pid;
|
||||||
if (posix_spawn(&child_pid, child_prog, &file_actions,
|
if (posix_spawn(&child_pid, child_prog, &file_actions,
|
||||||
|
@ -8,7 +8,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
int ret, child_pid, status;
|
int ret, child_pid, status;
|
||||||
printf("Run a parent process has pid = %d and ppid = %d\n", getpid(), getppid());
|
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) {
|
if (ret < 0) {
|
||||||
printf("ERROR: failed to spawn a child process\n");
|
printf("ERROR: failed to spawn a child process\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -13,7 +13,7 @@ int main(int argc, const char* argv[]) {
|
|||||||
gettimeofday(&tv_start, NULL);
|
gettimeofday(&tv_start, NULL);
|
||||||
for (unsigned long i = 0; i < NREPEATS; i++) {
|
for (unsigned long i = 0; i < NREPEATS; i++) {
|
||||||
int child_pid, status;
|
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);
|
printf("ERROR: failed to spawn (# of repeats = %lu)\n", i);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user