Closed Bug 1703448 Opened 4 months ago Closed 3 months ago

IOUtils.write to a directory with a tempfile does not fail

Categories

(Toolkit :: OS.File, defect, P3)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: barret, Assigned: barret)

References

Details

Attachments

(1 file)

Doing IOUtils.write(directory, data) fails as expected (because you cannot open a directory for writing, but IOUtils.write(directory, data, { tmpFile: "somePath" }) will not fail. Instead, we end up with a file containing data a ${directory}/somePath.

Attachment #9213998 - Attachment description: Bug 1703448: IOUtils.write() to a directory with a temp file should fail r?gijs,emalysz → Bug 1703448 - IOUtils.write() to a directory with a temp file should fail r?gijs,emalysz
Pushed by brennie@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9e72fa6ee4a2
IOUtils.write() to a directory with a temp file should fail r=Gijs

Backed out for causing failures due to files in tmp folder.

backout: https://hg.mozilla.org/integration/autoland/rev/c00239b6c35155149b2e2d8caa02c1c96d21e546

push: https://treeherder.mozilla.org/jobs?repo=autoland&selectedTaskRun=ZU9RQo6bSluX6UvbyctqNA.0&revision=9e72fa6ee4a29fcf51dd39c235e4d7069803b6c9&group_state=expanded

failure log: https://treeherder.mozilla.org/logviewer?job_id=337410809&repo=autoland&lineNumber=2258

task 2021-04-22T05:23:26.628Z] 05:23:26 INFO - TEST-PASS | dom/base/test/browser_aboutnewtab_process_selection.js | Navigating away from the preloaded browser (child side, cross-origin) should create a new content process. -
[task 2021-04-22T05:23:26.628Z] 05:23:26 INFO - Buffered messages finished
[task 2021-04-22T05:23:26.628Z] 05:23:26 INFO - TEST-UNEXPECTED-FAIL | dom/base/test/browser_aboutnewtab_process_selection.js | A promise chain failed to handle a rejection: Could not stat the file at /tmp/tmpNO18t9.mozrunner/datareporting/state.json - stack: (No stack available.)
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - Rejection date: Thu Apr 22 2021 05:23:17 GMT+0000 (Coordinated Universal Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 285
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - Stack trace:
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1127
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - Leaving test bound
[task 2021-04-22T05:23:26.629Z] 05:23:26 INFO - Entering test bound preloaded_state_attribute
[task 2021-04-22T05:23:28.051Z] 05:23:28 INFO - TEST-PASS | dom/base/test/browser_aboutnewtab_process_selection.js | Sanity check that the first preloaded browser has the correct attribute -

Also failing:

Flags: needinfo?(brennie)
Flags: needinfo?(brennie)
Pushed by brennie@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/237a01566c28
IOUtils.write() to a directory with a temp file should fail r=Gijs
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.