public inbox for linux-integrity@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: zohar@linux.ibm.com, roberto.sassu@huaweicloud.com,
	Stefan Berger <stefanb@linux.ibm.com>
Subject: [ima-evm-utils PATCH 03/14] tests: Address issues raised by shellcheck SC2046
Date: Fri, 10 Nov 2023 15:21:26 -0500	[thread overview]
Message-ID: <20231110202137.3978820-4-stefanb@linux.ibm.com> (raw)
In-Reply-To: <20231110202137.3978820-1-stefanb@linux.ibm.com>

Address issues raised by shellcheck SC2046:
  "Quote this to prevent word splitting."

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 tests/Makefile.am         | 2 +-
 tests/install-fsverity.sh | 2 +-
 tests/install-openssl3.sh | 2 +-
 tests/install-swtpm.sh    | 2 +-
 tests/install-tss.sh      | 2 +-
 tests/softhsm_setup       | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1848091..bcc1ee4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,7 +26,7 @@ clean-local:
 distclean: distclean-keys
 
 shellcheck:
-	shellcheck -i SC2086,SC2181 \
+	shellcheck -i SC2086,SC2181,SC2046 \
 		functions.sh gen-keys.sh install-fsverity.sh \
 		install-mount-idmapped.sh install-openssl3.sh \
 		install-swtpm.sh install-tss.sh softhsm_setup \
diff --git a/tests/install-fsverity.sh b/tests/install-fsverity.sh
index c760485..fa31b2b 100755
--- a/tests/install-fsverity.sh
+++ b/tests/install-fsverity.sh
@@ -2,5 +2,5 @@
 
 git clone https://git.kernel.org/pub/scm/fs/fsverity/fsverity-utils.git
 cd fsverity-utils
-CC=gcc make -j$(nproc)
+CC=gcc make -j"$(nproc)"
 cd ..
diff --git a/tests/install-openssl3.sh b/tests/install-openssl3.sh
index 29457f3..f27da4c 100755
--- a/tests/install-openssl3.sh
+++ b/tests/install-openssl3.sh
@@ -21,7 +21,7 @@ fi
 ./Configure "$FLAGS" no-engine no-dynamic-engine --prefix=/opt/openssl3 --openssldir=/opt/openssl3
 # Uncomment for debugging
 # perl configdata.pm --dump | grep engine
-make -j$(nproc)
+make -j"$(nproc)"
 # only install apps and library
 sudo make install_sw
 
diff --git a/tests/install-swtpm.sh b/tests/install-swtpm.sh
index de9b5c7..4fa97eb 100755
--- a/tests/install-swtpm.sh
+++ b/tests/install-swtpm.sh
@@ -16,6 +16,6 @@ mkdir ibmtpm$version
 cd ibmtpm$version
 tar --no-same-owner -xvzf ../download
 cd src
-make -j$(nproc)
+make -j"$(nproc)"
 $SUDO cp tpm_server /usr/local/bin/
 cd ../..
diff --git a/tests/install-tss.sh b/tests/install-tss.sh
index c9c179e..31ea690 100755
--- a/tests/install-tss.sh
+++ b/tests/install-tss.sh
@@ -3,6 +3,6 @@
 set -ex
 git clone https://git.code.sf.net/p/ibmtpm20tss/tss
 cd tss
-autoreconf -i && ./configure --disable-tpm-1.2 --disable-hwtpm && make -j$(nproc) && sudo make install
+autoreconf -i && ./configure --disable-tpm-1.2 --disable-hwtpm && make -j"$(nproc)" && sudo make install
 cd ..
 rm -rf tss
diff --git a/tests/softhsm_setup b/tests/softhsm_setup
index 95bf0b1..6f8a74e 100755
--- a/tests/softhsm_setup
+++ b/tests/softhsm_setup
@@ -82,7 +82,7 @@ setup_softhsm() {
 		fi
 		sudo mv /etc/gnutls/pkcs11.conf \
 			/etc/gnutls/pkcs11.conf.bak &>/dev/null
-		if [ $(id -u) -eq 0 ]; then
+		if [ "$(id -u)" -eq 0 ]; then
 			SONAME="$(sudo -u nobody brew ls --verbose softhsm | \
 				  grep -E "\.so$")"
 		else
-- 
2.41.0


  parent reply	other threads:[~2023-11-10 20:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-10 20:21 [ima-evm-utils PATCH 00/14] Enable shellcheck and fix some issue Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 01/14] tests: Address issues raised by shellcheck SC2086 & enable shellcheck Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 02/14] tests: Address issues raised by shellcheck SC2181 Stefan Berger
2023-11-10 20:21 ` Stefan Berger [this message]
2023-11-10 20:21 ` [ima-evm-utils PATCH 04/14] tests: Address issues raised by shellcheck SC2320 Stefan Berger
2023-11-21 23:03   ` Mimi Zohar
2023-11-21 23:20     ` Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 05/14] tests: Address issues raised by shellcheck SC2317 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 06/14] tests: Address issues raised by shellcheck SC2034 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 07/14] tests: Address issues raised by shellcheck SC2164 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 08/14] tests: Address issues raised by shellcheck SC2166 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 09/14] tests: Address issues raised by shellcheck SC2294 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 10/14] tests: Address issues raised by shellcheck SC2206 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 11/14] tests: Address issues raised by shellcheck SC2196 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 12/14] tests: Address issues raised by shellcheck SC2043 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 13/14] tests: Address issues raised by shellcheck SC2295 Stefan Berger
2023-11-10 20:21 ` [ima-evm-utils PATCH 14/14] tests: Address issues raised by shellcheck SC2003 Stefan Berger
2023-11-13 10:35   ` Roberto Sassu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231110202137.3978820-4-stefanb@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=roberto.sassu@huaweicloud.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox