<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>203701</bug_id>
          
          <creation_ts>2019-10-31 16:16:26 -0700</creation_ts>
          <short_desc>Python 3: Add support in webkitpy.layout_tests</short_desc>
          <delta_ts>2021-06-28 04:37:06 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=203702</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=184986</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=204180</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=204209</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=204212</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=204227</see_also>
    
    <see_also>https://bugs.webkit.org/show_bug.cgi?id=222188</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>221043</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonathan Bedard">jbedard</reporter>
          <assigned_to name="Jonathan Bedard">jbedard</assigned_to>
          <cc>emilio</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>glenn</cc>
    
    <cc>gsnedders</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>pnormand</cc>
    
    <cc>psaavedra</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1586124</commentid>
    <comment_count>0</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2019-10-31 16:16:26 -0700</bug_when>
    <thetext>Work towards allowing run-webkit-tests to be run with Python3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1722973</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-01-27 07:30:23 -0800</bug_when>
    <thetext>*** Bug 210699 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1722977</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2021-01-27 07:34:39 -0800</bug_when>
    <thetext>From bug #210699:

$ ./Tools/Scripts/run-webkit-tests --verbose --debug LayoutTests/fast/css/getComputedStyle/computed-style.html                                                                                                                             
Using port &apos;gtk-wk2&apos;
Test configuration: &lt;, x86, debug&gt;
Placing test results in /home/emilio/src/WebKit/WebKitBuild/Debug/layout-test-results
Using Debug build
Pixel tests disabled
Regular timeout: 30000, slow test timeout: 150000
Command line: /home/emilio/src/WebKit/WebKitBuild/Debug/bin/WebKitTestRunner -

Found 1 test; running 1, skipping 0.
                  
Verbose baseline search path: platform/gtk -&gt; platform/wk2 -&gt; generic

Baseline search path: platform/gtk -&gt; platform/wk2 -&gt; generic

Running 1 test

Checking system dependencies ...
TypeError raised: argument should be integer or bytes-like object, not &apos;str&apos;
Traceback (most recent call last):
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 91, in main
    run_details = run(port, options, args, stderr)
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py&quot;, line 487, in run
    run_details = manager.run(args)
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py&quot;, line 270, in run
    if not self._set_up_run(tests_to_run_by_device[device_type], device_type=device_type):
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/manager.py&quot;, line 176, in _set_up_run
    self._port.setup_test_run(device_type)
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/gtk.py&quot;, line 108, in setup_test_run
    self._pulseaudio_sanitizer.unload_pulseaudio_module()
  File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.py&quot;, line 58, in unload_pulseaudio_module
    if module.find(&quot;module-stream-restore&quot;) &gt;= 0:
TypeError: argument should be integer or bytes-like object, not &apos;str&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1722986</commentid>
    <comment_count>3</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-01-27 07:53:45 -0800</bug_when>
    <thetext>Not a code-path (In reply to Michael Catanzaro from comment #2)
&gt; From bug #210699:
&gt; 
&gt; $ ./Tools/Scripts/run-webkit-tests --verbose --debug
&gt; LayoutTests/fast/css/getComputedStyle/computed-style.html                   
&gt; 
&gt; Using port &apos;gtk-wk2&apos;
&gt; Test configuration: &lt;, x86, debug&gt;
&gt; Placing test results in
&gt; /home/emilio/src/WebKit/WebKitBuild/Debug/layout-test-results
&gt; Using Debug build
&gt; Pixel tests disabled
&gt; Regular timeout: 30000, slow test timeout: 150000
&gt; Command line: /home/emilio/src/WebKit/WebKitBuild/Debug/bin/WebKitTestRunner
&gt; -
&gt; 
&gt; Found 1 test; running 1, skipping 0.
&gt;                   
&gt; Verbose baseline search path: platform/gtk -&gt; platform/wk2 -&gt; generic
&gt; 
&gt; Baseline search path: platform/gtk -&gt; platform/wk2 -&gt; generic
&gt; 
&gt; Running 1 test
&gt; 
&gt; Checking system dependencies ...
&gt; TypeError raised: argument should be integer or bytes-like object, not &apos;str&apos;
&gt; Traceback (most recent call last):
&gt;   File
&gt; &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/
&gt; run_webkit_tests.py&quot;, line 91, in main
&gt;     run_details = run(port, options, args, stderr)
&gt;   File
&gt; &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/
&gt; run_webkit_tests.py&quot;, line 487, in run
&gt;     run_details = manager.run(args)
&gt;   File
&gt; &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/
&gt; manager.py&quot;, line 270, in run
&gt;     if not self._set_up_run(tests_to_run_by_device[device_type],
&gt; device_type=device_type):
&gt;   File
&gt; &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/
&gt; manager.py&quot;, line 176, in _set_up_run
&gt;     self._port.setup_test_run(device_type)
&gt;   File &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/gtk.py&quot;, line
&gt; 108, in setup_test_run
&gt;     self._pulseaudio_sanitizer.unload_pulseaudio_module()
&gt;   File
&gt; &quot;/home/emilio/src/WebKit/Tools/Scripts/webkitpy/port/pulseaudio_sanitizer.
&gt; py&quot;, line 58, in unload_pulseaudio_module
&gt;     if module.find(&quot;module-stream-restore&quot;) &gt;= 0:
&gt; TypeError: argument should be integer or bytes-like object, not &apos;str&apos;

I don&apos;t have a machine which exercises this code path, the fix is not likely to be difficult, but it&apos;s also likely there are multiple encoding problems in that class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1722987</commentid>
    <comment_count>4</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-01-27 07:54:16 -0800</bug_when>
    <thetext>If that&apos;s the only issue, the fix is easy. I&apos;ll check it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1722997</commentid>
    <comment_count>5</comment_count>
      <attachid>418548</attachid>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-01-27 08:39:05 -0800</bug_when>
    <thetext>Created attachment 418548
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1723001</commentid>
    <comment_count>6</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-01-27 08:42:24 -0800</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #5)
&gt; Created attachment 418548 [details]
&gt; Patch

That&apos;s a blind fix for the raised exception</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1746459</commentid>
    <comment_count>7</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-04-02 05:11:35 -0700</bug_when>
    <thetext>bug 223888 removes that pulseaudio thing BTW :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755040</commentid>
    <comment_count>8</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-04-28 09:07:36 -0700</bug_when>
    <thetext>What&apos;s the status here?

Just trying now to run the WPE layout tests in Python3, the test harness no longer spits a traceback and tests actually seem to run.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755046</commentid>
    <comment_count>9</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2021-04-28 09:37:05 -0700</bug_when>
    <thetext>(In reply to Philippe Normand from comment #8)
&gt; What&apos;s the status here?
&gt; 
&gt; Just trying now to run the WPE layout tests in Python3, the test harness no
&gt; longer spits a traceback and tests actually seem to run.

The test runner works in 3.7, still has some issues in 3.8 which I will be working on this week and next (issues are about forking)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755048</commentid>
    <comment_count>10</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-04-28 09:48:13 -0700</bug_when>
    <thetext>Here in linux with python 3.8.7 the only issue I noticed so far was that tests expected to time out were detected as unexpected timeouts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755382</commentid>
    <comment_count>11</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-04-29 08:04:32 -0700</bug_when>
    <thetext>&lt;rdar://problem/77321491&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1755387</commentid>
    <comment_count>12</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2021-04-29 08:09:53 -0700</bug_when>
    <thetext>(In reply to Jonathan Bedard from comment #9)
&gt; (In reply to Philippe Normand from comment #8)
&gt; &gt; What&apos;s the status here?
&gt; &gt; 
&gt; &gt; Just trying now to run the WPE layout tests in Python3, the test harness no
&gt; &gt; longer spits a traceback and tests actually seem to run.
&gt; 
&gt; The test runner works in 3.7, still has some issues in 3.8 which I will be
&gt; working on this week and next (issues are about forking)

Note that the change of the multiprocessing default start method in 3.8 was only on macOS; non-macOS Unix systems still use the fork start method, and Windows has for a long time used the spawn start method. As such, as Philippe says, I would be surprised by changes in behaviour between 3.7 and 3.8 on Linux.

Also, given the WinCairo test bot isn&apos;t totally broken, presumably whatever is causing issues with the spawn start method is something related to the Darwin ports?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773023</commentid>
    <comment_count>13</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2021-06-28 04:37:06 -0700</bug_when>
    <thetext>Python2 is still used for the WebSocket server. WIP patch in bug 222188.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>418548</attachid>
            <date>2021-01-27 08:39:05 -0800</date>
            <delta_ts>2021-01-27 08:39:05 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-203701-20210127083904.patch</filename>
            <type>text/plain</type>
            <size>1361</size>
            <attacher name="Jonathan Bedard">jbedard</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDI3MTk1NCkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxL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KClbMF0KICAgICAgICAgZm9yIG1vZHVs
ZSBpbiBtb2R1bGVzX2xpc3Quc3BsaXRsaW5lcygpOgotICAgICAgICAgICAgaWYgbW9kdWxlLmZp
bmQoIm1vZHVsZS1zdHJlYW0tcmVzdG9yZSIpID49IDA6CisgICAgICAgICAgICBpZiBtb2R1bGUu
ZmluZChiJ21vZHVsZS1zdHJlYW0tcmVzdG9yZScpID49IDA6CiAgICAgICAgICAgICAgICAgIyBT
b21lIHB1bHNlYXVkaW8tdXRpbHMgdmVyc2lvbnMgZG9uJ3QgcHJvdmlkZQogICAgICAgICAgICAg
ICAgICMgdGhlIGluZGV4LCBqdXN0IGFuIGVtcHR5IHN0cmluZwogICAgICAgICAgICAgICAgIHNl
bGYuX3BhX21vZHVsZV9pbmRleCA9IG1vZHVsZS5zcGxpdCgnXHQnKVswXSBvciAtMQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>