> diff --git a/tools/testing/selftests/bpf/prog_tests/global_data_init.c 
> b/tools/testing/selftests/bpf/prog_tests/global_data_init.c
> index e4c290492ff8..32734e1dbfb0 100644
> --- a/tools/testing/selftests/bpf/prog_tests/global_data_init.c
> +++ b/tools/testing/selftests/bpf/prog_tests/global_data_init.c
> @@ -279,6 +279,56 @@ static void test_global_percpu_data_verifier_log(void)

[ ... ]

> +     fd = bpf_iter_create(bpf_link__fd(link));
> +     if (!ASSERT_GE(fd, 0, "bpf_iter_create"))
> +             goto out;
> +
> +     while ((len = read(fd, buf, sizeof(buf))) > 0)
> +             do { } while (0);
> +     ASSERT_EQ(len, 0, "read iter");

This isn't a bug, but could the empty drain body here be a bare ';'
rather than 'do { } while (0);'?  The other bpf_iter tests in this
directory (prog_tests/bpf_iter.c) drain the iterator fd with a bare ';',
so a plain ';' would read more like the neighbouring code.


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

Reply via email to