Skip to content
Unverified Commit 6a68d280 authored by Nam Cao's avatar Nam Cao Committed by Christian Brauner
Browse files

selftests/coredump: Fix "socket_detect_userspace_client" test failure



The coredump.socket_detect_userspace_client test occasionally fails:
    #  RUN           coredump.socket_detect_userspace_client ...
    # stackdump_test.c:500:socket_detect_userspace_client:Expected 0 (0) != WIFEXITED(status) (0)
    # socket_detect_userspace_client: Test terminated by assertion
    #          FAIL  coredump.socket_detect_userspace_client
    not ok 3 coredump.socket_detect_userspace_client

because there is no guarantee that client's write() happens before server's
close(). The client gets terminated SIGPIPE, and thus the test fails.

Add a read() to server to make sure server's close() doesn't happen before
client's write().

Fixes: 7b6724fe ("selftests/coredump: add tests for AF_UNIX coredumps")
Signed-off-by: default avatarNam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/20250620110252.1640391-1-namcao@linutronix.de


Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent e04c78d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment