Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/coredump: Remove the read() that fails the test

Resolve a conflict between
commit 6a68d28066b6 ("selftests/coredump: Fix "socket_detect_userspace_client" test failure")
and
commit 994dc26302ed ("selftests/coredump: fix build")

The first commit adds a read() to wait for write() from another thread to
finish. But the second commit removes the write().

Now that the two commits are in the same tree, the read() now gets EOF and
the test fails.

Remove this read() so that the test passes.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/20250811074957.4079616-1-namcao@linutronix.de
Signed-off-by: Christian Brauner <brauner@kernel.org>

authored by

Nam Cao and committed by
Christian Brauner
2319f9d0 542ede09

-3
-3
tools/testing/selftests/coredump/stackdump_test.c
··· 446 446 if (info.coredump_mask & PIDFD_COREDUMPED) 447 447 goto out; 448 448 449 - if (read(fd_coredump, &c, 1) < 1) 450 - goto out; 451 - 452 449 exit_code = EXIT_SUCCESS; 453 450 out: 454 451 if (fd_peer_pidfd >= 0)