Re: [PATCH bpf-next v1 4/4] resolve_btfids: change in-place update with raw binary output
From: Ihor Solodrai
Date: Wed Nov 26 2025 - 13:22:33 EST
On 11/25/25 8:46 PM, Donglin Peng wrote:
> On Wed, Nov 26, 2025 at 9:29 AM Ihor Solodrai <ihor.solodrai@xxxxxxxxx> wrote:
>>
>> [...]
>> +
>> +gen_btf_data()
>> +{
>> + info BTF "${ELF_FILE}"
>> + btf1="${ELF_FILE}.btf.1"
>> + ${PAHOLE} -J ${PAHOLE_FLAGS} \
>> + ${BTF_BASE:+--btf_base ${BTF_BASE}} \
>> + --btf_encode_detached=${btf1} \
>> + "${ELF_FILE}"
>> +
>> + info BTFIDS "${ELF_FILE}"
>> + RESOLVE_BTFIDS_OPTS=""
>> + if is_enabled CONFIG_WERROR; then
>> + RESOLVE_BTFIDS_OPTS+=" --fatal_warnings "
>
> In POSIX sh, +=is undefined[1], and I encountered the following error:
>
> ./scripts/gen-btf.sh: 90: RESOLVE_BTFIDS_OPTS+= --fatal_warnings : not found
>
> We should use the following syntax instead:
>
> RESOLVE_BTFIDS_OPTS="${RESOLVE_BTFIDS_OPTS} --fatal_warnings "
Hi Donglin, thanks for taking a look.
These and a couple of other bugs have been caught by CI [1].
I am working on v2.
I changed the script to #!/bin/bash and will run the shellcheck
before submitting the next revision [2], when it's ready.
[1] https://github.com/kernel-patches/bpf/actions/runs/19689674975
[2] https://github.com/kernel-patches/bpf/pull/10370
>
> [1] https://www.shellcheck.net/wiki/SC3024
>
> Thanks,
> Donglin
>> [...]