Bug 221286

Summary: [LayoutTests] Convert http/tests/appcache convert PHP to Python
Product: WebKit Reporter: Chris Gambrell <cgambrell>
Component: Tools / TestsAssignee: Chris Gambrell <cgambrell>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, ews-watchlist, hi, jbedard, ryanhaddad, 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=220749
https://bugs.webkit.org/show_bug.cgi?id=224054
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
ews-feeder: commit-queue-
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Chris Gambrell
Reported 2021-02-02 12:46:04 PST
Replacing PHP with equivalent Python CGI scripts
Attachments
Patch (8.39 KB, patch)
2021-02-02 14:07 PST, Chris Gambrell
no flags
Patch (9.20 KB, patch)
2021-02-02 14:21 PST, Chris Gambrell
no flags
Patch (7.71 KB, patch)
2021-02-02 17:29 PST, Chris Gambrell
no flags
Patch (12.76 KB, patch)
2021-02-02 18:11 PST, Chris Gambrell
no flags
Patch (15.81 KB, patch)
2021-02-02 18:22 PST, Chris Gambrell
no flags
Patch (22.34 KB, patch)
2021-02-02 18:46 PST, Chris Gambrell
no flags
Patch (23.36 KB, patch)
2021-02-03 08:33 PST, Chris Gambrell
no flags
Patch (26.93 KB, patch)
2021-02-03 09:49 PST, Chris Gambrell
no flags
Patch (29.26 KB, patch)
2021-02-03 11:07 PST, Chris Gambrell
no flags
Patch (41.57 KB, patch)
2021-02-03 14:30 PST, Chris Gambrell
no flags
Patch (48.33 KB, patch)
2021-02-03 15:45 PST, Chris Gambrell
no flags
Patch (54.60 KB, patch)
2021-02-03 16:55 PST, Chris Gambrell
no flags
Patch (55.44 KB, patch)
2021-02-04 07:28 PST, Chris Gambrell
no flags
Patch (70.68 KB, patch)
2021-02-04 09:45 PST, Chris Gambrell
ews-feeder: commit-queue-
Patch (79.62 KB, patch)
2021-02-04 11:41 PST, Chris Gambrell
ews-feeder: commit-queue-
Patch (14.54 KB, patch)
2021-02-04 14:16 PST, Chris Gambrell
no flags
Patch (15.08 KB, patch)
2021-02-04 14:51 PST, Chris Gambrell
no flags
Patch (24.94 KB, patch)
2021-02-04 15:28 PST, Chris Gambrell
no flags
Patch (37.79 KB, patch)
2021-02-04 18:07 PST, Chris Gambrell
no flags
Patch (58.98 KB, patch)
2021-02-04 18:56 PST, Chris Gambrell
no flags
Patch (55.48 KB, patch)
2021-02-04 19:47 PST, Chris Gambrell
no flags
Patch (58.84 KB, patch)
2021-02-05 06:51 PST, Chris Gambrell
ews-feeder: commit-queue-
Patch (59.33 KB, patch)
2021-02-05 09:46 PST, Chris Gambrell
no flags
Patch (60.32 KB, patch)
2021-02-05 10:54 PST, Chris Gambrell
no flags
Patch (59.21 KB, patch)
2021-02-05 12:29 PST, Chris Gambrell
no flags
Patch (66.31 KB, patch)
2021-02-05 12:49 PST, Chris Gambrell
no flags
Patch (66.36 KB, patch)
2021-02-05 13:50 PST, Chris Gambrell
no flags
Patch (93.61 KB, patch)
2021-02-05 15:04 PST, Chris Gambrell
no flags
Patch (89.35 KB, patch)
2021-02-05 16:06 PST, Chris Gambrell
no flags
Patch (87.45 KB, patch)
2021-02-05 17:01 PST, Chris Gambrell
no flags
Patch (88.13 KB, patch)
2021-02-05 17:30 PST, Chris Gambrell
no flags
Patch (23.23 KB, patch)
2021-03-23 13:02 PDT, Chris Gambrell
no flags
Patch (42.88 KB, patch)
2021-03-23 14:16 PDT, Chris Gambrell
no flags
Patch (64.71 KB, patch)
2021-03-23 19:33 PDT, Chris Gambrell
no flags
Patch (86.20 KB, patch)
2021-03-23 22:23 PDT, Chris Gambrell
no flags
Patch (105.48 KB, patch)
2021-03-31 09:46 PDT, Chris Gambrell
no flags
Patch (105.02 KB, patch)
2021-03-31 17:14 PDT, Chris Gambrell
no flags
Radar WebKit Bug Importer
Comment 1 2021-02-02 12:47:50 PST
Chris Gambrell
Comment 2 2021-02-02 14:07:15 PST
Chris Gambrell
Comment 3 2021-02-02 14:21:42 PST
Alexey Proskuryakov
Comment 4 2021-02-02 14:50:03 PST
Comment on attachment 419064 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419064&action=review > LayoutTests/http/tests/appcache/resources/slow-resource.py:7 > +time.sleep(1 / 100000) Why does this use 1 / 100000? I thought that the argument was seconds for both PHP and Python.
Chris Gambrell
Comment 5 2021-02-02 17:04:06 PST
(In reply to Alexey Proskuryakov from comment #4) > Comment on attachment 419064 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=419064&action=review > > > LayoutTests/http/tests/appcache/resources/slow-resource.py:7 > > +time.sleep(1 / 100000) > > Why does this use 1 / 100000? I thought that the argument was seconds for > both PHP and Python. You are correct. I must have accidentally had the 'usleep' documentation pulled up instead of the 'sleep' for PHP. Will fix this in the next patch I push.
Chris Gambrell
Comment 6 2021-02-02 17:29:23 PST
Chris Gambrell
Comment 7 2021-02-02 18:08:00 PST
(In reply to Chris Gambrell from comment #6) > Created attachment 419088 [details] > Patch Failed mac-wk1, mac-wb2. identifier-test.py incorrectly sent status
Chris Gambrell
Comment 8 2021-02-02 18:11:32 PST
Chris Gambrell
Comment 9 2021-02-02 18:22:22 PST
Chris Gambrell
Comment 10 2021-02-02 18:46:57 PST
Chris Gambrell
Comment 11 2021-02-03 08:33:02 PST
Chris Gambrell
Comment 12 2021-02-03 09:49:14 PST
Chris Gambrell
Comment 13 2021-02-03 11:07:47 PST
Chris Gambrell
Comment 14 2021-02-03 14:30:12 PST
Chris Gambrell
Comment 15 2021-02-03 15:45:50 PST
Chris Gambrell
Comment 16 2021-02-03 16:55:45 PST
Chris Gambrell
Comment 17 2021-02-04 07:28:06 PST
Chris Gambrell
Comment 18 2021-02-04 09:45:07 PST
Chris Gambrell
Comment 19 2021-02-04 11:41:45 PST
Chris Gambrell
Comment 20 2021-02-04 14:16:57 PST
Chris Gambrell
Comment 21 2021-02-04 14:51:49 PST
Chris Gambrell
Comment 22 2021-02-04 15:28:20 PST
Chris Gambrell
Comment 23 2021-02-04 18:07:21 PST
Chris Gambrell
Comment 24 2021-02-04 18:56:55 PST
Chris Gambrell
Comment 25 2021-02-04 19:47:32 PST
Chris Gambrell
Comment 26 2021-02-05 06:51:41 PST
Chris Gambrell
Comment 27 2021-02-05 09:46:33 PST
Chris Gambrell
Comment 28 2021-02-05 10:54:15 PST
Chris Gambrell
Comment 29 2021-02-05 12:29:28 PST
Chris Gambrell
Comment 30 2021-02-05 12:49:29 PST
Chris Gambrell
Comment 31 2021-02-05 13:50:19 PST
Chris Gambrell
Comment 32 2021-02-05 15:04:47 PST
Chris Gambrell
Comment 33 2021-02-05 16:06:59 PST
Chris Gambrell
Comment 34 2021-02-05 17:01:02 PST
Chris Gambrell
Comment 35 2021-02-05 17:30:58 PST
Chris Gambrell
Comment 36 2021-03-23 13:02:58 PDT
Chris Gambrell
Comment 37 2021-03-23 14:16:08 PDT
Chris Gambrell
Comment 38 2021-03-23 19:33:36 PDT
Chris Gambrell
Comment 39 2021-03-23 22:23:05 PDT
Chris Gambrell
Comment 40 2021-03-23 22:25:47 PDT
Comment on attachment 424097 [details] Patch http/tests/appcache/resources/manifest-protected-script.php was not used and removed from the directory
Jonathan Bedard
Comment 41 2021-03-24 12:25:26 PDT
Comment on attachment 424097 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424097&action=review > LayoutTests/http/tests/appcache/resources/fail-on-update-2.py:9 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this, although maybe we should leverage the getState/setState in http/tests/resources/portabilityLayer.py instead of duplicating it. > LayoutTests/http/tests/appcache/resources/fail-on-update.py:11 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this, although maybe we should leverage the getState/setState in http/tests/resources/portabilityLayer.py instead of duplicating it. > LayoutTests/http/tests/appcache/resources/online-allowlist.py:10 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this. > LayoutTests/http/tests/appcache/resources/remove-cache.py:11 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this, although maybe we should leverage the getState/setState in http/tests/resources/portabilityLayer.py instead of duplicating it. > LayoutTests/http/tests/appcache/resources/update-cache.py:11 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this, although the "step_counter" hear looks pretty similar to the one used in another file in this change.
Chris Gambrell
Comment 42 2021-03-31 09:46:30 PDT
Chris Gambrell
Comment 43 2021-03-31 09:48:45 PDT
Comment on attachment 424779 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424779&action=review > LayoutTests/ChangeLog:70 > + * http/tests/appcache/resources/manifest-protected-script.php: Removed. File not used by any tests > LayoutTests/http/tests/appcache/404-resource-with-slow-main-resource.php:-1 > -<!-- webkit-test-runner [ dumpJSConsoleLogInStdErr=true ] --> Moved to LayoutTests/TestExpectations > LayoutTests/http/tests/appcache/fail-on-update-2.html:-1 > -<!-- webkit-test-runner [ dumpJSConsoleLogInStdErr=true ] --> Moved to LayoutTests/TestExpectations > LayoutTests/http/tests/appcache/fail-on-update.html:-1 > -<!-- webkit-test-runner [ dumpJSConsoleLogInStdErr=true ] --> Moved to LayoutTests/TestExpectations
Jonathan Bedard
Comment 44 2021-03-31 14:02:49 PDT
Comment on attachment 424779 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424779&action=review > LayoutTests/http/tests/appcache/resources/cookie-protected-script.py:13 > + cookies[cookie[0]] = cookie[1] You're about to land get_cookies in https://bugs.webkit.org/show_bug.cgi?id=223891, no? > LayoutTests/http/tests/appcache/resources/fail-on-update.py:13 > +def set_state(new_state, file): Seems like we should be using from resources.portabilityLayer import set_state here > LayoutTests/http/tests/appcache/resources/fallback-redirect.py:10 > + 'Content-Type: text/html\r\n\r\n' No 307? > LayoutTests/http/tests/appcache/resources/manifest-if-cookie.py:13 > + cookies[cookie[0]] = cookie[1] You're about to land get_cookies in https://bugs.webkit.org/show_bug.cgi?id=223891, no? > LayoutTests/http/tests/appcache/resources/online-allowlist.py:10 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) Doesn't look like we're using this > LayoutTests/http/tests/appcache/resources/remove-cache.py:13 > +def set_state(new_state, file): Seems like we should be using from resources.portabilityLayer import set_state here > LayoutTests/http/tests/appcache/resources/update-cache.py:11 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) Doesn't look like we are using this. > LayoutTests/http/tests/appcache/resources/scope1/cookie-protected-manifest.py:13 > + cookies[cookie[0]] = cookie[1] Consider using the shared get_cookie function you are about to land. > LayoutTests/http/tests/appcache/resources/scope2/cookie-protected-script.py:13 > + cookies[cookie[0]] = cookie[1] Consider using the shared get_cookie function you are about to land
Chris Gambrell
Comment 45 2021-03-31 17:14:27 PDT
EWS
Comment 46 2021-03-31 18:16:56 PDT
Committed r275332: <https://commits.webkit.org/r275332> All reviewed patches have been landed. Closing bug and clearing flags on attachment 424845 [details].
Note You need to log in before you can comment on or make changes to this bug.