| Summary: | [GTK][WPE] Migrate WebKitTestServer to libsoup 2.48 API | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Frédéric Wang (:fredw) <fred.wang> | ||||||||||||
| Component: | Tools / Tests | Assignee: | Frédéric Wang (:fredw) <fred.wang> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | benjamin, cdumez, cgarcia, cmarcelo, commit-queue, ews-watchlist, mcatanzaro, pgriffis, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=146109 | ||||||||||||||
| Bug Depends on: | 220922 | ||||||||||||||
| Bug Blocks: | 219257 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Frédéric Wang (:fredw)
2020-11-19 07:15:42 PST
Created attachment 414576 [details]
Untested patch
Created attachment 414577 [details]
Untested patch
Comment on attachment 414577 [details]
Untested patch
Please take a look.
Disclaimer: I haven't use glib for a long time, hopefully I haven't misused the API.
Created attachment 414660 [details]
Patch
Committed r270074: <https://trac.webkit.org/changeset/270074> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414660 [details]. Re-opened since this is blocked by bug 220922 Created attachment 418858 [details]
Patch
Comment on attachment 418858 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=418858&action=review > Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:35 > + m_soupServer = adoptGRef(soup_server_new("server-header", "WebKitTestServer ", nullptr)); If options[ServerRunInThread] is set, I would go even further and create this on the WorkQueue thread using your trick with BinarySemaphore to dispatch a function and wait until it completes. Sharing m_soupServer across threads like the current code does might work in practice, but I doubt it's safe. (In reply to Michael Catanzaro from comment #9) > Comment on attachment 418858 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=418858&action=review > > > Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:35 > > + m_soupServer = adoptGRef(soup_server_new("server-header", "WebKitTestServer ", nullptr)); > > If options[ServerRunInThread] is set, I would go even further and create > this on the WorkQueue thread using your trick with BinarySemaphore to > dispatch a function and wait until it completes. Sharing m_soupServer across > threads like the current code does might work in practice, but I doubt it's > safe. Well, the creation and run happen before any test start, so it should be safe, I would say. We don't even need the run, and server callback could be a constructor parameter, but that would require all the tests and I don't think it's worth it. I just like to be paranoid about sharing objects across threads. Anyway, it's probably OK. You have r+. Committed r272195: <https://trac.webkit.org/changeset/272195> |