========== shellcheck - FAILED ====== Checking before the patch ====== ====== Checking the tree with the patch ====== scripts/gen-btf.sh is a new file, but not shellcheck compliant New errors added --- /tmp/tmp.KcdTznxhtL 2025-11-27 14:16:34.688284827 -0500 +++ /tmp/tmp.THE7BEAsQY 2025-11-27 14:16:34.828283616 -0500 @@ -1,0 +2,114 @@ +In gen-btf.sh line 60: + grep -q "^$1=y" ${objtree}/include/config/auto.conf + ^--------^ SC2154 (warning): objtree is referenced but not assigned. + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + grep -q "^$1=y" "${objtree}"/include/config/auto.conf + + +In gen-btf.sh line 82: + ${PAHOLE} -J ${PAHOLE_FLAGS} \ + ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${PAHOLE} -J "${PAHOLE_FLAGS}" \ + + +In gen-btf.sh line 84: + --btf_encode_detached=${btf1} \ + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + --btf_encode_detached="${btf1}" \ + + +In gen-btf.sh line 95: + ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_OPTS} \ + ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_OPTS}" \ + + +In gen-btf.sh line 97: + --btf ${btf1} "${ELF_FILE}" + ^-----^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + --btf "${btf1}" "${ELF_FILE}" + + +In gen-btf.sh line 109: + echo "" | ${CC} -c -x c -o ${btf_data} - + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + echo "" | ${CC} -c -x c -o "${btf_data}" - + + +In gen-btf.sh line 110: + ${OBJCOPY} --add-section .BTF=${ELF_FILE}.btf \ + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${OBJCOPY} --add-section .BTF="${ELF_FILE}".btf \ + + +In gen-btf.sh line 111: + --set-section-flags .BTF=alloc,readonly ${btf_data} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + --set-section-flags .BTF=alloc,readonly "${btf_data}" + + +In gen-btf.sh line 112: + ${OBJCOPY} --only-section=.BTF --strip-all ${btf_data} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${OBJCOPY} --only-section=.BTF --strip-all "${btf_data}" + + +In gen-btf.sh line 121: + printf "${et_rel}" | dd of="${btf_data}" conv=notrunc bs=1 seek=16 status=none + ^---------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". + + +In gen-btf.sh line 127: + ${OBJCOPY} --add-section .BTF=${ELF_FILE}.btf ${ELF_FILE} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${OBJCOPY} --add-section .BTF="${ELF_FILE}".btf "${ELF_FILE}" + + +In gen-btf.sh line 132: + ${OBJCOPY} --add-section .BTF.base=${btf_base} ${ELF_FILE} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${OBJCOPY} --add-section .BTF.base="${btf_base}" "${ELF_FILE}" + + +In gen-btf.sh line 136: + ${OBJCOPY} --update-section .BTF_ids=${btf_ids} ${ELF_FILE} + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${OBJCOPY} --update-section .BTF_ids="${btf_ids}" "${ELF_FILE}" + + +In gen-btf.sh line 140: +cleanup() +^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). + +For more information: + https://www.shellcheck.net/wiki/SC2154 -- objtree is referenced but not ass... + https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... + https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ... + @@ -82 +195,0 @@ - ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. @@ -87,10 +200 @@ - "${kallsymso}" "${btf_vmlinux_bin_o}" "${arch_vmlinux_o}" "${ldlibs}" - - -In link-vmlinux.sh line 112: - local btf_data=${1}.btf.o - ^------------^ SC3043 (warning): In POSIX sh, 'local' is undefined. - ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. - -Did you mean: - local btf_data="${1}".btf.o + "${kallsymso}" ${btf_vmlinux_bin_o} "${arch_vmlinux_o}" "${ldlibs}" @@ -99,23 +203 @@ -In link-vmlinux.sh line 115: - LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J ${PAHOLE_FLAGS} ${1} - ^-------------^ SC2086 (info): Double quote to prevent globbing and word splitting. - ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. - -Did you mean: - LLVM_OBJCOPY="${OBJCOPY}" ${PAHOLE} -J "${PAHOLE_FLAGS}" "${1}" - - -In link-vmlinux.sh line 123: - --strip-all ${1} "${btf_data}" 2>/dev/null - ^--^ SC2086 (info): Double quote to prevent globbing and word splitting. - -Did you mean: - --strip-all "${1}" "${btf_data}" 2>/dev/null - - -In link-vmlinux.sh line 131: - printf "${et_rel}" | dd of="${btf_data}" conv=notrunc bs=1 seek=16 status=none - ^---------^ SC2059 (info): Don't use variables in the printf format string. Use printf '..%s..' "$foo". - - -In link-vmlinux.sh line 139: +In link-vmlinux.sh line 111: @@ -126 +208 @@ -In link-vmlinux.sh line 146: +In link-vmlinux.sh line 118: @@ -134 +216 @@ -In link-vmlinux.sh line 149: +In link-vmlinux.sh line 121: @@ -144 +226 @@ -In link-vmlinux.sh line 150: +In link-vmlinux.sh line 122: @@ -154 +236 @@ -In link-vmlinux.sh line 168: +In link-vmlinux.sh line 140: @@ -162 +244 @@ -In link-vmlinux.sh line 169: +In link-vmlinux.sh line 141: @@ -167 +249 @@ -In link-vmlinux.sh line 174: +In link-vmlinux.sh line 146: @@ -175 +257 @@ -In link-vmlinux.sh line 175: +In link-vmlinux.sh line 147: @@ -184 +266,9 @@ -In link-vmlinux.sh line 264: +In link-vmlinux.sh line 200: + if ! ${srctree}/scripts/gen-btf.sh .tmp_vmlinux1; then + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + if ! "${srctree}"/scripts/gen-btf.sh .tmp_vmlinux1; then + + +In link-vmlinux.sh line 239: @@ -192 +282 @@ -In link-vmlinux.sh line 268: +In link-vmlinux.sh line 243: @@ -200 +290 @@ -In link-vmlinux.sh line 270: +In link-vmlinux.sh line 245: @@ -209,3 +299,3 @@ -In link-vmlinux.sh line 291: - ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_ARGS} "${VMLINUX}" - ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. +In link-vmlinux.sh line 261: + ${OBJCOPY} --update-section .BTF_ids=${btfids_vmlinux} ${VMLINUX} + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. @@ -214 +304 @@ - ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_ARGS}" "${VMLINUX}" + ${OBJCOPY} --update-section .BTF_ids=${btfids_vmlinux} "${VMLINUX}" @@ -219 +309 @@ - https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... + https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...