<?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>10618</bug_id>
          
          <creation_ts>2016-11-08 09:38:00 +0000</creation_ts>
          <short_desc>Increase oe-selftest coverage of wic codebase</short_desc>
          <delta_ts>2017-12-06 17:15:39 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ed Bartosh">eduard.bartosh</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>corneliux.stoicescu</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68066</commentid>
    <comment_count>0</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-08 09:38:00 +0000</bug_when>
    <thetext>Increase oe-selftest coverage for wic codebase scripts/lib/wic to 80-90%

This should increase level of control on wic functionality and put refactoring and other code changes under control.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68136</commentid>
    <comment_count>1</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-11-08 17:58:31 +0000</bug_when>
    <thetext>Just a small note that testing all the argument options is one of the objectives of this request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68176</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-11-09 09:10:33 +0000</bug_when>
    <thetext>There are two types of argument options in wic - command line arguments and arguments in .wks files. The former are mostly covered by tests already, the latter are covered only partly.

Covering options as such shouldn&apos;t be a main goal of this task in my opinion. The goal should be to cover as much functionality as possible and increase test coverage.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69985</commentid>
    <comment_count>3</comment_count>
    <who name="Jair Gonzalez">jair.de.jesus.gonzalez.plascencia</who>
    <bug_when>2017-01-21 01:34:20 +0000</bug_when>
    <thetext>Hi Ed,

As you mentioned on your last comment, currently almost all command line options are tested, and .wks options are indirectly tested too by generating the different images on the existing test cases. Also all the current different canned-wks images, and the source plugins they use are tested for executing without errors in this process.
Besides this, could you please provide 2 or 3 examples of functionality that you consider that requires to be tested?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70031</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-01-23 17:19:08 +0000</bug_when>
    <thetext>Looking at current coverage report I&apos;d say creator.py, filemap.py partition.py, rawcopy.py, rootfs_pcbios_ext.py and syslinux.py modules are covered much less than the rest of code. I&apos;d start from those, look at which lines are not covered and decide if it&apos;s important functionality to cover or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70032</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-01-23 17:25:05 +0000</bug_when>
    <thetext>Here is the current coverage report for your reference:

$ coverage3 report --skip-covered 
Name                                                                           Stmts   Miss Branch BrPart  Cover
----------------------------------------------------------------------------------------------------------------
/home/ed/git/yocto/poky/scripts/lib/wic/conf.py                                   48      6     12      5    82%
/home/ed/git/yocto/poky/scripts/lib/wic/creator.py                                62     19     28     11    62%
/home/ed/git/yocto/poky/scripts/lib/wic/engine.py                                108     13     60     12    85%
/home/ed/git/yocto/poky/scripts/lib/wic/filemap.py                               247     96     52      6    58%
/home/ed/git/yocto/poky/scripts/lib/wic/help.py                                   49      4     18      3    90%
/home/ed/git/yocto/poky/scripts/lib/wic/imager/direct.py                         187     18     84     13    87%
/home/ed/git/yocto/poky/scripts/lib/wic/ksparser.py                              121     34     38      7    65%
/home/ed/git/yocto/poky/scripts/lib/wic/msger.py                                 133     51     52     17    57%
/home/ed/git/yocto/poky/scripts/lib/wic/partition.py                             213     75     58     14    61%
/home/ed/git/yocto/poky/scripts/lib/wic/plugin.py                                 84      7     35      6    89%
/home/ed/git/yocto/poky/scripts/lib/wic/pluginbase.py                             25      1      2      0    96%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/imager/direct_plugin.py           36      3      6      2    88%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/bootimg-efi.py            120     17     28     10    79%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/bootimg-partition.py       54     13     24      5    67%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/bootimg-pcbios.py         100      8     30     10    86%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/fsimage.py                 22     13      6      0    32%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/isoimage-isohybrid.py     275     84     94     33    61%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/rawcopy.py                 31     21     10      0    24%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/rootfs.py                  31     10     12      3    65%
/home/ed/git/yocto/poky/scripts/lib/wic/plugins/source/rootfs_pcbios_ext.py       72     59     24      0    14%
/home/ed/git/yocto/poky/scripts/lib/wic/utils/misc.py                             40      3     24      8    83%
/home/ed/git/yocto/poky/scripts/lib/wic/utils/oe/misc.py                         103     17     44      8    82%
/home/ed/git/yocto/poky/scripts/lib/wic/utils/partitionedfs.py                   164     24     87     20    80%
/home/ed/git/yocto/poky/scripts/lib/wic/utils/runner.py                           57     16     31     11    65%
/home/ed/git/yocto/poky/scripts/lib/wic/utils/syslinux.py                         18     15     12      0    10%
/home/ed/git/yocto/poky/scripts/wic                                              171     46     78     23    71%
----------------------------------------------------------------------------------------------------------------
TOTAL                                                                           2582    673    949    227    69%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70076</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-01-24 13:11:31 +0000</bug_when>
    <thetext>Jair, would you mind if I take this bug? I&apos;m going to refactor wic codebase in M3 time frame, so I&apos;ll be changing tests quite actively. It will probably slow both of us down if we need to synchronise our work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70086</commentid>
    <comment_count>7</comment_count>
    <who name="Jair Gonzalez">jair.de.jesus.gonzalez.plascencia</who>
    <bug_when>2017-01-24 16:27:38 +0000</bug_when>
    <thetext>Ed, sure, go ahead. I was still about to start the implementation stage, so no problems there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70087</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-01-24 16:30:40 +0000</bug_when>
    <thetext>thanks. I&apos;ll take it then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70735</commentid>
    <comment_count>9</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-02-16 12:32:21 +0000</bug_when>
    <thetext>The coverage is now 70% and going to be increased after these two patchsets are accepted:
https://patchwork.openembedded.org/series/4708/#
https://patchwork.openembedded.org/series/5320/#

moving to M4 as there is still some work to be done to increase coverage to the target 80-90%</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71808</commentid>
    <comment_count>10</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-03-28 12:50:15 +0000</bug_when>
    <thetext>Increased test coverage to 81% by these 2 patchsets:
http://lists.openembedded.org/pipermail/openembedded-core/2017-March/134460.html
http://lists.openembedded.org/pipermail/openembedded-core/2017-March/134761.html

please, review</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72017</commentid>
    <comment_count>11</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2017-04-03 11:15:56 +0000</bug_when>
    <thetext>both patchsets have been merged into master</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>