Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lkl: Fix tests/boot.c #163

Merged
1 commit merged into from
Jun 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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