ACK: [PATCH 0/1] [SRU][R] selftests/bpf: fix FTBFS with clang 23 / gcc 15

Ross Porter ross.porter at canonical.com
Wed May 27 22:15:09 UTC 2026


Acked-by: Ross Porter <ross.porter at canonical.com>

On 27/05/2026 21:51, Paolo Pisati wrote:
> BugLink: https://bugs.launchpad.net/bugs/2154343
>
> [Impact]
>
> Resolute kernel BPF selftest FTBFS like this:
>
> tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c:117:12: error: assigning to 'char *' from 'const char *'
> discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
>
> [Fix]
>
> Apply the v7.1-rc1 upstream fix:
>
> ```
> commit ca0f39a369c5f927c3d004e63a5a778b08a9df94
> Author: Varun R Mallya <varunrmallya at gmail.com>
> Date: Fri Mar 6 03:51:32 2026 +0530
>
>      selftests/bpf: Fix const qualifier warning in fexit_bpf2bpf.c
>
>      Building selftests with
>      clang 23.0.0 (6fae863eba8a72cdd82f37e7111a46a70be525e0) triggers
>      the following error:
>
>        tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c:117:12:
>        error: assigning to 'char *' from 'const char *' discards qualifiers
>        [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
>
>      The variable `tgt_name` is declared as `char *`, but it stores the
>      result of strstr(prog_name[i], "/"). Since `prog_name[i]` is a
>      `const char *`, the returned pointer should also be treated as
>      const-qualified.
>
>      Update `tgt_name` to `const char *` to match the type of the underlying
>      string and silence the compiler warning.
> ```
>
> [How to reproduce]
>
> Run the test again after applying the patch
>
> [Regression potential]
>
> Low: clean upstream cherry-pick for a known issue.
>
> Varun R Mallya (1):
>    selftests/bpf: Fix const qualifier warning in fexit_bpf2bpf.c
>
>   tools/testing/selftests/bpf/prog_tests/fexit_bpf2bpf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>



More information about the kernel-team mailing list