Closed Bug 966858 Opened 6 years ago Closed 6 years ago

Taking screenshots on test timeouts broken on Windows


(Testing :: General, defect, major)

Not set


(Not tracked)



(Reporter: philor, Assigned: ted)




(1 file, 1 obsolete file)

On Windows,, "['C:\\slave\\test\\build\\tests\\bin\\screenshot.exe'] exited with code 1"

On Mac,, "INFO -  libpng warning: zero length keyword, INFO -  libpng warning: Empty language field in iTXt chunk"

On Linux,, "INFO -  Xlib:  extension "RANDR" missing on display ":0"."

I wouldn't be at all surprised if those things, the only output when we're trying to take a screenshot, are the same thing that successful Mac and Linux screenshots say too, so only Windows is giving any sort of clue about what's gone wrong. And not much of one.
Component: General Automation → General
Product: Release Engineering → Testing
QA Contact: catlee
Version: unspecified → Trunk
Trunk-only, so something we landed in-tree, not releng like my first knee-jerk reaction said it must be.
Ted, any ideas here? :-)
Flags: needinfo?(ted)
So, bug 961108 changed screenshot taking to always use blobber instead. Your second and third logs look fine, although clearly we need to teach TBPL to display this better:
17:32:09     INFO -  (blobuploader) - INFO - TinderboxPrint: Uploaded mozilla-test-fail-screenshot_YqpjzA.png to

The screenshot from the first log is busted, seems to be zero bytes, which makes sense if the screenshot tool exited with an error.
Flags: needinfo?(ted)
Hm, looks like this actually is broken on Windows. I think NamedTemporaryFile just doesn't actually work the way we think it does on Windows.
Blocks: 961108
Summary: Taking screenshots on test timeouts broken on every platform → Taking screenshots on test timeouts broken on Windows
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #3)
> So, bug 961108 changed screenshot taking to always use blobber instead.

Ah I'd seen the CC but hadn't inferred that from the summary - that makes sense, thank you :-)
Attached patch fix dumpScreen on Windows (obsolete) — Splinter Review
So mozfile.NamedTemporaryFile doesn't actually work for this on Windows, despite its claims to the contrary. The screenshot tool can't write to the file while it's still open. Switching back to mkstemp makes this work locally for me on Windows.
Attachment #8369556 - Flags: review?(jmaher)
Assignee: nobody → ted
Comment on attachment 8369556 [details] [diff] [review]
fix dumpScreen on Windows

Review of attachment 8369556 [details] [diff] [review]:

what about  does that just call this?

::: testing/mochitest/
@@ +308,5 @@
>          options.e10s = e10s
>          options.dumpAboutMemoryAfterTest = dump_about_memory_after_test
>          options.dumpDMDAfterTest = dump_dmd_after_test
>          options.dumpOutputDirectory = dump_output_directory
> +        options.timeout = 10

why is this in here?

::: testing/mochitest/tests/test_sanity.html
@@ +18,5 @@
>  </div>
>  <pre id="test">
>  <script class="testbody" type="text/javascript">
> +SimpleTest.waitForExplicitFinish();

is this related?
Attachment #8369556 - Flags: review?(jmaher) → review-
Sorry, I forgot to take out my debugging cruft. Only the changes are necessary, will reupload in a minute. just calls into this, if you recall from bug 961108.
With cruft removed.
Attachment #8369557 - Flags: review?(jmaher)
Attachment #8369556 - Attachment is obsolete: true
Attachment #8369557 - Flags: review?(jmaher) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.