Skip to content

Commit b7601ac

Browse files
committed
Avoid fault in test desched_sigkill-no-syscallbuf.
This atomic_printf seem to change timing enough to make this test less likely to fail. Error message: FAILED at src/test/desched_sigkill.c:43: !(1 == read(parent_to_child[0], &ch, 1) && ch == 'x') errno:0 (Success) FAILED at src/test/desched_sigkill.c:43: !(1 == read(parent_to_child[0], &ch, 1) && ch == 'x') errno:0 (Success) FAILED at src/test/desched_sigkill.c:68: !(WIFSIGNALED(status) && WTERMSIG(status) == SIGKILL) errno:0 (Success)
1 parent c05a788 commit b7601ac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/desched_sigkill.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ int main(void) {
3939
for (int i = 0; i < NUM_READERS; ++i) {
4040
pids[i] = fork();
4141
if (pids[i] == 0) {
42+
atomic_printf("pid=%d :%d\n", getpid(), __LINE__);
4243
test_assert(1 == write(child_to_parent[1], "x", 1));
44+
atomic_printf("pid=%d :%d\n", getpid(), __LINE__);
4345
test_assert(1 == read(parent_to_child[0], &ch, 1) && ch == 'x');
4446
pause();
4547
return 77;

0 commit comments

Comments
 (0)