Closed Bug 1621898 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 22212 - NativeIO: Plumbing and minimal functionality.

Categories

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

task

Tracking

(firefox76 fixed)

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Victor Costan <pwnall@chromium.org> wrote:

NativeIO: Plumbing and minimal functionality.

This is a scaffolding CL for NativeIO, a.k.a. Low-Level Storage. Most
details will probably change over time, but the overall architecture is
intended to be stable. To facilitate review, this CL aims to introduce
enough aspects of the API for readers to reason about IPC security and
general architectural concerns in the browser and in Blink.

The summary below is also intended to facilitate review.

  • NativeIO introduces new per-origin storage. The per-origin model
    matches other existing storage APIs, so no new permissions are added.
  • NativeIO storage is structured as files in a flat per-origin
    namespace. Files are stored in a per-origin directory under the user's
    profile.
  • The browser-side implementation enforces access control at the file
    level. Once a renderer is allowed to open a file, the browser passes
    the file descriptor to the renderer. This approach aims to minimize
    the latency of I/O operations.
  • The renderer exposes two API flavors to web pages -- an asynchronous
    version and a synchronous version. The latter is only available in
    dedicated workers. The goal is to allow developers to experiment with
    both flavors of the API, and report back on performance and stability.
  • In the asynchronous API, all file I/O is done on tasks posted to
    Blink's worker thread pool. This avoids jank on the main thread, at
    the cost of two thread hops per I/O operation.

This CL adds two READMEs with some minimal information.

  • //third_party/blink/renderer/modules/native_io/README.md
  • //third_party/blink/web_tests/external/wpt/native-io/README.md

An API explainer is available at
https://github.com/fivedots/nativeio-explainer

Binary-Size: New Web Platform feature. Fugu P1.
Bug: 914488
Change-Id: I2c8c794837c5332d81bfbab2ed0827e1f26f7cf4

Reviewed-on: https://chromium-review.googlesource.com/2093918
WPT-Export-Revision: 6f899e9e68f30298398f2e824ca47b27541e555e

CI Results

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

Total 70 tests

Status Summary

Firefox

OK : 24
PASS : 46
FAIL : 58

Chrome

OK : 24
FAIL : 58

Safari

OK : 19
FAIL : 45
ERROR: 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/native-io/read_write_async_basic.tentative.https.any.html
NativeIOFile.read returns bytes written by NativeIOFile.write: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/read_write_async_basic.tentative.https.any.worker.html
NativeIOFile.read returns bytes written by NativeIOFile.write: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/close_async.tentative.https.any.html
NativeIOFile.read fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent when called immediately: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.read fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/close_async.tentative.https.any.worker.html
NativeIOFile.read fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent when called immediately: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.read fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/concurrent_io_async.tentative.https.any.html
write() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
write() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/close_async.tentative.https.any.sharedworker.html
NativeIOFile.read fails after NativeIOFile.close settles: FAIL (Chrome: FAIL)
NativeIOFile.close is idempotent: FAIL (Chrome: FAIL)
NativeIOFile.write fails after NativeIOFile.close settles: FAIL (Chrome: FAIL)
NativeIOFile.write fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL)
NativeIOFile.close is idempotent when called immediately: FAIL (Chrome: FAIL)
NativeIOFile.read fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL)
/native-io/open_getAll_async_basic.tentative.https.any.worker.html
nativeIO.getAll returns file created by nativeIO.open: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/close_async.tentative.https.any.serviceworker.html
NativeIOFile.read fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails after NativeIOFile.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.close is idempotent when called immediately: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.read fails immediately after calling NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/delete_async_basic.tentative.https.any.serviceworker.html
nativeIO.getAll does not return file deleted by nativeIO.delete: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/read_write_async_basic.tentative.https.any.serviceworker.html
NativeIOFile.read returns bytes written by NativeIOFile.write: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/delete_async_basic.tentative.https.any.html
nativeIO.getAll does not return file deleted by nativeIO.delete: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/open_getAll_async_basic.tentative.https.any.sharedworker.html
nativeIO.getAll returns file created by nativeIO.open: FAIL (Chrome: FAIL)
/native-io/delete_sync_basic.tentative.https.any.worker.html
nativeIO.getAllSync does not return file deleted by nativeIO.deleteSync: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/open_getAll_sync_basic.tentative.https.any.worker.html
nativeIO.getAllSync returns file created by nativeIO.openSync: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/read_write_sync_basic.tentative.https.any.worker.html
NativeIOFileSync.read returns bytes written by NativeIOFileSync.write: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/read_write_async_basic.tentative.https.any.sharedworker.html
NativeIOFile.read returns bytes written by NativeIOFile.write: FAIL (Chrome: FAIL)
/native-io/delete_async_basic.tentative.https.any.sharedworker.html
nativeIO.getAll does not return file deleted by nativeIO.delete: FAIL (Chrome: FAIL)
/native-io/concurrent_io_async.tentative.https.any.sharedworker.html
write() rejects wrile write() is resolving: FAIL (Chrome: FAIL)
read() rejects wrile read() is resolving: FAIL (Chrome: FAIL)
read() rejects wrile write() is resolving: FAIL (Chrome: FAIL)
write() rejects wrile read() is resolving: FAIL (Chrome: FAIL)
/native-io/close_sync.tentative.https.any.worker.html
nativeIO.close is idempotent: FAIL (Chrome: FAIL, Safari: FAIL)
nativeIO.read fails after nativeIO.close settles: FAIL (Chrome: FAIL, Safari: FAIL)
NativeIOFile.write fails after NativeIOFile.close: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/open_getAll_async_basic.tentative.https.any.html
nativeIO.getAll returns file created by nativeIO.open: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/open_getAll_async_basic.tentative.https.any.serviceworker.html
nativeIO.getAll returns file created by nativeIO.open: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/concurrent_io_async.tentative.https.any.worker.html
write() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
write() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/delete_async_basic.tentative.https.any.worker.html
nativeIO.getAll does not return file deleted by nativeIO.delete: FAIL (Chrome: FAIL, Safari: FAIL)
/native-io/concurrent_io_async.tentative.https.any.serviceworker.html
write() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
read() rejects wrile write() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)
write() rejects wrile read() is resolving: FAIL (Chrome: FAIL, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9996c340d3e3
[wpt PR 22212] - NativeIO: Plumbing and minimal functionality., a=testonly
https://hg.mozilla.org/integration/autoland/rev/2c8db73cf4a6
[wpt PR 22212] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.