========== 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.6cMISj3jfQ 2025-11-25 20:54:22.022037258 -0500 +++ /tmp/tmp.uciUxtA7BB 2025-11-25 20:54:22.162035755 -0500 @@ -1,0 +2,144 @@ +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 90: + RESOLVE_BTFIDS_OPTS+=" --fatal_warnings " + ^-----------------^ SC3024 (warning): In POSIX sh, += is undefined. + + +In gen-btf.sh line 93: + RESOLVE_BTFIDS_OPTS+=" -v " + ^-----------------^ SC3024 (warning): In POSIX sh, += is undefined. + + +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 102: + local btf_data=${ELF_FILE}.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="${ELF_FILE}".btf.o + + +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 129: + --add-section .BTF=${ELF_FILE}.btf \ + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + --add-section .BTF="${ELF_FILE}".btf \ + + +In gen-btf.sh line 130: + --add-section .BTF.base=${ELF_FILE}.distilled_base.btf \ + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + --add-section .BTF.base="${ELF_FILE}".distilled_base.btf \ + + +In gen-btf.sh line 131: + ${ELF_FILE} + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + "${ELF_FILE}" + + +In gen-btf.sh line 135: + ${OBJCOPY} --update-section .BTF_ids=${ELF_FILE}.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="${ELF_FILE}".btf_ids "${ELF_FILE}" + + +In gen-btf.sh line 139: +cleanup() +^-- SC2329 (info): This function is never invoked. Check usage (or ignored if invoked indirectly). + + +In gen-btf.sh line 143: + if [ "${BTFGEN_MODE}" == "module" ]; then + ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined. + +For more information: + https://www.shellcheck.net/wiki/SC2154 -- objtree is referenced but not ass... + https://www.shellcheck.net/wiki/SC3014 -- In POSIX sh, == in place of = is ... + https://www.shellcheck.net/wiki/SC3024 -- In POSIX sh, += is undefined. + @@ -82 +225,0 @@ - ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. @@ -87,19 +230 @@ - "${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 - - -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}" + "${kallsymso}" ${btf_vmlinux_bin_o} "${arch_vmlinux_o}" "${ldlibs}" @@ -108,14 +233 @@ -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 +238 @@ -In link-vmlinux.sh line 146: +In link-vmlinux.sh line 118: @@ -134 +246 @@ -In link-vmlinux.sh line 149: +In link-vmlinux.sh line 121: @@ -144 +256 @@ -In link-vmlinux.sh line 150: +In link-vmlinux.sh line 122: @@ -154 +266 @@ -In link-vmlinux.sh line 168: +In link-vmlinux.sh line 140: @@ -162 +274 @@ -In link-vmlinux.sh line 169: +In link-vmlinux.sh line 141: @@ -167 +279 @@ -In link-vmlinux.sh line 174: +In link-vmlinux.sh line 146: @@ -175 +287 @@ -In link-vmlinux.sh line 175: +In link-vmlinux.sh line 147: @@ -184 +296 @@ -In link-vmlinux.sh line 264: +In link-vmlinux.sh line 239: @@ -192 +304 @@ -In link-vmlinux.sh line 268: +In link-vmlinux.sh line 243: @@ -200 +312 @@ -In link-vmlinux.sh line 270: +In link-vmlinux.sh line 245: @@ -209,3 +321,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 +326 @@ - ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_ARGS}" "${VMLINUX}" + ${OBJCOPY} --update-section .BTF_ids=${btfids_vmlinux} "${VMLINUX}" @@ -219 +331 @@ - https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... + https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...