<?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>80642</bug_id>
          
          <creation_ts>2012-03-08 14:44:26 -0800</creation_ts>
          <short_desc>[Chromium] Exception running reftest with --no-pixel-tests</short_desc>
          <delta_ts>2012-03-08 20:08:05 -0800</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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>80623</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Xianzhu Wang">wangxianzhu</reporter>
          <assigned_to name="Xianzhu Wang">wangxianzhu</assigned_to>
          <cc>abarth</cc>
    
    <cc>dpranke</cc>
    
    <cc>ojan</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>574238</commentid>
    <comment_count>0</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-03-08 14:44:26 -0800</bug_when>
    <thetext>...
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py&quot;, line 102, in run
    return self._run_reftest()
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/single_test_runner.py&quot;, line 276, in _run_reftest
    test_output = self._driver.run_test(self._driver_input())
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py&quot;, line 212, in run_test
    cmd_line_key = self._cmd_line_as_key(pixel_tests_needed, driver_input.args)
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py&quot;, line 240, in _cmd_line_as_key
    return &apos; &apos;.join(self.cmd_line(pixel_tests, per_test_args))
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/port/driver.py&quot;, line 237, in cmd_line
    return self._driver.cmd_line(pixel_tests or self._pixel_tests, per_test_args or [])
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium.py&quot;, line 453, in cmd_line
    cmd.extend(self._wrapper_options(pixel_tests))
  File &quot;.../WebKit/Tools/Scripts/webkitpy/layout_tests/port/chromium.py&quot;, line 415, in _wrapper_options
    cmd.append(&quot;--pixel-tests=&quot; + self._port._convert_path(self._image_path))
TypeError: cannot concatenate &apos;str&apos; and &apos;NoneType&apos; objects

The error is because self._image_path is not initialized with --no-pixel-tests, but reftests need it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574278</commentid>
    <comment_count>1</comment_count>
      <attachid>130913</attachid>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-03-08 15:09:24 -0800</bug_when>
    <thetext>Created attachment 130913
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574285</commentid>
    <comment_count>2</comment_count>
      <attachid>130913</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-03-08 15:14:23 -0800</bug_when>
    <thetext>Comment on attachment 130913
patch

This looks plausible, but I suspect there&apos;s another bug somewhere ... pixel_tests=True shouldn&apos;t be being passed to a driver that wasn&apos;t initialized with pixel_tests == True. Can you do a little more debugging and figure out how that&apos;s happening? I wonder if there&apos;s some of bug in the driver lookup code in DriverProxy.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574302</commentid>
    <comment_count>3</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-03-08 15:23:03 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 130913 [details])
&gt; This looks plausible, but I suspect there&apos;s another bug somewhere ... pixel_tests=True shouldn&apos;t be being passed to a driver that wasn&apos;t initialized with pixel_tests == True. Can you do a little more debugging and figure out how that&apos;s happening? I wonder if there&apos;s some of bug in the driver lookup code in DriverProxy.

Isn&apos;t this the intent of http://trac.webkit.org/changeset/109242? At line 522 of chromium.py, pixel test is forced if driver_input.is_reftest, even if --no-pixel-tests is passed (self._pixel_tests is False).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574315</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-03-08 15:32:31 -0800</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; (From update of attachment 130913 [details] [details])
&gt; &gt; This looks plausible, but I suspect there&apos;s another bug somewhere ... pixel_tests=True shouldn&apos;t be being passed to a driver that wasn&apos;t initialized with pixel_tests == True. Can you do a little more debugging and figure out how that&apos;s happening? I wonder if there&apos;s some of bug in the driver lookup code in DriverProxy.
&gt; 
&gt; Isn&apos;t this the intent of http://trac.webkit.org/changeset/109242? At line 522 of chromium.py, pixel test is forced if driver_input.is_reftest, even if --no-pixel-tests is passed (self._pixel_tests is False).

Sort of. It&apos;s possible I broke the changes and landed them out-of-order in a way that confused things. 

If you look at http://svn.webkit.org/repository/webkit/trunk@109264 , you&apos;ll see that DriverProxy has a map that maps the command line a DRT needs to an instance of the Driver class. If we think the test needs pixel tests, then we should only be forwarding that test to a driver that has self._pixel_tests = True. 

Put differently, driver_input.is_reftest and not self._pixel_tests should never be true. If it is, then there&apos;s a bug in the the DriverProxy code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574359</commentid>
    <comment_count>5</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-03-08 16:15:44 -0800</bug_when>
    <thetext>(In reply to comment #4)

I found the problem: the drivers are keyed by the command line, but the command line containing forced pixel_tests can only be get from the existing driver which may not have pixel_tests, before the new driver could be created.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574364</commentid>
    <comment_count>6</comment_count>
      <attachid>130913</attachid>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-03-08 16:22:57 -0800</bug_when>
    <thetext>Comment on attachment 130913
patch

Ah, makes sense. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574388</commentid>
    <comment_count>7</comment_count>
    <who name="Xianzhu Wang">wangxianzhu</who>
    <bug_when>2012-03-08 16:46:37 -0800</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 130913 [details])
&gt; Ah, makes sense. Thanks!

Thanks for review.

I feel passing pixel_tests parameter to Driver.start() and Driver.command_line() is a bit confusing. This let me think a driver can receive different pixel_tests parameters during its life. Would it be better to generate the key based on pixel_tests and per_test_args without calling the driver instance, and pass pixel_tests and per_test_args to the constructor of the driver?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574426</commentid>
    <comment_count>8</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-03-08 17:34:55 -0800</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; (From update of attachment 130913 [details] [details])
&gt; &gt; Ah, makes sense. Thanks!
&gt; 
&gt; Thanks for review.
&gt; 
&gt; I feel passing pixel_tests parameter to Driver.start() and Driver.command_line() is a bit confusing. This let me think a driver can receive different pixel_tests parameters during its life. Would it be better to generate the key based on pixel_tests and per_test_args without calling the driver instance, and pass pixel_tests and per_test_args to the constructor of the driver?

You are right, it is confusing. We are moving to a model where the driver will be able to receive different pixel_test parameters  per test, and we&apos;re halfway there.

the cmd_line() function should really be a classmethod, independent of the particular instance.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574527</commentid>
    <comment_count>9</comment_count>
      <attachid>130913</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-08 20:08:00 -0800</bug_when>
    <thetext>Comment on attachment 130913
patch

Clearing flags on attachment: 130913

Committed r110256: &lt;http://trac.webkit.org/changeset/110256&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>574528</commentid>
    <comment_count>10</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-03-08 20:08:05 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>130913</attachid>
            <date>2012-03-08 15:09:24 -0800</date>
            <delta_ts>2012-03-08 20:08:00 -0800</delta_ts>
            <desc>patch</desc>
            <filename>80642</filename>
            <type>text/plain</type>
            <size>1838</size>
            <attacher name="Xianzhu Wang">wangxianzhu</attacher>
            
              <data encoding="base64">SW5kZXg6IFRvb2xzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBUb29scy9DaGFuZ2VMb2cJKHJl
dmlzaW9uIDExMDIxMSkKKysrIFRvb2xzL0NoYW5nZUxvZwkod29ya2luZyBjb3B5KQpAQCAtMSwz
ICsxLDE0IEBACisyMDEyLTAzLTA4ICBYaWFuemh1IFdhbmcgIDx3YW5neGlhbnpodUBjaHJvbWl1
bS5vcmc+CisKKyAgICAgICAgW0Nocm9taXVtXSBFeGNlcHRpb24gcnVubmluZyByZWZ0ZXN0IHdp
dGggLS1uby1waXhlbC10ZXN0cworICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93
X2J1Zy5jZ2k/aWQ9ODA2NDIKKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4K
KworICAgICAgICAqIFNjcmlwdHMvd2Via2l0cHkvbGF5b3V0X3Rlc3RzL3BvcnQvY2hyb21pdW0u
cHk6CisgICAgICAgIChDaHJvb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