Bug 1892364 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Daniel Holbert [:dholbert] from comment #0)
> (motivation: I'm investigating an intermittent timeout in a new test right now that looks suspiciously like the system might somehow be stealing focus[1] from the Firefox crashtest-harness window, and it would be great to be able to confirm or refute that hypothesis with a screenshot taken right at the moment the harness decides the test has timed out.)

off-topic, but just for the record: for the particular thing I'm debugging right now, I'm now pretty sure it's bug 1864255.

I was able to work around this and force a screenshot to be taken by adding an infinite loop -- `while (true) { /* Loop forever, muahaha */ }` -- between these last two lines in `LoadFailed(why)`:
https://searchfox.org/mozilla-central/rev/8c3ca2f5a74e0ba59c3d9dddf5468a2ffab13467/layout/tools/reftest/reftest.sys.mjs#1553,1572-1573
```js
function LoadFailed(why) {
...
  FlushTestBuffer();
  FinishTestItem();
```
That stops the test harness from advancing to the next test, at the moment that things went wrong; and it trips the harness's `application timed out after 370 seconds with no output` timeout, which causes a screenshot to be captured as in e.g. [this log](https://treeherder.mozilla.org/logviewer?job_id=455110859&repo=try&lineNumber=17344).

And that [screenshot](https://firefoxci.taskcluster-artifacts.net/LgRXJtCVSOubqKIyUhlatA/0/public/test_info/mozilla-test-fail-screenshot_362ma56v.png) shows an `about:blank` popup that's occluding the test harness, which I think was spawned by earlier crashtest `1419902.html`, per bug 1864255 comment 19.
(In reply to Daniel Holbert [:dholbert] from comment #0)
> (motivation: I'm investigating an intermittent timeout in a new test right now that looks suspiciously like the system might somehow be stealing focus[1] from the Firefox crashtest-harness window, and it would be great to be able to confirm or refute that hypothesis with a screenshot taken right at the moment the harness decides the test has timed out.)

off-topic, but just for the record: for the particular thing I'm debugging right now, I'm now pretty sure it's bug 1864255.

I was able to force a screenshot to be taken when my crashtest timed out, by adding an infinite loop -- `while (true) { /* Loop forever, muahaha */ }` -- between these last two lines in `LoadFailed(why)`:
https://searchfox.org/mozilla-central/rev/8c3ca2f5a74e0ba59c3d9dddf5468a2ffab13467/layout/tools/reftest/reftest.sys.mjs#1553,1572-1573
```js
function LoadFailed(why) {
...
  FlushTestBuffer();
  FinishTestItem();
```
That stops the test harness from advancing to the next test, at the moment that things went wrong; and it trips the harness's `application timed out after 370 seconds with no output` timeout, which causes a screenshot to be captured as in e.g. [this log](https://treeherder.mozilla.org/logviewer?job_id=455110859&repo=try&lineNumber=17344).

And that [screenshot](https://firefoxci.taskcluster-artifacts.net/LgRXJtCVSOubqKIyUhlatA/0/public/test_info/mozilla-test-fail-screenshot_362ma56v.png) shows an `about:blank` popup that's occluding the test harness, which I think was spawned by earlier crashtest `1419902.html`, per bug 1864255 comment 19.
(In reply to Daniel Holbert [:dholbert] from comment #0)
> (motivation: I'm investigating an intermittent timeout in a new test right now that looks suspiciously like the system might somehow be stealing focus[1] from the Firefox crashtest-harness window, and it would be great to be able to confirm or refute that hypothesis with a screenshot taken right at the moment the harness decides the test has timed out.)

off-topic, but just for the record: for the particular thing I'm debugging right now, I'm now pretty sure it's bug 1864255.

I was able to force a screenshot to be taken when my crashtest timed out, by adding an infinite loop -- `while (true) { /* Loop forever, muahaha */ }` -- between these last two lines in `LoadFailed(why)`:
https://searchfox.org/mozilla-central/rev/8c3ca2f5a74e0ba59c3d9dddf5468a2ffab13467/layout/tools/reftest/reftest.sys.mjs#1553,1572-1573
```js
function LoadFailed(why) {
...
  FlushTestBuffer();
  FinishTestItem();
```
That stops the test harness from advancing to the next test, at the moment that things went wrong; and it trips the harness's `application timed out after 370 seconds with no output` timeout, which causes a screenshot to be captured as in e.g. [this log](https://treeherder.mozilla.org/logviewer?job_id=455110859&repo=try&lineNumber=17344).

And that [screenshot](https://firefoxci.taskcluster-artifacts.net/LgRXJtCVSOubqKIyUhlatA/0/public/test_info/mozilla-test-fail-screenshot_362ma56v.png) shows an `about:blank` popup that's occluding the test harness, which I think was spawned by earlier crashtest `1419902.html`, per bug 1864255 comment 19.

In a perfect world, we would automatically capture a screenshot like that one whenever we hit ` REFTEST TEST-UNEXPECTED-FAIL | [path/to/some/reftest/or/crashtest.html] | load failed: timed out waiting for reftest-wait to be removed
(In reply to Daniel Holbert [:dholbert] from comment #0)
> (motivation: I'm investigating an intermittent timeout in a new test right now that looks suspiciously like the system might somehow be stealing focus[1] from the Firefox crashtest-harness window, and it would be great to be able to confirm or refute that hypothesis with a screenshot taken right at the moment the harness decides the test has timed out.)

off-topic, but just for the record: for the particular thing I'm debugging right now, I'm now pretty sure it's bug 1864255.

I was able to force a screenshot to be taken when my crashtest timed out, by adding an infinite loop -- `while (true) { /* Loop forever, muahaha */ }` -- between these last two lines in `LoadFailed(why)`:
https://searchfox.org/mozilla-central/rev/8c3ca2f5a74e0ba59c3d9dddf5468a2ffab13467/layout/tools/reftest/reftest.sys.mjs#1553,1572-1573
```js
function LoadFailed(why) {
...
  FlushTestBuffer();
  FinishTestItem();
```
That stops the test harness from advancing to the next test, at the moment that things went wrong; and it trips the harness's `application timed out after 370 seconds with no output` timeout, which causes a screenshot to be captured as in e.g. [this log](https://treeherder.mozilla.org/logviewer?job_id=455110859&repo=try&lineNumber=17344).

And that [screenshot](https://firefoxci.taskcluster-artifacts.net/LgRXJtCVSOubqKIyUhlatA/0/public/test_info/mozilla-test-fail-screenshot_362ma56v.png) shows an `about:blank` popup that's occluding the test harness, which I think was spawned by earlier crashtest `1419902.html`, per bug 1864255 comment 19.

In a perfect world, we would automatically capture a screenshot like that one whenever we hit `REFTEST TEST-UNEXPECTED-FAIL | [path/to/some/reftest/or/crashtest.html] | load failed: timed out waiting for reftest-wait to be removed` -- hence this bug here.

Back to Bug 1892364 Comment 2