diff mbox series

[2/2] DO NOT APPLY git-checkout.sh: add sleep to demonstrate race

Message ID 20190415162809.23675-3-ian.jackson@eu.citrix.com (mailing list archive)
State New, archived
Headers show
Series Fix make -j race due to stubdom and tools make -C | expand

Commit Message

Ian Jackson April 15, 2019, 4:28 p.m. UTC
This allows easy reproduction of git-checkout races: each checkout
waits until you kill its sleep.  You can see the multiple identical
checkout runes in ps etc.  A good rune is:
  watch 'ps -fHtpts/60'
(replacing pts/60 with the pty of your build job).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 scripts/git-checkout.sh | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh
index 20ae31ff23..290026ad32 100755
--- a/scripts/git-checkout.sh
+++ b/scripts/git-checkout.sh
@@ -11,6 +11,8 @@  DIR=$3
 
 set -e
 
+sleep 1000 ||:
+
 if test \! -d $DIR-remote; then
 	rm -rf $DIR-remote $DIR-remote.tmp
 	mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp