t/stress: add a test that usually triggers a bug using 950-curse.
It looks like we're updating the stamp for t/countall while another task is replacing the file, which suggests a race condition in our state management database.
This commit is contained in:
parent
d8811601f1
commit
999ba4fb13
5 changed files with 16 additions and 2 deletions
1
t/.gitignore
vendored
1
t/.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
||||||
/broken
|
/broken
|
||||||
/shellfile
|
/shellfile
|
||||||
|
/stress.log
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
rm -f *.n[012]
|
rm -f *.n[012] countall
|
||||||
|
|
||||||
. ./check-1.sh
|
. ./check-1.sh
|
||||||
redo-ifchange 1.n0 2.n0 3.n0
|
redo-ifchange 1.n0 2.n0 3.n0
|
||||||
|
|
|
||||||
3
t/all.do
3
t/all.do
|
|
@ -29,3 +29,6 @@ sed 's/\.do$//' | {
|
||||||
redo "$d"
|
redo "$d"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if all that worked run a repeated stress test to look for races
|
||||||
|
redo stress
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@
|
||||||
sed 's/\.do$//' |
|
sed 's/\.do$//' |
|
||||||
xargs redo
|
xargs redo
|
||||||
|
|
||||||
rm -f broken shellfile *~ .*~
|
rm -f broken shellfile *~ .*~ stress.log
|
||||||
rm -rf 'space home dir'
|
rm -rf 'space home dir'
|
||||||
|
|
|
||||||
10
t/stress.do
Normal file
10
t/stress.do
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
rm -f $1.log
|
||||||
|
exec >$1.log
|
||||||
|
|
||||||
|
# This test twiddles the same files over and over, and seems to trigger race conditions
|
||||||
|
# in redo if run repeatedly with a large redo -j.
|
||||||
|
for d in $(seq 25); do
|
||||||
|
echo "stress test: cycle $d" >&2
|
||||||
|
./flush-cache 2>&1
|
||||||
|
redo 950-curse/all 2>&1 || { rv=$?; echo "stress test: log is $1.log" >&2; exit $rv; }
|
||||||
|
done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue