psasim: small fixes to all.sh and test bash scripts
Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
diff --git a/tests/psa-client-server/psasim/test/kill_servers.sh b/tests/psa-client-server/psasim/test/kill_servers.sh
index e84fd39..d722637 100755
--- a/tests/psa-client-server/psasim/test/kill_servers.sh
+++ b/tests/psa-client-server/psasim/test/kill_servers.sh
@@ -7,6 +7,9 @@
pkill psa_server || true
+# Remove temporary files
+rm -f psa_notify_*
+
# Remove all IPCs
# Not just ipcrm -all=msg as it is not supported on macOS.
# Filter out header and empty lines, choosing to select based on keys being
diff --git a/tests/psa-client-server/psasim/test/run_test.sh b/tests/psa-client-server/psasim/test/run_test.sh
index ac9c4c8..f54e352 100755
--- a/tests/psa-client-server/psasim/test/run_test.sh
+++ b/tests/psa-client-server/psasim/test/run_test.sh
@@ -16,10 +16,9 @@
CLIENT_BIN=$1
shift
-ipcs | grep q | awk '{ printf " -q " $2 }' | xargs ipcrm > /dev/null 2>&1 || true
+./kill_servers.sh
./start_server.sh
./$CLIENT_BIN "$@"
-# Kill server once client exited
-pkill psa_server
+./kill_servers.sh