Skip to content

Enable shellcheck and fix some issues

Stefan Berger linux-integrity 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 1 replyIn review
  2. v214 patches 0 repliesSuperseded
  3. v114 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Replace read with readarray

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14tests: Address issues raised by shellcheck SC2086 & enable shellcheckMakefile.am tests/Makefile.am tests/boot_aggregate.test +6 more+68 -560 replies
2/14tests: Address issues raised by shellcheck SC2181tests/Makefile.am tests/boot_aggregate.test tests/functions.sh +3 more+25 -410 replies
3/14tests: Address issues raised by shellcheck SC2046tests/Makefile.am tests/install-fsverity.sh tests/install-openssl3.sh +3 more+10 -90 replies
4/14tests: Address issues raised by shellcheck SC2320tests/Makefile.am tests/mmap_check.test tests/portable_signatures.test+7 -120 replies
5/14tests: Address issues raised by shellcheck SC2317tests/Makefile.am tests/fsverity.test+3 -10 replies
6/14tests: Address issues raised by shellcheck SC2034tests/Makefile.am tests/functions.sh tests/mmap_check.test+4 -10 replies
7/14tests: Address issues raised by shellcheck SC2164tests/Makefile.am tests/boot_aggregate.test tests/install-fsverity.sh +1 more+4 -40 replies
8/14tests: Address issues raised by shellcheck SC2166tests/Makefile.am tests/softhsm_setup+2 -20 replies
9/14tests: Address issues raised by shellcheck SC2294tests/Makefile.am tests/gen-keys.sh+4 -20 replies
10/14tests: Address issues raised by shellcheck SC2206tests/Makefile.am tests/boot_aggregate.test+2 -30 replies
11/14tests: Address issues raised by shellcheck SC2196tests/Makefile.am tests/functions.sh+2 -20 replies
12/14tests: Address issues raised by shellcheck SC2043tests/Makefile.am tests/gen-keys.sh+3 -10 replies
13/14tests: Address issues raised by shellcheck SC2295tests/Makefile.am tests/fsverity.test+2 -20 replies
14/14tests: Address issues raised by shellcheck SC2003tests/Makefile.am tests/portable_signatures.test+1 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [ima-evm-utils PATCH v3 00/14] Enable shellcheck and fix some issues

Enable shellcheck for the bash scripts in the tests directory. Fix issues on the way that are found when particular checks are enabled. In the end all shellcheck v0.9 checks are enabled and shellcheck passes without any issues.

Shellcheck can be run using the following command:

make shellcheck

Apart from style issues two real issues are detected by SC2003 and SC2295.

Regards,
Stefan

v3:
- Replace read with readarray

v2:
- Rebased on latest next-testing branch
- 1/14: Use ${var:+${var}} pattern for variables that hold multiple arguments like "--foo bar" which would become one argument if passed with "${var}"; fixed a build issue
- 4/14: remove $new_policy file in success and failure cases

Stefan Berger (14):
tests: Address issues raised by shellcheck SC2086 & enable shellcheck
tests: Address issues raised by shellcheck SC2181
tests: Address issues raised by shellcheck SC2046
tests: Address issues raised by shellcheck SC2320
tests: Address issues raised by shellcheck SC2317
tests: Address issues raised by shellcheck SC2034
tests: Address issues raised by shellcheck SC2164
tests: Address issues raised by shellcheck SC2166
tests: Address issues raised by shellcheck SC2294
tests: Address issues raised by shellcheck SC2206
tests: Address issues raised by shellcheck SC2196
tests: Address issues raised by shellcheck SC2043
tests: Address issues raised by shellcheck SC2295
tests: Address issues raised by shellcheck SC2003

 Makefile.am                     |  5 ++-
 tests/Makefile.am               | 11 ++++++-
 tests/boot_aggregate.test       | 29 +++++++----------
 tests/fsverity.test             | 22 +++++++------
 tests/functions.sh              | 36 ++++++++++----------
 tests/gen-keys.sh               |  8 +++--
 tests/ima_hash.test             |  4 +--
 tests/install-fsverity.sh       |  4 +--
 tests/install-mount-idmapped.sh |  2 +-
 tests/install-openssl3.sh       | 14 ++++----
 tests/install-swtpm.sh          |  9 ++---
 tests/install-tss.sh            |  2 +-
 tests/mmap_check.test           | 10 +++---
 tests/portable_signatures.test  | 11 +++----
 tests/sign_verify.test          | 15 ++++-----
 tests/softhsm_setup             | 58 ++++++++++++++-------------------
 16 files changed, 119 insertions(+), 121 deletions(-)
Signature · 1 line
2.43.0