From b13154de3eca5ba28fbb4854d916cd0be5febeed Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Fri, 2 Nov 2012 20:15:39 +0400 Subject: Imported Upstream version 2.22 --- tests/ts/script/race | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 tests/ts/script/race (limited to 'tests/ts/script') diff --git a/tests/ts/script/race b/tests/ts/script/race new file mode 100755 index 0000000..e482264 --- /dev/null +++ b/tests/ts/script/race @@ -0,0 +1,36 @@ +#!/bin/bash + +# +# Copyright (C) 2007 Karel Zak +# +# This file is part of util-linux. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# + +TS_TOPDIR="$(dirname $0)/../.." +TS_DESC="race conditions" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +bingofile="$TS_OUTDIR/${TS_TESTNAME}-bingo" + +set -o pipefail + +for i in `seq 1 1000`; do + $TS_CMD_SCRIPT -q -c "printf 'Bingo\n'" $bingofile +done | grep -c Bingo >> $TS_OUTPUT + +rm -f $bingofile + +ts_finalize + -- cgit v1.2.3