qemu-tools CI fails: shellcheck SC2013 in qemu/rootfs/init (warden.run) #18

Closed
opened 2026-10-09 18:41:40 -06:00 by noah · 1 comment
Owner

Found in M0 wave 2 (kernel lane). CI run 2531 (SDK branch rb/w04-kernel-options, commit 469f31c) job qemu-tools failed:

In qemu/rootfs/init line 53:
for w in $(cat /proc/cmdline); do
         ^------------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop.

The loop was added with the warden.run= entry (commit 445b208). The shellcheck -x qemu/*.sh ... qemu/rootfs/init step of the qemu-tools job exits non-zero on an info finding, so the SDK PR for the M0 kernel batch cannot go green.

Fix: read the command line into a variable (read -r CMDLINE < /proc/cmdline) and loop over its words. The same command is the regression test: the qemu-tools job runs it, and tests/qemu-init/run-init-shellcheck-tests.sh runs it locally, with a doctored copy proven red.

Found in M0 wave 2 (kernel lane). CI run 2531 (SDK branch rb/w04-kernel-options, commit 469f31c) job qemu-tools failed: ``` In qemu/rootfs/init line 53: for w in $(cat /proc/cmdline); do ^------------------^ SC2013 (info): To read lines rather than words, pipe/redirect to a 'while read' loop. ``` The loop was added with the `warden.run=` entry (commit 445b208). The `shellcheck -x qemu/*.sh ... qemu/rootfs/init` step of the qemu-tools job exits non-zero on an info finding, so the SDK PR for the M0 kernel batch cannot go green. Fix: read the command line into a variable (`read -r CMDLINE < /proc/cmdline`) and loop over its words. The same command is the regression test: the qemu-tools job runs it, and `tests/qemu-init/run-init-shellcheck-tests.sh` runs it locally, with a doctored copy proven red.
Author
Owner

Fixed on SDK rebuild by PR #17 (merge commit 5507842); CI run 2590/2591 green. The regression test is named in the issue and runs in the qemu-tools / kernel-symbols jobs.

Fixed on SDK rebuild by PR #17 (merge commit 5507842); CI run 2590/2591 green. The regression test is named in the issue and runs in the qemu-tools / kernel-symbols jobs.
noah closed this issue 2026-10-09 20:08:45 -06:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blueflare/bfe-core1106-sdk#18