From: Lukas Czerner <lczerner@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH] 270: wait for fsstress processes to be killed
Date: Mon, 15 Jun 2020 12:52:36 +0200 [thread overview]
Message-ID: <20200615105236.32198-1-lczerner@redhat.com> (raw)
Currently wait will do nothing, because $pid is empty due to the fact
that the command was ran on the background in a separate shell so we
never got the $! set.
This is causing unexpected test failures especially under low memory
due to the fact that the fsstress is still running when we are
checking and comparing quota usage.
Fix it by using -w argument for killall that will wait for all processes
to actually die before it exits.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
---
tests/generic/270 | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tests/generic/270 b/tests/generic/270
index 5092ffa4..55779f5e 100755
--- a/tests/generic/270
+++ b/tests/generic/270
@@ -38,7 +38,6 @@ _workout()
$SETCAP_PROG cap_chown=epi $tmp.fsstress.bin
(su $qa_user -c "$tmp.fsstress.bin $args" &) > /dev/null 2>&1
- pid=$!
echo "Run dd writers in parallel"
for ((i=0; i < num_iterations; i++))
@@ -50,8 +49,7 @@ _workout()
sleep $enospc_time
done
- $KILLALL_PROG $tmp.fsstress.bin
- wait $pid
+ $KILLALL_PROG -w $tmp.fsstress.bin
}
# real QA test starts here
--
2.21.3
reply other threads:[~2020-06-15 10:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200615105236.32198-1-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=fstests@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox