summaryrefslogtreecommitdiffstats
path: root/tests/ts/script
diff options
context:
space:
mode:
authorRuediger Meier2014-05-13 15:13:12 +0200
committerRuediger Meier2014-05-13 20:11:24 +0200
commitfcbc4db886752d822561149b820195ee666ca875 (patch)
tree1213c83d5b0bab7c599a0e2b0640a4ceec805316 /tests/ts/script
parenttests: ipcs/limits2 is known to fail (diff)
downloadkernel-qcow2-util-linux-fcbc4db886752d822561149b820195ee666ca875.tar.gz
kernel-qcow2-util-linux-fcbc4db886752d822561149b820195ee666ca875.tar.xz
kernel-qcow2-util-linux-fcbc4db886752d822561149b820195ee666ca875.zip
tests: script/race would work with variable loop count
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'tests/ts/script')
-rwxr-xr-xtests/ts/script/race10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ts/script/race b/tests/ts/script/race
index ef7e83f12..103a14a47 100755
--- a/tests/ts/script/race
+++ b/tests/ts/script/race
@@ -28,10 +28,18 @@ bingofile="$TS_OUTDIR/${TS_TESTNAME}-bingo"
set -o pipefail
-for i in `seq 1 1000`; do
+count=1000
+for i in `seq 1 $count`; do
$TS_CMD_SCRIPT -q -c "printf 'Bingo\n'" $bingofile
done | grep -c Bingo >> $TS_OUTPUT
+seen=$(<$TS_OUTPUT)
+if [ $seen = $count ]; then
+ echo "all bingos seen" > $TS_OUTPUT
+else
+ echo "only $seen of $count bingos seen" > $TS_OUTPUT
+fi
+
rm -f $bingofile
ts_finalize