Closed
Bug 1208475
Opened 9 years ago
Closed 9 years ago
test_iter_dir fails when tests are packaged with normalized file mtimes
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(firefox44 fixed)
RESOLVED
FIXED
mozilla44
Tracking | Status | |
---|---|---|
firefox44 | --- | fixed |
People
(Reporter: gps, Assigned: Yoric)
References
Details
Attachments
(1 file)
Over in bug 1208320 we're changing how tests are packaged to make things faster. As part of this, test zip files will no longer preserve host filesystem mtimes. Instead, mtimes will be normalized to 2010-01-01 00:00. According to https://treeherder.mozilla.org/logviewer.html#?job_id=11921867&repo=try, this makes toolkit/components/osfile/tests/mochi/test_osfile_front:test_iter_dir() unhappy because it is checking that dates in filesystem attributes are recent: ok(creation.getFullYear() >= year - 1 && creation.getFullYear() <= year, "test_iter_dir: consistent creation date"); let lastWrite = entry.winLastWriteDate; ok(lastWrite, "test_iter_dir: Windows lastWrite date exists: " + lastWrite); ok(lastWrite.getFullYear() >= year - 1 && lastWrite.getFullYear() <= year, "test_iter_dir: consistent lastWrite date"); let lastAccess = entry.winLastAccessDate; ok(lastAccess, "test_iter_dir: Windows lastAccess date exists: " + lastAccess); ok(lastAccess.getFullYear() >= year - 1 && lastAccess.getFullYear() <= year, "test_iter_dir: consistent lastAccess date"); FWIW, this test would fail if a test archive were ever produced from a source checkout more than 1 year old and where files in the toolkit/components/osfile/tests/mochi directory hadn't been changed in a year. We don't see this in automation because we frequently clobber. However, local developers will likely encounter this.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → dteller
Assignee | ||
Comment 1•9 years ago
|
||
Can I count on the files always having that date, both on automation and with source checkout?
Flags: needinfo?(gps)
Assignee | ||
Comment 2•9 years ago
|
||
Bug 1208475 - Using a safer date for test_iter_dir;r=yoric
Attachment #8667269 -
Flags: review?(dteller)
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8667269 [details] MozReview Request: Bug 1208475 - Using a safer date for test_iter_dir;r=yoric https://reviewboard.mozilla.org/r/20697/#review18561
Attachment #8667269 -
Flags: review?(dteller) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Trivial change to a test. Try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8d08b2be17a9
Keywords: checkin-needed
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to David Rajchenbach-Teller [:Yoric] (use "needinfo") from comment #1) > Can I count on the files always having that date, both on automation and > with source checkout? Automation will always have the date from comment #0. Local will have variable dates corresponding to when things were built.
Reporter | ||
Comment 7•9 years ago
|
||
Comment on attachment 8667269 [details] MozReview Request: Bug 1208475 - Using a safer date for test_iter_dir;r=yoric https://reviewboard.mozilla.org/r/20697/#review18585 I'll give r+ so you don't have to self review.
Attachment #8667269 -
Flags: review+
https://hg.mozilla.org/mozilla-central/rev/6d270e149425
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Updated•11 months ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•