Skip to content

ffbs-mesh-vpn-parker: tests: fix ShellCheck SC2317 in Lint workflow - #60

Merged
awlx merged 1 commit into
parker-release-2026.11from
awlx-parker5-shellcheck-lint-fix
Nov 20, 2026
Merged

awlx merged 1 commit into
parker-release-2026.11from
awlx-parker5-shellcheck-lint-fix

Conversation

@awlx

@awlx awlx commented Nov 20, 2026

Copy link
Copy Markdown
Member

Summary

The Lint workflow fails on parker-release-2026.11. ShellCheck reports SC2317 ("Command appears to be unreachable") in two test scripts. The functions are called through trap or by other test functions, so the findings are false positives.

ShellCheck 0.10 and later use SC2329 for this case. The scripts already disable SC2329. The Lint workflow uses an older ShellCheck, which uses SC2317. This change adds SC2317 to the existing directives.

Changed files (test scripts only, not part of the firmware):

  • ffbs-mesh-vpn-parker/tests/dhcp-authoritative-test.sh
  • ffbs-mesh-vpn-parker/tests/ra-goodbye-test.sh

The test behavior does not change.

Tests

  • docker run --rm -v "$PWD":/mnt -w /mnt koalaman/shellcheck:v0.9.0 -S style ffbs-mesh-vpn-parker/tests/dhcp-authoritative-test.sh ffbs-mesh-vpn-parker/tests/ra-goodbye-test.sh
    • Before the change: 12 SC2317 findings (same as CI).
    • After the change: no findings.
  • shellcheck -S style ffbs-mesh-vpn-parker/tests/*.sh (ShellCheck 0.11.0): no findings.
  • docker run --rm -v "$PWD":/w -w /w alpine:3.20 sh tests/ra-goodbye-test.sh (in ffbs-mesh-vpn-parker): all checks PASS, exit 0.
  • docker run --rm --privileged -v "$PWD":/w alpine:3.20 sh -c 'apk add -q dnsmasq iproute2 python3 && sh /w/tests/dhcp-authoritative-test.sh': all checks ok, exit 0.

Not tested: no test on a Gluon node. Not necessary, because only comment lines in test scripts change.

…ions

ShellCheck before 0.10 reports indirectly called functions as SC2317,
newer versions as SC2329. The Lint workflow uses an older version.
@awlx
awlx merged commit a2f5150 into parker-release-2026.11 Nov 20, 2026
9 checks passed
@awlx
awlx deleted the awlx-parker5-shellcheck-lint-fix branch November 20, 2026 15:53
awlx added a commit to freifunkMUC/site-ffm that referenced this pull request Nov 21, 2026
Includes:
- freifunkMUC/community-packages#60: tests: fix ShellCheck SC2317
- freifunkMUC/community-packages#61: count the clients of routing nodes
- freifunkMUC/community-packages#66: rx traffic as a second liveness check
- freifunkMUC/community-packages#67: report the CLAT traffic through respondd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant