Closed Bug 1740154 Opened 3 years ago Closed 3 years ago

[wpt-sync] Sync PR 31553 - serial: Check for detached buffers when writing

Categories

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

task

Tracking

(firefox96 fixed)

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Reilly Grant <reillyg@chromium.org> wrote:

serial: Check for detached buffers when writing

This change adds check in SerialPortUnderlyingSink::WriteData() to
ensure that the V8BufferSource being written to the Mojo data pipe has
not been detached since it was passed to the WritableStream.

Bug: 1267627
Change-Id: I63d48584eb0be1c1d87c27115900aa5c17931fcf
Reviewed-on: https://chromium-review.googlesource.com/3269348
WPT-Export-Revision: 2e7ac7b3d54b81571a46ff4b872bc1889ace89ba

CI Results

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

Total 4 tests and 2 subtests

Status Summary

Firefox

OK : 4
FAIL : 28

Chrome

OK : 2
PASS : 24
CRASH: 2

Safari

OK : 4
FAIL : 28

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/serial/serialPort_writable.https.any.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
open() and close() set and unset SerialPort.writable: FAIL (Chrome: PASS, Safari: FAIL)
Port cannot be closed while writable is locked: FAIL (Chrome: PASS, Safari: FAIL)
Can write a small amount of data: FAIL (Chrome: PASS, Safari: FAIL)
Can write a large amount of data: FAIL (Chrome: PASS, Safari: FAIL)
System error closes writable and replaces it with a new stream: FAIL (Chrome: PASS, Safari: FAIL)
Disconnect error closes writable and sets it to null: FAIL (Chrome: PASS, Safari: FAIL)
abort() discards the write buffer: FAIL (Chrome: PASS, Safari: FAIL)
abort() does not wait for the write buffer to be cleared: FAIL (Chrome: PASS, Safari: FAIL)
Can close while aborting: FAIL (Chrome: PASS, Safari: FAIL)
close() waits for the write buffer to be cleared: FAIL (Chrome: PASS, Safari: FAIL)
Can pipe a stream to writable: FAIL (Chrome: PASS, Safari: FAIL)
Stream closure is observable through a long chain of transformers: FAIL (Chrome: PASS, Safari: FAIL)
/serial/serialPort_writable.https.any.worker.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
open() and close() set and unset SerialPort.writable: FAIL (Chrome: PASS, Safari: FAIL)
Port cannot be closed while writable is locked: FAIL (Chrome: PASS, Safari: FAIL)
Can write a small amount of data: FAIL (Chrome: PASS, Safari: FAIL)
Can write a large amount of data: FAIL (Chrome: PASS, Safari: FAIL)
System error closes writable and replaces it with a new stream: FAIL (Chrome: PASS, Safari: FAIL)
Disconnect error closes writable and sets it to null: FAIL (Chrome: PASS, Safari: FAIL)
abort() discards the write buffer: FAIL (Chrome: PASS, Safari: FAIL)
abort() does not wait for the write buffer to be cleared: FAIL (Chrome: PASS, Safari: FAIL)
Can close while aborting: FAIL (Chrome: PASS, Safari: FAIL)
close() waits for the write buffer to be cleared: FAIL (Chrome: PASS, Safari: FAIL)
Can pipe a stream to writable: FAIL (Chrome: PASS, Safari: FAIL)
Stream closure is observable through a long chain of transformers: FAIL (Chrome: PASS, Safari: FAIL)
/serial/serialPort_writable_detachBuffer.https.any.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: CRASH, Safari: OK)
Writing a detached buffer is safe: FAIL (Safari: FAIL)
Detaching a buffer while writing is safe: FAIL (Safari: FAIL)
/serial/serialPort_writable_detachBuffer.https.any.worker.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: CRASH, Safari: OK)
Writing a detached buffer is safe: FAIL (Safari: FAIL)
Detaching a buffer while writing is safe: FAIL (Safari: FAIL)

Tests Disabled in Gecko Infrastructure

/serial/serialPort_writable.https.any.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
/serial/serialPort_writable.https.any.worker.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: OK, Safari: OK)
/serial/serialPort_writable_detachBuffer.https.any.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: CRASH, Safari: OK)
/serial/serialPort_writable_detachBuffer.https.any.worker.html: OK [GitHub], SKIP [Gecko-android-em-7.0-x86_64-lite-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-lite-qr-opt-geckoview, Gecko-android-em-7.0-x86_64-qr-debug-geckoview, Gecko-android-em-7.0-x86_64-qr-opt-geckoview, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-linux1804-64-tsan-qr-opt, Gecko-windows10-32-2004-qr-debug, Gecko-windows10-32-2004-qr-opt, Gecko-windows10-64-2004-qr-debug, Gecko-windows10-64-2004-qr-opt] (Chrome: CRASH, Safari: OK)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/425eee033f11
[wpt PR 31553] - serial: Check for detached buffers when writing, a=testonly
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.