> diff --git 
> a/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c 
> b/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c
> new file mode 100644
> index 000000000000..aa48ae483dab
> --- /dev/null
> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_interrupted_connect.c
> @@ -0,0 +1,200 @@
> +// SPDX-License-Identifier: GPL-2.0

[ ... ]

> +#include "sockmap_helpers.h"

[ ... ]

> +void serial_test_sockmap_interrupted_connect(void)
> +{
> +     sighandler_t orig_handler;
> +     struct context ctx = {0};
> +     pthread_t tid;
> +
> +     orig_handler = signal(SIGUSR1, handler);
> +     if (!ASSERT_NEQ(orig_handler, SIG_ERR, "signal"))
> +             return;
> +
> +     if (xpthread_create(&tid, NULL, racer, &ctx))
> +             goto restore;
> +
> +     test_map(&ctx, BPF_MAP_TYPE_SOCKMAP);
> +
> +     if (!xpthread_cancel(tid))
              ^^^^^^^^^^^^^^^^

Is xpthread_cancel() defined somewhere? I see sockmap_helpers.h defines
xpthread_create() and xpthread_join(), but there does not appear to be a
definition for xpthread_cancel(). This would cause a compilation failure.

> +             xpthread_join(tid, NULL);
> +restore:
> +     ASSERT_NEQ(signal(SIGUSR1, orig_handler), SIG_ERR, "handler restore");
> +}


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/21294285592

Reply via email to