diff --git a/t/.gitignore b/t/.gitignore index bf9e4ed..1ac69ff 100644 --- a/t/.gitignore +++ b/t/.gitignore @@ -1,2 +1,3 @@ /broken /shellfile +/stress.log diff --git a/t/950-curse/all.do b/t/950-curse/all.do index b436dd5..4dd1548 100644 --- a/t/950-curse/all.do +++ b/t/950-curse/all.do @@ -1,4 +1,4 @@ -rm -f *.n[012] +rm -f *.n[012] countall . ./check-1.sh redo-ifchange 1.n0 2.n0 3.n0 diff --git a/t/all.do b/t/all.do index 4e9f6bb..7aa7c95 100644 --- a/t/all.do +++ b/t/all.do @@ -29,3 +29,6 @@ sed 's/\.do$//' | { redo "$d" done } + +# if all that worked run a repeated stress test to look for races +redo stress diff --git a/t/clean.do b/t/clean.do index e69f124..a78b666 100644 --- a/t/clean.do +++ b/t/clean.do @@ -2,5 +2,5 @@ sed 's/\.do$//' | xargs redo -rm -f broken shellfile *~ .*~ +rm -f broken shellfile *~ .*~ stress.log rm -rf 'space home dir' diff --git a/t/stress.do b/t/stress.do new file mode 100644 index 0000000..87b5ec3 --- /dev/null +++ b/t/stress.do @@ -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