mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-01-23 23:46:04 +00:00
tests: Replace kill_quiet after shutdown with wait_process_gone
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
b1eb3620e2
commit
4dd376c3b4
@ -246,10 +246,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
|
||||
@ -79,10 +79,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -167,10 +167,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -96,10 +96,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -144,10 +144,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -249,10 +249,8 @@ if [ $? -ne 0 ]; then
|
||||
cat $logfile
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
@ -320,8 +318,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
@ -368,8 +365,7 @@ if [ $? -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM not running anymore after failed INIT."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
@ -398,8 +394,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
|
||||
@ -256,10 +256,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
|
||||
@ -310,10 +310,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
echo "TPM Logfile:"
|
||||
cat $logfile
|
||||
|
||||
@ -140,10 +140,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -114,10 +114,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -60,10 +60,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
if ! wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM not running anymore after INIT."
|
||||
exit 1
|
||||
fi
|
||||
@ -151,10 +148,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -220,10 +220,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -105,10 +105,7 @@ if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.5
|
||||
|
||||
kill_quiet -0 ${SWTPM_PID} 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${SWTPM_PID} 1; then
|
||||
echo "Error: ${SWTPM_INTERFACE} TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -109,9 +109,7 @@ if [ "$res" != "$exp" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sleep 0.2
|
||||
kill_quiet -0 $PID 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
if wait_process_gone ${PID} 1; then
|
||||
echo "Error: TPM should not be running anymore."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user