From: Mimi Zohar <zohar@linux.ibm.com>
To: linux-integrity@vger.kernel.org
Cc: Ken Goldman <kgold@linux.ibm.com>,
Mimi Zohar <zohar@linux.ibm.com>,
Bruno Meneguele <bmeneg@redhat.com>, Petr Vorel <pvorel@suse.cz>
Subject: [ima-evm-utils][PATCH 2/3] travis: rename the software tpm variables
Date: Fri, 16 Oct 2020 16:17:44 -0400 [thread overview]
Message-ID: <20201016201745.124355-3-zohar@linux.ibm.com> (raw)
In-Reply-To: <20201016201745.124355-1-zohar@linux.ibm.com>
The existing variable names swtpm and swtpm1 is confusing. Rename
"swtpm" to "tpm_server" and "swtpm1" as "swtpm".
Reported-by: Ken Goldman <kgoldman@us.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
---
tests/boot_aggregate.test | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/tests/boot_aggregate.test b/tests/boot_aggregate.test
index edebf1d29f23..ab061d5e5845 100755
--- a/tests/boot_aggregate.test
+++ b/tests/boot_aggregate.test
@@ -54,36 +54,36 @@ cleanup() {
# Try to start a software TPM if needed.
swtpm_start() {
- local swtpm swtpm1
+ local tpm_server swtpm
- swtpm="$(which tpm_server)"
- swtpm1="$(which swtpm)"
- if [ -z "${swtpm}" ] && [ -z "${swtpm1}" ]; then
+ tpm_server="$(which tpm_server)"
+ swtpm="$(which swtpm)"
+ if [ -z "${tpm_server}" ] && [ -z "${swtpm}" ]; then
echo "${CYAN}SKIP: Software TPM (tpm_server and swtpm) not found${NORM}"
return "$SKIP"
fi
- if [ -n "${swtpm1}" ]; then
- pgrep swtpm1
+ if [ -n "${swtpm}" ]; then
+ pgrep swtpm
if [ $? -eq 0 ]; then
echo "INFO: Software TPM (swtpm) already running"
return 114
else
- echo "INFO: Starting software TPM: ${swtpm1}"
- mkdir ./myvtpm
- ${swtpm1} socket --tpmstate dir=./myvtpm --tpm2 --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --flags not-need-init > /dev/null 2>&1 &
+ echo -n "INFO: Starting software TPM: ${swtpm}"
+ mkdir -p ./myvtpm
+ ${swtpm} socket --tpmstate dir=./myvtpm --tpm2 --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --flags not-need-init > /dev/null 2>&1 &
SWTPM_PPID=$!
fi
- elif [ -n "${swtpm}" ]; then
+ elif [ -n "${tpm_server}" ]; then
# tpm_server uses the Microsoft simulator encapsulated packet format
export TPM_SERVER_TYPE="mssim"
- pgrep swtpm
+ pgrep tpm_server
if [ $? -eq 0 ]; then
echo "INFO: Software TPM (tpm_server) already running"
return 114
else
- echo "INFO: Starting software TPM: ${swtpm}"
- ${swtpm} > /dev/null 2>&1 &
+ echo "INFO: Starting software TPM: ${tpm_server}"
+ ${tpm_server} > /dev/null 2>&1 &
SWTPM_PPID=$!
fi
fi
--
2.18.4
next prev parent reply other threads:[~2020-10-16 20:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 20:17 [ima-evm-utils][PATCH 0/3] travis: misc software TPM changes Mimi Zohar
2020-10-16 20:17 ` [ima-evm-utils][PATCH 1/3] travis: retry sending tssstartup Mimi Zohar
2020-10-16 20:17 ` Mimi Zohar [this message]
2020-10-16 20:17 ` [ima-evm-utils][PATCH 3/3] travis: properly kill the software TPM Mimi Zohar
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=20201016201745.124355-3-zohar@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=bmeneg@redhat.com \
--cc=kgold@linux.ibm.com \
--cc=linux-integrity@vger.kernel.org \
--cc=pvorel@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.