Closed
Bug 1020110
Opened 11 years ago
Closed 11 years ago
jit_test.py crashes if there are zero runnable tests in a directory
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
RESOLVED
FIXED
mozilla32
People
(Reporter: lth, Assigned: lth)
Details
Attachments
(1 file, 1 obsolete file)
|
2.34 KB,
patch
|
Details | Diff | Splinter Review |
If no tests are run, for example if all tests are marked slow and slow tests are not run, then the test runner crashes with a domain error:
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/home/lth/moz/mozilla-central/js/src/tests/lib/jittests.py", line 540, in process_test_results_parallel
ok = process_test_results(gen, num_tests, options)
File "/home/lth/moz/mozilla-central/js/src/tests/lib/jittests.py", line 600, in process_test_results
pb = ProgressBar(num_tests, fmt)
File "/home/lth/moz/mozilla-central/js/src/tests/lib/progressbar.py", line 29, in __init__
self.limit_digits = int(math.ceil(math.log10(self.limit))) # int: max digits in limit
ValueError: math domain error
| Assignee | ||
Comment 1•11 years ago
|
||
Actually two bugs here, one is the domain error but once that is fixed the test harness hangs because there's a deadlock in the parallel test runner if there are zero tests.
| Assignee | ||
Comment 2•11 years ago
|
||
The early-out in process_test_results avoids the domain error, and the dummy enqueue in run_tests_parallel avoids the deadlock.
Attachment #8434023 -
Flags: review?(jdemooij)
Comment 3•11 years ago
|
||
Comment on attachment 8434023 [details] [diff] [review]
Fixes both bugs
Review of attachment 8434023 [details] [diff] [review]:
-----------------------------------------------------------------
Terrence is more familiar with jit-tests.
::: js/src/tests/lib/jittests.py
@@ +477,5 @@
> try:
> testcnt = 0
> # Initially start as many jobs as allowed to run parallel
> + # Always enqueue at least one to avoid a curious deadlock
> + for i in range(max(1,min(options.max_jobs,total_tests))):
Nit: could you add a space after the two commas here? One of them is pre-existing :)
Attachment #8434023 -
Flags: review?(jdemooij) → review+
| Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8434023 -
Attachment is obsolete: true
| Assignee | ||
Comment 5•11 years ago
|
||
TBPL run (also see separate harness patch on bug 1019821):
https://tbpl.mozilla.org/?tree=Try&rev=728bbe3c2d95
Assignee: nobody → lhansen
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Updated•11 years ago
|
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in
before you can comment on or make changes to this bug.
Description
•