Bug 206392 - [GTK][WPE] Websockets close-on-x tests are failing
Summary: [GTK][WPE] Websockets close-on-x tests are failing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-16 19:09 PST by Lauro Moura
Modified: 2020-01-24 10:29 PST (History)
4 users (show)

See Also:


Attachments
Patch (7.36 KB, patch)
2020-01-24 07:28 PST, Lauro Moura
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lauro Moura 2020-01-16 19:09:33 PST
* http/tests/websocket/tests/hybi/close-on-navigate-new-location.html
* http/tests/websocket/tests/hybi/close-on-unload-and-force-gc.html
* http/tests/websocket/tests/hybi/close-on-unload-reference-in-parent.html
* http/tests/websocket/tests/hybi/close-on-unload.html
* http/tests/websocket/tests/hybi/send-after-close-on-unload.html

All 5 tests with the same message:

-PASS closedSocket is "socket1"
+FAIL closedSocket should be socket1. Was socket1: receive next message.

wktesthunter shows it started between r253430 and r253441.

r253431 updated libsoup in jhbuild from 2.67.91 to 2.68.3 to better handle cookies. The libsoup news file[1] shows a number of changes related to WebSockets (and cookies) between these versions.

https://gitlab.gnome.org/GNOME/libsoup/blob/master/NEWS
Comment 1 Carlos Garcia Campos 2020-01-21 06:22:23 PST
This "regressed" in https://gitlab.gnome.org/GNOME/libsoup/commit/35f1bac5ff9ec694e64b65e51f0e7a3226aa3aaf

but I don't think the new behavior in libsoup is wrong. Those tests only work on messages are sent asynchronously, so what happened before was that close messages was queued to be sent, then the connection was closed and the output source stopped so the close message was never sent. Now we don't wait for the output to be available to send message, we just try and only in case of would block error we wait for the output source to be available. So, in those tests the close message is sent before the connection is closed. I've tried with ff and chrome and I get the same results (same failure), so I think we can just rebaseline those tests for GTK and WPE.
Comment 2 Carlos Garcia Campos 2020-01-23 07:06:17 PST
Lauro, could you do the rebaseline?
Comment 3 Lauro Moura 2020-01-23 07:32:23 PST
(In reply to Carlos Garcia Campos from comment #2)
> Lauro, could you do the rebaseline?

Yeah.
Comment 4 Lauro Moura 2020-01-24 07:28:15 PST
Created attachment 388685 [details]
Patch
Comment 5 Lauro Moura 2020-01-24 07:34:56 PST
Comment on attachment 388685 [details]
Patch

Forgot the `--no-review` flag. :)

Btw, http/tests/websockets is explicitly skipped in the wpe expectation.

Once we add the common platform/glib test directory we can move these there to be shared between the two ports.
Comment 6 WebKit Commit Bot 2020-01-24 10:29:33 PST
Comment on attachment 388685 [details]
Patch

Clearing flags on attachment: 388685

Committed r255079: <https://trac.webkit.org/changeset/255079>
Comment 7 WebKit Commit Bot 2020-01-24 10:29:34 PST
All reviewed patches have been landed.  Closing bug.