Closed Bug 1686537 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 27146 - [FSA] Allow seeking past the end of a file

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 27146 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/27146
Details from upstream follow.

b'Austin Sullivan <asully@chromium.org>' wrote:

[FSA] Allow seeking past the end of a file

Currently, we reject all attempts to write past the end of a file. This
change makes the API more consistent with the behavior of POSIX.

If writing at an offset past the end of a file, the null bytes between
the old end of the file and the offset will count towards the file's
quota.

Adds Quota tests to the SandboxFSW.

Bug: 1153385
Change-Id: Iec54acbccecb728f9375931825525ba2fbafd1ca

Reviewed-on: https://chromium-review.googlesource.com/2593810
WPT-Export-Revision: d0a4e2457e7bc93803d2c90d40620c0d93502f7d

PR 27146 applied with additional changes from upstream: 489679e4fccedcb37ae4d3e028b5d1a56adbc769

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests and 29 subtests

Status Summary

Firefox

OK : 2
FAIL: 58

Chrome

OK : 2
PASS: 56
FAIL: 2

Safari

OK : 2
FAIL: 58

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.html
write() with an empty blob to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() a blob to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with WriteParams without position to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() a string to an empty file with zero offset: FAIL (Chrome: PASS, Safari: FAIL)
write() a blob to an empty file with zero offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called consecutively appends: FAIL (Chrome: PASS, Safari: FAIL)
write() WriteParams without position and string appends: FAIL (Chrome: PASS, Safari: FAIL)
write() WriteParams without position and blob appends: FAIL (Chrome: PASS, Safari: FAIL)
write() called with a string and a valid offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called with a blob and a valid offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called with an offset beyond the end of the file: FAIL (Chrome: FAIL, Safari: FAIL)
write() with an empty string to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with a valid utf-8 string: FAIL (Chrome: PASS, Safari: FAIL)
write() with a string with unix line ending preserved: FAIL (Chrome: PASS, Safari: FAIL)
write() with a string with windows line ending preserved: FAIL (Chrome: PASS, Safari: FAIL)
write() with an empty array buffer to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with a valid typed array buffer: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: close() fails when parent directory is removed: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: writable file streams make atomic changes on close: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: write() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: truncate() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: close() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: only one close() operation may succeed: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: writable file stream persists file on close, even if file is removed: FAIL (Chrome: PASS, Safari: FAIL)
getWriter() can be used: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: truncate missing size param: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: write missing data param: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: seek missing position param: FAIL (Chrome: PASS, Safari: FAIL)
write() with an invalid blob to an empty file should reject: FAIL (Chrome: PASS, Safari: FAIL)
/file-system-access/sandboxed_FileSystemWritableFileStream-write.https.any.worker.html
write() with an empty blob to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() a blob to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with WriteParams without position to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() a string to an empty file with zero offset: FAIL (Chrome: PASS, Safari: FAIL)
write() a blob to an empty file with zero offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called consecutively appends: FAIL (Chrome: PASS, Safari: FAIL)
write() WriteParams without position and string appends: FAIL (Chrome: PASS, Safari: FAIL)
write() WriteParams without position and blob appends: FAIL (Chrome: PASS, Safari: FAIL)
write() called with a string and a valid offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called with a blob and a valid offset: FAIL (Chrome: PASS, Safari: FAIL)
write() called with an offset beyond the end of the file: FAIL (Chrome: FAIL, Safari: FAIL)
write() with an empty string to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with a valid utf-8 string: FAIL (Chrome: PASS, Safari: FAIL)
write() with a string with unix line ending preserved: FAIL (Chrome: PASS, Safari: FAIL)
write() with a string with windows line ending preserved: FAIL (Chrome: PASS, Safari: FAIL)
write() with an empty array buffer to an empty file: FAIL (Chrome: PASS, Safari: FAIL)
write() with a valid typed array buffer: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: close() fails when parent directory is removed: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: writable file streams make atomic changes on close: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: write() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: truncate() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: close() after close() fails: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: only one close() operation may succeed: FAIL (Chrome: PASS, Safari: FAIL)
atomic writes: writable file stream persists file on close, even if file is removed: FAIL (Chrome: PASS, Safari: FAIL)
getWriter() can be used: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: truncate missing size param: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: write missing data param: FAIL (Chrome: PASS, Safari: FAIL)
WriteParams: seek missing position param: FAIL (Chrome: PASS, Safari: FAIL)
write() with an invalid blob to an empty file should reject: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/67b680467136 [wpt PR 27146] - [FSA] Allow seeking past the end of a file, a=testonly https://hg.mozilla.org/integration/autoland/rev/e230c6476574 [wpt PR 27146] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
You need to log in before you can comment on or make changes to this bug.