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

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>9954</bug_id>
          
          <creation_ts>2016-07-15 16:00:02 +0000</creation_ts>
          <short_desc>report tool: a communication mechanism for sending results</short_desc>
          <delta_ts>2017-12-06 17:03:36 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Test Plans/Suite</product>
          <component>test-plans/suite</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9559</see_also>
    
    <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=9682</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          <dependson>9682</dependson>
    
    <dependson>10162</dependson>
          <blocked>10639</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Esquivel">benjamin.esquivel</reporter>
          <assigned_to name="Mariano Lopez">mariano.lopez</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>bluelightning</cc>
    
    <cc>corneliux.stoicescu</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>mariano.lopez</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>michael.g.wood</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64051</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-07-15 16:00:02 +0000</bug_when>
    <thetext>For the test reporting tool to consume results, it must be able to receive them from a remote source. Once bug 9682 or similar is implemented, it means that the test results are in a standard format and it can be received at the test reporting server.

The goal is to define a mechanism for passing results from a test client to a reporting server with the following requirements in mind:
 - Client authentication
 - report sessions
   - ability to resume
   - ability to update existing results
   - ability to abort/discard
 - reuse existing communication protocols (xml-rpc, json-rpc, etc)

This feature can be demonstrated without depending on bug 9682 by using python&apos;s unittest xml or json text test runners with sample tests and using the following procedure:

1. at the client, with a results file in json/xml, issue a remote call to a known test server notifying the desire to establish a communication session
2. at the server, listen for client calls and grant them communication sessions if they pass the authentication challenge. 
3. at the server, receive results from the session with the client. Store the results locally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64878</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-08-04 15:42:09 +0000</bug_when>
    <thetext>I think we could make our lives easier in many ways if we have the testing client push data to a repository and the TRT consume data from that repository.

This would help because:
* We remove linkage between the client and the TRT, meaning we don&apos;t have to update them in sync, we don&apos;t have to ensure the TRT has amazing uptime, etc.
* We keep the raw test data and can use it in alternative ways that we haven&apos;t thought of yet
* We don&apos;t have to worry about security of an auth interface on the TRT
* We don&apos;t have an API which must be protected against attacks

I&apos;d envisaged a system where:
a) QA data are pushed to git (much like buildhistory data in poky-buildhistory[1])
b) Some mechanism such as a post-commit hook, DataKit[2], FedMsg[3], a simple timer/cron job etc let&apos;s the TRT know there&apos;s new data to process
c) The TRT database is updated with the new data

It&apos;s possible that the piece at step b) should process the raw data and submit it to the TRT, and therefore that we&apos;d still need this communication mechanism, though that would still require an auth mechanism and DoS mitigations.

I&apos;m certain, however, that we don&apos;t want direct linkage between the testing client (i.e. AB workers) and the TRT, and also that we should preserve the raw data (buildhistory, selftest reports, performance data).

1. http://git.yoctoproject.org/cgit/cgit.cgi/poky-buildhistory/
2. https://github.com/docker/datakit
3. http://www.fedmsg.com/en/latest/overview/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65031</commentid>
    <comment_count>2</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-08-10 18:25:59 +0000</bug_when>
    <thetext>I like the proposal, if the repository is treated as intermediate and no future data coherency is expected. Say, that would avoid problems like when results are erased, it would not be expected these results are erased from the repository as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65032</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-08-10 18:27:12 +0000</bug_when>
    <thetext>re-assigning to Leo so he can find someone in the team to implement it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65144</commentid>
    <comment_count>4</comment_count>
    <who name="Leonardo Sandoval Gonzalez">leonardo.sandoval.gonzalez</who>
    <bug_when>2016-08-12 19:27:43 +0000</bug_when>
    <thetext>If I understand correctly, this bug is about this data flow

AB -&gt; nightly-oe-selftest -&gt; XML files &gt; git add XML files -&gt; git commit -&gt; git push

The interesting point here is to define the repository tree structure.

Subsequent bugs derived from this one:

* step b on comment https://bugzilla.yoctoproject.org/show_bug.cgi?id=9954#c1: This will push the XML into the TRT somehow.

* The TRT itself if it does not exist.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65203</commentid>
    <comment_count>5</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-08-15 20:09:54 +0000</bug_when>
    <thetext>Should this be implemented as another option of oe-selftest or should it push everytime it runs?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65241</commentid>
    <comment_count>6</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-08-16 20:04:45 +0000</bug_when>
    <thetext>We could have oe-selftest include an option to write output and commit them to a git repository, or we could rely on whatever&apos;s calling oe-selftest (i.e. the autobuilder) to collect the oe-selftest output and commit it to a repository.

The closest analogue we currently have is buildhistory, which has logic to push to create a local git repo of the buildhistory and push it to a remote based on OE configuration variables. Would it make sense to do similar for oe-selftest?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65283</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-08-17 23:15:42 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; We could have oe-selftest include an option to write output and commit them
&gt; to a git repository, or we could rely on whatever&apos;s calling oe-selftest
&gt; (i.e. the autobuilder) to collect the oe-selftest output and commit it to a
&gt; repository.
&gt; 
&gt; The closest analogue we currently have is buildhistory, which has logic to
&gt; push to create a local git repo of the buildhistory and push it to a remote
&gt; based on OE configuration variables. Would it make sense to do similar for
&gt; oe-selftest?

I was talking to Mariano about this procedure of having a local repo then push to a remote based on config and I believe it is the best way to proceed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68421</commentid>
    <comment_count>8</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-11-17 18:43:20 +0000</bug_when>
    <thetext>I was working on using a git repo to store the results of the tests and is almost completed. Also in the last couple of weeks this mechanism has become more popular so, I moved the original code to an OE library.

Benjamin and I also had a chat with what to do with the test metadata and we concluded that we need an XML file for this. My proposal for this file would be:

&lt;?xml version=&quot;1.0&quot; ?&gt;
&lt;metadata&gt;
        &lt;hostname&gt;yctb01&lt;/hostname&gt;
        &lt;machine&gt;qemux86-64&lt;/machine&gt;
        &lt;distro&gt;poky&lt;/distro&gt;
        &lt;distro_version&gt;2.2&lt;/distro_version&gt;
        &lt;layers&gt;
                &lt;meta&gt;
                        &lt;branch&gt;mariano/bug9954v2&lt;/branch&gt;
                        &lt;revision&gt;43e652f3d1fee5ce7fad67e6400315eab1b34270&lt;/revision&gt;
                &lt;/meta&gt;
                &lt;meta-poky&gt;
                        &lt;branch&gt;mariano/bug9954v2&lt;/branch&gt;
                        &lt;revision&gt;43e652f3d1fee5ce7fad67e6400315eab1b34270&lt;/revision&gt;
                &lt;/meta-poky&gt;
                &lt;meta-yocto-bsp&gt;
                        &lt;branch&gt;mariano/bug9954v2&lt;/branch&gt;
                        &lt;revision&gt;43e652f3d1fee5ce7fad67e6400315eab1b34270&lt;/revision&gt;
                &lt;/meta-yocto-bsp&gt;
                &lt;meta-selftest&gt;
                        &lt;branch&gt;mariano/bug9954v2&lt;/branch&gt;
                        &lt;revision&gt;43e652f3d1fee5ce7fad67e6400315eab1b34270&lt;/revision&gt;
                &lt;/meta-selftest&gt;
        &lt;/layers&gt;
&lt;/metadata&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68432</commentid>
    <comment_count>9</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-11-18 06:59:39 +0000</bug_when>
    <thetext>It would be good to sync with bug 10582. There is a proposal for Git branch and tag naming, for example.

Also, bug 10590 is about test report format for build performance tests

Just a note: oe-build-perf-test script handles committing results to a (local) git repository but is not able to do git push.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68433</commentid>
    <comment_count>10</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-11-18 07:04:04 +0000</bug_when>
    <thetext>Regarding the proposed xml metadata, I think it might make sense to add some host distro information as well, e.g. NAME and VERSION from /etc/os-release.

I would also include distro branch and revision information, i.e. branch and revision of poky. The &lt;layers&gt; element would then only list additional layers</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68448</commentid>
    <comment_count>11</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-19 00:14:51 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; It would be good to sync with bug 10582. There is a proposal for Git branch
&gt; and tag naming, for example.
&gt; 
&gt; Also, bug 10590 is about test report format for build performance tests
As I discussed earlier with Markus, both performance and test results can use a common structure.
&gt; 
&gt; Just a note: oe-build-perf-test script handles committing results to a
&gt; (local) git repository but is not able to do git push.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68449</commentid>
    <comment_count>12</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-19 01:24:50 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Regarding the proposed xml metadata, I think it might make sense to add some
&gt; host distro information as well, e.g. NAME and VERSION from /etc/os-release.
I agree to this,
&gt; 
&gt; I would also include distro branch and revision information, i.e. branch and
&gt; revision of poky. The &lt;layers&gt; element would then only list additional layers
and agree to this one too.

This is a good time for putting the report template in the wiki. I&apos;ll work with Mariano so we put something that takes performance also into account.

I propose putting it here:

https://wiki.yoctoproject.org/wiki/QA/Test_Report_Template</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68512</commentid>
    <comment_count>13</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-11-22 20:49:52 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Regarding the proposed xml metadata, I think it might make sense to add some
&gt; host distro information as well, e.g. NAME and VERSION from /etc/os-release.

It does, indeed

&gt; I would also include distro branch and revision information, i.e. branch and
&gt; revision of poky. The &lt;layers&gt; element would then only list additional layers

Perhaps in our use case of poky combo layer makes sense, but for cases where the user have downloaded layers separately it would make sense to have the revision information per layer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68527</commentid>
    <comment_count>14</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-22 23:47:13 +0000</bug_when>
    <thetext>I have started the documentation here:

https://wiki.yoctoproject.org/wiki/QA/Automated_Test_Report_Template

The rest of the work is noted there, summarizing:

1. extend our JUnit-XML template to accept performance data (edit it)
2. generate a performance sample and link it there (based on the template)
3. create the execution information template (all common things for the run). Markus has already something in this regard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68531</commentid>
    <comment_count>15</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-11-23 08:22:52 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; &gt; I would also include distro branch and revision information, i.e. branch and
&gt; &gt; revision of poky. The &lt;layers&gt; element would then only list additional layers
&gt; 
&gt; Perhaps in our use case of poky combo layer makes sense, but for cases where
&gt; the user have downloaded layers separately it would make sense to have the
&gt; revision information per layer.

Yes, that&apos;s implicit in my proposal :) If you clone oe-core and every layer separately, you would get git revision of oe-core as the &quot;main revision&quot; and every separately downloaded layer as &lt;layer&gt; element</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68682</commentid>
    <comment_count>16</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-11-29 14:47:33 +0000</bug_when>
    <thetext>Sent patch to the mailing list:

http://lists.openembedded.org/pipermail/openembedded-core/2016-November/129399.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68780</commentid>
    <comment_count>17</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-12-01 16:06:57 +0000</bug_when>
    <thetext>Sent v2 to the mailing list:

http://lists.openembedded.org/pipermail/openembedded-core/2016-December/129516.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68835</commentid>
    <comment_count>18</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-12-05 15:23:18 +0000</bug_when>
    <thetext>I put a modified metadata format proposal onto the wiki page:
https://wiki.yoctoproject.org/wiki/QA/Automated_Test_Report_Template

In the proposal I added distro version information (as I suggested above) and changed the layers element only to contain additional/modified layers. I&apos;m also thinking that we should probably add bitbake version there, too, (this information would be present in case it was customized).

I&apos;m not an XML guru so I&apos;m not sure how to balance between xml (sub-)elements and attributes. Following the JUnit style, I used more attributes than Mariano&apos;s original proposal. In any case, I think it would be logical to have e.g. all host distro related information under one &lt;host_distro&gt; element (either attributes or subelements) rather than having multiple &quot;parallel&quot; host_distro, host_distro_version, host_distro_pretty_name etc. elements.

I would probably change the &quot;distro&quot; tag(s) to &quot;product&quot; (because oe-core, for example, is not a distro as such) but I could do with &quot;distro&quot; as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69128</commentid>
    <comment_count>19</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-12-14 16:36:54 +0000</bug_when>
    <thetext>Merged in oe-core 758e4b7e619f9aaa79e3910b5539ff8fb2d1064a.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>