From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Lars Schneider <larsxschneider@gmail.com>
Subject: [PATCH 0/4] robustifying t5504
Date: Wed, 24 Feb 2016 02:36:03 -0500 [thread overview]
Message-ID: <20160224073603.GA9163@sigill.intra.peff.net> (raw)
I got a spurious test failure on t5504 while running the test suite
today. This is the result of my quest through the SIGPIPE rabbit hole.
Since this is not the first time I've investigated tests failing under
load, I finally broke down and wrote a helper script. It probably needs
some adapting for other people's environments, but I'll share it here in
case anyone is interested:
-- >8 --
#!/bin/sh
test=$1; shift
test=$(cd t && echo $test*.sh)
: ${GIT_STRESS_LOAD:=$(( 2 * $(grep -c ^processor /proc/cpuinfo)))}
: ${GIT_STRESS_ROOT:=/var/ram/git-stress}
mkdir -p "$GIT_STRESS_ROOT" || exit 1
rm -f "$GIT_STRESS_ROOT/fail"
trap 'echo aborted >"$GIT_STRESS_ROOT/fail"' TERM INT HUP
for i in $(seq $GIT_STRESS_LOAD); do
(
cd t &&
while ! test -e "$GIT_STRESS_ROOT/fail"
do
if ./$test \
--root="$GIT_STRESS_ROOT/trash-$i" \
-v -i >"$GIT_STRESS_ROOT/output-$i" 2>&1
then
echo >&2 "OK $i"
else
echo >&2 "FAIL $i"
cp "$GIT_STRESS_ROOT/output-$i" "$GIT_STRESS_ROOT/fail"
fi
done
) &
done
wait
cat "$GIT_STRESS_ROOT/fail"
-- 8< --
You can run it like "./stress t5504", and it will run t5504 over and
over in parallel until one instance fails. Without this patch series,
t5504 generally fails for me within 30 seconds or so. With it, I can run
for several minutes without problems.
[1/4]: write_or_die: handle EPIPE in async threads
[2/4]: fetch-pack: ignore SIGPIPE in sideband demuxer
[3/4]: test_must_fail: report number of unexpected signal
[4/4]: t5504: handle expected output from SIGPIPE death
-Peff
next reply other threads:[~2016-02-24 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 7:36 Jeff King [this message]
2016-02-24 7:40 ` [PATCH 1/4] write_or_die: handle EPIPE in async threads Jeff King
2016-02-24 7:44 ` [PATCH 2/4] fetch-pack: ignore SIGPIPE in sideband demuxer Jeff King
2016-02-24 7:45 ` [PATCH 3/4] test_must_fail: report number of unexpected signal Jeff King
2016-02-24 7:48 ` [PATCH 4/4] t5504: handle expected output from SIGPIPE death Jeff King
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=20160224073603.GA9163@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).