Skip to content

Commit

Permalink
lkl: Fix tests/boot.c
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Liu <liuyuan@google.com>
  • Loading branch information
liuyuan10 committed Jun 2, 2016
1 parent 66753ca commit 5962d78
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 5962d78

Please sign in to comment.