Alberto Planas Dominguez
2dec5107b8
- Add patch to fix leakage of TPM simulator process add_missing_shut_down_call_on_cleanup.patch - Add patch to fix fapi-quote-verify[_ecc].sh test fix_check_of_qualifying_data.patch - Enable test execution by default OBS-URL: https://build.opensuse.org/request/show/989000 OBS-URL: https://build.opensuse.org/package/show/security/tpm2.0-tools?expand=0&rev=93
71 lines
2.0 KiB
Diff
71 lines
2.0 KiB
Diff
From db6aa7ac5094a04168e60256e154786c0c7e7c1c Mon Sep 17 00:00:00 2001
|
|
From: Alberto Planas <aplanas@suse.com>
|
|
Date: Wed, 13 Jul 2022 13:35:19 +0200
|
|
Subject: [PATCH] test: add missing shut_down call on cleanup
|
|
|
|
The tests "gettime", "readclock" and "symlink" are not calling
|
|
"shut_down" during the "cleanup" stage, making the TPM simulator to keep
|
|
their process during the "make check". Somehow this produces problems
|
|
when the tests are executed in parallel under certain conditions, with
|
|
the effect of "make" not ending and waiting to those process to die.
|
|
|
|
This commit and the mising call in the "cleanup" stage.
|
|
|
|
Fix #3042
|
|
|
|
Signed-off-by: Alberto Planas <aplanas@suse.com>
|
|
---
|
|
test/integration/tests/gettime.sh | 5 ++++-
|
|
test/integration/tests/readclock.sh | 5 ++++-
|
|
test/integration/tests/symlink.sh | 5 ++++-
|
|
3 files changed, 12 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/test/integration/tests/gettime.sh b/test/integration/tests/gettime.sh
|
|
index 5a91210a7..054bef864 100644
|
|
--- a/test/integration/tests/gettime.sh
|
|
+++ b/test/integration/tests/gettime.sh
|
|
@@ -3,7 +3,10 @@
|
|
source helpers.sh
|
|
|
|
cleanup() {
|
|
- rm -f attest.sig attest.data
|
|
+ rm -f attest.sig attest.data
|
|
+ if [ "$1" != "no-shut-down" ]; then
|
|
+ shut_down
|
|
+ fi
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
diff --git a/test/integration/tests/readclock.sh b/test/integration/tests/readclock.sh
|
|
index 56a4c8622..2c59dad09 100644
|
|
--- a/test/integration/tests/readclock.sh
|
|
+++ b/test/integration/tests/readclock.sh
|
|
@@ -3,7 +3,10 @@
|
|
source helpers.sh
|
|
|
|
cleanup() {
|
|
- rm -f clock.yaml
|
|
+ rm -f clock.yaml
|
|
+ if [ "$1" != "no-shut-down" ]; then
|
|
+ shut_down
|
|
+ fi
|
|
}
|
|
trap cleanup EXIT
|
|
|
|
diff --git a/test/integration/tests/symlink.sh b/test/integration/tests/symlink.sh
|
|
index d1c800ad0..b61349eef 100644
|
|
--- a/test/integration/tests/symlink.sh
|
|
+++ b/test/integration/tests/symlink.sh
|
|
@@ -4,7 +4,10 @@ source helpers.sh
|
|
|
|
TMP="$(mktemp -d)"
|
|
cleanup() {
|
|
- rm -rf "$TMP"
|
|
+ rm -rf "$TMP"
|
|
+ if [ "$1" != "no-shut-down" ]; then
|
|
+ shut_down
|
|
+ fi
|
|
}
|
|
trap cleanup EXIT
|
|
|