> diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c 
> b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
> index cc0c68bab907..b87118aab7c4 100644
> --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c

[ ... ]

> @@ -93,8 +90,12 @@ static void test_insert_bound(struct test_sockmap_listen 
> *skel __always_unused,
>       errno = 0;
>       value = s;
>       err = bpf_map_update_elem(mapfd, &key, &value, BPF_NOEXIST);
> -     if (!err || errno != EOPNOTSUPP)
> -             FAIL_ERRNO("map_update: expected EOPNOTSUPP");
> +     if (sotype == SOCK_STREAM) {
> +             ASSERT_ERR(err, "map_update");
> +             ASSERT_EQ(errno, EOPNOTSUPP, "errno");
> +     } else if (err) {
> +             ASSERT_OK(err, "map_update");
> +     }

This isn't a bug, but could the UDP branch just be `else ASSERT_OK(err,
"map_update");` — the `if (err)` guard looks redundant since ASSERT_OK is
a no-op on success?

>  close:
>       xclose(s);
>  }

[ ... ]


---
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/28554911192

Reply via email to