Closed Bug 966858 Opened 10 years ago Closed 10 years ago

Taking screenshots on test timeouts broken on Windows

Categories

(Testing :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED
mozilla30

People

(Reporter: philor, Assigned: ted)

References

Details

Attachments

(1 file, 1 obsolete file)

On Windows, https://tbpl.mozilla.org/php/getParsedLog.php?id=33988618&tree=Mozilla-Central, "['C:\\slave\\test\\build\\tests\\bin\\screenshot.exe'] exited with code 1"

On Mac, https://tbpl.mozilla.org/php/getParsedLog.php?id=33986788&tree=Mozilla-Inbound, "INFO -  libpng warning: zero length keyword, INFO -  libpng warning: Empty language field in iTXt chunk"

On Linux, https://tbpl.mozilla.org/php/getParsedLog.php?id=33988719&tree=Mozilla-Inbound, "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 http://mozilla-releng-blobs.s3.amazonaws.com/blobs/mozilla-inbound/sha512/72a91a605384e1b146e0347725742685afcfd82deae2adf83d4e127d9c672dfdec1f7020fd41676df8d39d08b07693306f6b031253454f640742ec79ac1814cd
http://mozilla-releng-blobs.s3.amazonaws.com/blobs/mozilla-inbound/sha512/776ff3faa3c39de363274def08c934bcb75df5282d89bf8f3a3cca95d56b2adb9811728e6753ce2ce2c7d7262f68c7918b6d0950e8d99f077377f11114fad30d

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
Status: NEW → ASSIGNED
Comment on attachment 8369556 [details] [diff] [review]
fix dumpScreen on Windows

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

what about automation.py.in?  does that just call this?

::: testing/mochitest/mach_commands.py
@@ +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 automationutils.py changes are necessary, will reupload in a minute.

automation.py 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+
https://hg.mozilla.org/mozilla-central/rev/4b566046b8a8
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: