Skip to content

Commit

Permalink
Starting with kernel 5.16-rc1 a core dumping signal only takes down t…
Browse files Browse the repository at this point in the history
…he thread group, not the entire vm, so adjust our test to match the new behavior.

torvalds/linux@0258b5f
  • Loading branch information
khuey committed Nov 19, 2021
1 parent 4d18e8a commit 04bbacd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/test/clone_cleartid_coredump.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,17 @@ int main(void) {
CLONE_VM | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID,
NULL, shared_page, NULL, shared_page);
test_assert(tid > 0);

futex(&child_tid, FUTEX_WAIT, tid, NULL, NULL, 0);
test_assert(tid = waitpid(tid, &status, __WALL));
/* The child will take us down before we have the chance to get here */
test_assert(0);
test_assert(WIFSIGNALED(status));
}

test_assert(child_tid > 0);
test_assert(child_tid == waitpid(child_tid, &status, __WALL));
test_assert(WIFSIGNALED(status) && WTERMSIG(status) == SIGSEGV);
test_assert(*(pid_t*)shared_page != (pid_t)-1 &&
*(pid_t*)shared_page != 0);
*(pid_t*)shared_page == 0);

atomic_puts("EXIT-SUCCESS");
return 0;
Expand Down

0 comments on commit 04bbacd

Please sign in to comment.