changeset 47805:8892f604e242 stable

test-nointerrupt: make "sure" the handler "might" trigger (issue6558) We are sure that the signal got sent in the right time frame, however, we still have race, so either the code is actually buggy or we need some security to make sure the signal get processed. We might be affected by https://bugs.python.org/issue43406 ? Differential Revision: https://phab.mercurial-scm.org/D11251
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 03 Aug 2021 21:22:02 +0200
parents 5ad37164a8fe
children d5d46dcd356b
files tests/test-nointerrupt.t
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-nointerrupt.t	Tue Aug 03 19:26:26 2021 +0200
+++ b/tests/test-nointerrupt.t	Tue Aug 03 21:22:02 2021 +0200
@@ -27,6 +27,8 @@
   >     with ui.uninterruptible():
   >         testing.write_file(sync_file, b'%d' % os.getpid())
   >         testing.wait_file(done_file)
+  >         # make sure we get rescheduled and the signal get a chance to be handled
+  >         time.sleep(0.1)
   >         ui.warn(b"end of unsafe operation\n")
   >     ui.warn(b"%d second(s) passed\n" % int(time.time() - start))
   > EOF
@@ -40,6 +42,7 @@
   > fi
   > "$RUNTESTDIR/testlib/wait-on-file" 10 "$SYNC_FILE" || exit 2
   > kill -s \$SIG \`cat "$SYNC_FILE"\`
+  > sleep 1
   > touch "$DONE_FILE"
   > EOF