Skip to content

Commit

Permalink
Merge pull request #163 from liuyuan10/boot
Browse files Browse the repository at this point in the history
lkl: Fix tests/boot.c
  • Loading branch information
Octavian Purdila committed Jun 3, 2016
2 parents 66753ca + 5962d78 commit 70fda2d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tools/lkl/tests/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ static int test_syscall_thread(char *str, int len)
int pipe_fds[2];
char tmp[LKL_PIPE_BUF+1];
long ret;
lkl_thread_t tid;

ret = lkl_sys_pipe2(pipe_fds, 0);
if (ret) {
Expand All @@ -666,8 +667,8 @@ static int test_syscall_thread(char *str, int len)
return TEST_FAILURE;
}

ret = lkl_host_ops.thread_create(test_thread, pipe_fds);
if (!ret) {
tid = lkl_host_ops.thread_create(test_thread, pipe_fds);
if (!tid) {
snprintf(str, len, "failed to create thread");
return TEST_FAILURE;
}
Expand All @@ -681,6 +682,12 @@ static int test_syscall_thread(char *str, int len)
return TEST_FAILURE;
}

ret = lkl_host_ops.thread_join(tid);
if (ret) {
snprintf(str, len, "failed to join thread");
return TEST_FAILURE;
}

return TEST_SUCCESS;
}

Expand Down

0 comments on commit 70fda2d

Please sign in to comment.