Patchwork [Bug,6402] New: test-stdio.py flakiness

login
register
mail settings
Submitter mercurial-bugs@mercurial-scm.org
Date Sept. 2, 2020, 3:42 a.m.
Message ID <bug-6402-285@https.bz.mercurial-scm.org/>
Download mbox | patch
Permalink /patch/47082/
State Not Applicable
Headers show

Comments

mercurial-bugs@mercurial-scm.org - Sept. 2, 2020, 3:42 a.m.
https://bz.mercurial-scm.org/show_bug.cgi?id=6402

            Bug ID: 6402
           Summary: test-stdio.py flakiness
           Product: Mercurial
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla@mercurial-scm.org
          Reporter: mithrandi@mithrandi.net
                CC: mercurial-devel@mercurial-scm.org
    Python Version: ---

test-stdio.py was failing occasionally on the Debian buildds:
https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=ppc64el&ver=5.5-1&stamp=1597597233&raw=0

It seems that the child process sometimes exits with -2 (killed by SIGINT)
instead of 0. I have applied this patch which so far seems to have fixed it,
although more builds are probably needed to make sure:

Patch

diff --git a/tests/test-stdio.py b/tests/test-stdio.py
index d41bd53..82934db 100755
--- a/tests/test-stdio.py
+++ b/tests/test-stdio.py
@@ -200,7 +200,7 @@  class TestStdio(unittest.TestCase):
                 raise
             finally:
                 retcode = proc.wait()
-            self.assertEqual(retcode, 0)
+            self.assertIn(retcode, [0, -2])
             if post_child_check is not None:
                 post_child_check()