========== 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.qlBAKXkFEz 2025-12-17 20:36:14.082526523 -0500 +++ /tmp/tmp.6qKv851trB 2025-12-17 20:36:14.226525541 -0500 @@ -1,0 +2,115 @@ +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 79: + ${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 81: + --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 85: + ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_FLAGS} \ + ^---------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_FLAGS}" \ + + +In gen-btf.sh line 87: + --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 99: + echo "" | ${CC} ${CLANG_FLAGS} -c -x c -o ${btf_data} - + ^------------^ SC2086 (info): Double quote to prevent globbing and word splitting. + ^---------^ SC2086 (info): Double quote to prevent globbing and word splitting. + +Did you mean: + echo "" | ${CC} "${CLANG_FLAGS}" -c -x c -o "${btf_data}" - + + +In gen-btf.sh line 100: + ${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 101: + --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 102: + ${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 111: + 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 117: + ${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 122: + ${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 126: + ${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 130: +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 +196,0 @@ - ^------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. @@ -87,10 +201 @@ - "${kallsymso}" "${btf_vmlinux_bin_o}" "${arch_vmlinux_o}" "${ldlibs}" - - -In link-vmlinux.sh line 113: - 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 +204 @@ -In link-vmlinux.sh line 116: - 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 124: - --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 132: - 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 140: +In link-vmlinux.sh line 112: @@ -126 +209 @@ -In link-vmlinux.sh line 147: +In link-vmlinux.sh line 119: @@ -134 +217 @@ -In link-vmlinux.sh line 150: +In link-vmlinux.sh line 122: @@ -144 +227 @@ -In link-vmlinux.sh line 151: +In link-vmlinux.sh line 123: @@ -154 +237 @@ -In link-vmlinux.sh line 169: +In link-vmlinux.sh line 141: @@ -162 +245 @@ -In link-vmlinux.sh line 170: +In link-vmlinux.sh line 142: @@ -167 +250 @@ -In link-vmlinux.sh line 175: +In link-vmlinux.sh line 147: @@ -175 +258 @@ -In link-vmlinux.sh line 176: +In link-vmlinux.sh line 148: @@ -184 +267 @@ -In link-vmlinux.sh line 215: +In link-vmlinux.sh line 188: @@ -192 +275,9 @@ -In link-vmlinux.sh line 272: +In link-vmlinux.sh line 208: + 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 247: @@ -200 +291 @@ -In link-vmlinux.sh line 276: +In link-vmlinux.sh line 251: @@ -208 +299 @@ -In link-vmlinux.sh line 278: +In link-vmlinux.sh line 253: @@ -217,3 +308,3 @@ -In link-vmlinux.sh line 299: - ${RESOLVE_BTFIDS} ${RESOLVE_BTFIDS_ARGS} "${VMLINUX}" - ^--------------------^ SC2086 (info): Double quote to prevent globbing and word splitting. +In link-vmlinux.sh line 269: + ${OBJCOPY} --update-section .BTF_ids=${btfids_vmlinux} ${VMLINUX} + ^--------^ SC2086 (info): Double quote to prevent globbing and word splitting. @@ -222 +313 @@ - ${RESOLVE_BTFIDS} "${RESOLVE_BTFIDS_ARGS}" "${VMLINUX}" + ${OBJCOPY} --update-section .BTF_ids=${btfids_vmlinux} "${VMLINUX}" @@ -227 +318 @@ - https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf... + https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...