diff --git a/Lib/test/libregrtest/cmdline.py b/Lib/test/libregrtest/cmdline.py index 891b00c7531..d621f5f9f3e 100644 --- a/Lib/test/libregrtest/cmdline.py +++ b/Lib/test/libregrtest/cmdline.py @@ -301,9 +301,9 @@ def _parse_args(args, **kwargs): if ns.single and ns.fromfile: parser.error("-s and -f don't go together!") - if ns.use_mp and ns.trace: + if ns.use_mp is not None and ns.trace: parser.error("-T and -j don't go together!") - if ns.use_mp and ns.findleaks: + if ns.use_mp is not None and ns.findleaks: parser.error("-l and -j don't go together!") if ns.failfast and not (ns.verbose or ns.verbose3): parser.error("-G/--failfast needs either -v or -W") diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py old mode 100644 new mode 100755 diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 52909d833e7..751df1537d2 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -226,6 +226,8 @@ def test_multiprocess(self): self.checkError([opt, 'foo'], 'invalid int value') self.checkError([opt, '2', '-T'], "don't go together") self.checkError([opt, '2', '-l'], "don't go together") + self.checkError([opt, '0', '-T'], "don't go together") + self.checkError([opt, '0', '-l'], "don't go together") def test_coverage(self): for opt in '-T', '--coverage': diff --git a/Misc/NEWS b/Misc/NEWS index 5bf0f323961..1aa0a7525f0 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -627,6 +627,9 @@ Tools/Demos Tests ----- +- Issue #28950: Disallow -j0 to be combined with -T/-l in regrtest + command line arguments. + - Issue #28683: Fix the tests that bind() a unix socket and raise PermissionError on Android for a non-root user.