69 lines
1.7 KiB
Diff
69 lines
1.7 KiB
Diff
From 3e8693ee7b465a7e0994234c4eedfc566fa801d6 Mon Sep 17 00:00:00 2001
|
|
From: Anna Schumaker <Anna.Schumaker@Netapp.com>
|
|
Date: Thu, 27 Jan 2022 09:48:09 -0500
|
|
Subject: [PATCH 2/3] check: Fixes for running multiple instances in parallel
|
|
|
|
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
|
|
---
|
|
check | 9 ++++++---
|
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/check b/check
|
|
index a08631213cbb..de4576bdc839 100755
|
|
--- a/check
|
|
+++ b/check
|
|
@@ -34,7 +34,7 @@ istop=false
|
|
_err_msg=""
|
|
|
|
# start the initialisation work now
|
|
-iam=check
|
|
+iam=check-$$
|
|
|
|
export MSGVERB="text:action"
|
|
export QA_CHECK_FS=${QA_CHECK_FS:=true}
|
|
@@ -360,6 +360,7 @@ if ! . ./common/rc; then
|
|
echo "check: failed to source common/rc"
|
|
exit 1
|
|
fi
|
|
+export PLATFORM=$(_full_platform_details)
|
|
|
|
if [ -n "$subdir_xfile" ]; then
|
|
for d in $SRC_GROUPS $FSTYP; do
|
|
@@ -435,6 +436,7 @@ _wrapup()
|
|
if $showme; then
|
|
if $needwrap; then
|
|
if $do_report; then
|
|
+ export PLATFORM="`_full_platform_details`"
|
|
_make_section_report
|
|
fi
|
|
needwrap=false
|
|
@@ -504,7 +506,7 @@ _wrapup()
|
|
|
|
sum_bad=`expr $sum_bad + $n_bad`
|
|
_wipe_counters
|
|
- rm -f /tmp/*.rawout /tmp/*.out /tmp/*.err /tmp/*.time
|
|
+ rm -f $tmp.rawout $tmp.out $tmp.err $tmp.time
|
|
if ! $OPTIONS_HAVE_SECTIONS; then
|
|
rm -f $tmp.*
|
|
fi
|
|
@@ -580,6 +582,7 @@ _adjust_oom_score -500
|
|
_run_seq() {
|
|
local cmd=(bash -c "test -w ${OOM_SCORE_ADJ} && echo 250 > ${OOM_SCORE_ADJ}; exec ./$seq")
|
|
|
|
+ (flock -x 9 || exit 1
|
|
if [ -n "${HAVE_SYSTEMD_SCOPES}" ]; then
|
|
local unit="$(systemd-escape "fs$seq").scope"
|
|
systemctl reset-failed "${unit}" &> /dev/null
|
|
@@ -589,7 +592,7 @@ _run_seq() {
|
|
return "${res}"
|
|
else
|
|
"${cmd[@]}"
|
|
- fi
|
|
+ fi) 9>/tmp/$(systemd-escape fs$seq).lock
|
|
}
|
|
|
|
_detect_kmemleak
|
|
--
|
|
2.34.1
|
|
|