<?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>6068</bug_id>
          
          <creation_ts>2014-03-29 15:43:20 +0000</creation_ts>
          <short_desc>Create wic test suite</short_desc>
          <delta_ts>2015-09-15 13:16:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>deployment</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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>1.9</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tom Zanussi">tom.zanussi</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>jessica.zhang</cc>
          
          <qa_contact name="Daniel Istrate">daniel.alexandrux.istrate</qa_contact>
          <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>41917</commentid>
    <comment_count>0</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-03-29 15:43:20 +0000</bug_when>
    <thetext>wic really needs a (preferably automated) formal testsuite to capture all the usages we expect it to handle, and so we can detect regressions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41918</commentid>
    <comment_count>1</comment_count>
      <attachid>1866</attachid>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-03-29 18:52:13 +0000</bug_when>
    <thetext>Created attachment 1866
.wks example with hardcoded rootfs dir</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41919</commentid>
    <comment_count>2</comment_count>
      <attachid>1867</attachid>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-03-29 18:53:49 +0000</bug_when>
    <thetext>Created attachment 1867
.wks example with both partitions using indirect strings</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41920</commentid>
    <comment_count>3</comment_count>
      <attachid>1868</attachid>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-03-29 18:54:14 +0000</bug_when>
    <thetext>Created attachment 1868
.wks example with one partition using indirect strings</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41921</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-03-29 18:58:26 +0000</bug_when>
    <thetext>As a start, these are the commands tested for the multi-rootfs patches (corresponding .wks files attached):

$ wic create directdisk -e core-image-minimal

$ wic create directdisk -b /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/share -k /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/src/kernel -n /home/trz/yocto/master-cur/build/tmp/sysroots/x86_64-linux -r /home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/

$ wic create directdisk-multi -e core-image-minimal

$ wic create directdisk-multi -b /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/share -k /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/src/kernel -n /home/trz/yocto/master-cur/build/tmp/sysroots/x86_64-linux -r /home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/

$ wic create directdisk-multi-indirect-both --rootfs-dir rootfs1=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ --rootfs-dir rootfs2=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ -e core-image-minimal

$ wic create directdisk-multi-indirect-both -b /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/share -k /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/src/kernel -n /home/trz/yocto/master-cur/build/tmp/sysroots/x86_64-linux --rootfs-dir rootfs1=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ --rootfs-dir rootfs2=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/

$ wic create directdisk-multi-indirect-second -r /home/trz/yocto/master-cur/buil/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ --rootfs-dir rootfs2=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ -e core-image-minimal

$ wic create directdisk-multi-indirect-second -b /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/share -k /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay/usr/src/kernel -n /home/trz/yocto/master-cur/build/tmp/sysroots/x86_64-linux -r /home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/ --rootfs-dir rootfs2=/home/trz/yocto/master-cur/build/tmp/work/crownbay-poky-linux/core-image-minimal/1.0-r0/rootfs/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>43183</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2014-05-08 14:49:24 +0000</bug_when>
    <thetext>And a couple more for the image rootfs option:

wic create directdisk-multi-indirect-both --rootfs-dir rootfs1=core-image-minimal --rootfs-dir rootfs2=core-image-minimal -e core-image-minimal

wic create directdisk-multi-indirect-both -b /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay-noemgd/usr/share -k /home/trz/yocto/master-cur/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel -n /home/trz/yocto/master-cur/build/tmp/sysroots/x86_64-linux --rootfs-dir rootfs1=/home/trz/yocto/master-cur/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs/ --rootfs-dir rootfs2=core-image-minimal</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50612</commentid>
    <comment_count>6</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-04-29 15:21:36 +0000</bug_when>
    <thetext>Start working with QA team to add wic test cases to oe-selftest</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51962</commentid>
    <comment_count>7</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-06-26 13:15:08 +0000</bug_when>
    <thetext>Status update. 16 test cases have been created and put into production on AB. Here is how wic testing looks atm:
$ oe-selftest --run-tests wic
2015-06-26 16:06:06,272 - selftest - INFO - Checking that everything is in order before running the tests
2015-06-26 16:06:07,172 - selftest - INFO - Running bitbake -p
2015-06-26 16:06:09,719 - selftest - INFO - Loading tests from: oeqa.selftest.wic
2015-06-26 16:06:09,721 - selftest - INFO - Adding: &quot;include selftest.inc&quot; in local.conf
test01_help (oeqa.selftest.wic.Wic)
Test wic --help ... ok
test02_createhelp (oeqa.selftest.wic.Wic)
Test wic create --help ... ok
test03_listhelp (oeqa.selftest.wic.Wic)
Test wic list --help ... ok
test04_build_image_name (oeqa.selftest.wic.Wic)
Test wic create directdisk --image-name core-image-minimal ... ok
test05_build_artifacts (oeqa.selftest.wic.Wic)
Test wic create directdisk providing all artifacts. ... ok
test06_gpt_image (oeqa.selftest.wic.Wic)
Test creation of core-image-minimal with gpt table and UUID boot ... ok
test07_unsupported_subcommand (oeqa.selftest.wic.Wic)
Test unsupported subcommand ... ok
test08_no_command (oeqa.selftest.wic.Wic)
Test wic without command ... ok
test09_help_kickstart (oeqa.selftest.wic.Wic)
Test wic help overview ... ok
test10_help_plugins (oeqa.selftest.wic.Wic)
Test wic help plugins ... ok
test11_help_kickstart (oeqa.selftest.wic.Wic)
Test wic help kickstart ... ok
test12_compress_gzip (oeqa.selftest.wic.Wic)
Test compressing an image with gzip ... ok
test13_compress_gzip (oeqa.selftest.wic.Wic)
Test compressing an image with bzip2 ... ok
test14_compress_gzip (oeqa.selftest.wic.Wic)
Test compressing an image with xz ... ok
test15_wrong_compressor (oeqa.selftest.wic.Wic)
Test how wic breaks if wrong compressor is provided ... ok
test16_rootfs_indirect_recipes (oeqa.selftest.wic.Wic)
Test usage of rootfs plugin with &apos;rootfsN=&lt;recipe&gt;&apos; syntax ... ok

----------------------------------------------------------------------
Ran 16 tests in 90.257s

OK
2015-06-26 16:07:39,979 - selftest - INFO - Finished
2015-06-26 16:07:39,979 - selftest - INFO - Removing the include from local.conf

I&apos;m going to close this bug and I&apos;ll continue to add new test cases for new and old functionality.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51985</commentid>
    <comment_count>8</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2015-06-29 08:24:48 +0000</bug_when>
    <thetext>15 test cases are in master now: http://cgit.openembedded.org/openembedded-core/commit/?id=0ffc5c38ef28605abf815a47eb41923802d31df7

2 more are waiting for review. I think it&apos;s enough to say that wic testing suite is created and put into production.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54079</commentid>
    <comment_count>9</comment_count>
    <who name="Daniel Istrate">daniel.alexandrux.istrate</who>
    <bug_when>2015-09-15 13:16:25 +0000</bug_when>
    <thetext>As of now in master: ea562de57590c966cd5a75fda8defecd397e6436 there are 23 test cases in meta/lib/oeqa/selftest/wic.py</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1866</attachid>
            <date>2014-03-29 18:52:13 +0000</date>
            <delta_ts>2014-03-29 18:52:13 +0000</delta_ts>
            <desc>.wks example with hardcoded rootfs dir</desc>
            <filename>directdisk-multi.wks</filename>
            <type>application/vnd.lotus-1-2-3</type>
            <size>646</size>
            <attacher name="Tom Zanussi">tom.zanussi</attacher>
            
              <data encoding="base64">IyBzaG9ydC1kZXNjcmlwdGlvbjogQ3JlYXRlIGEgJ3BjYmlvcycgZGlyZWN0IGRpc2sgaW1hZ2UK
IyBsb25nLWRlc2NyaXB0aW9uOiBDcmVhdGVzIGEgcGFydGl0aW9uZWQgbGVnYWN5IEJJT1MgZGlz
ayBpbWFnZSB0aGF0IHRoZSB1c2VyCiMgY2FuIGRpcmVjdGx5IGRkIHRvIGJvb3QgbWVkaWEuCgoK
cGFydCAvYm9vdCAtLXNvdXJjZSBib290aW1nLXBjYmlvcyAtLW9uZGlzayBzZGEgLS1mc3R5cGU9
bXNkb3MgLS1sYWJlbCBib290IC0tYWN0aXZlIC0tYWxpZ24gMTAyNApwYXJ0IC8gLS1zb3VyY2Ug
cm9vdGZzIC0tb25kaXNrIHNkYSAtLWZzdHlwZT1leHQzIC0tbGFiZWwgcGxhdGZvcm0gLS1hbGln
biAxMDI0CgpwYXJ0IC9zdGFuZGJ5IC0tc291cmNlIHJvb3RmcyAtLXJvb3Rmcy1kaXI9L2hvbWUv
dHJ6L3lvY3RvL21hc3Rlci1jdXIvYnVpbGQvdG1wL3dvcmsvY3Jvd25iYXktcG9reS1saW51eC9j
b3JlLWltYWdlLW1pbmltYWwvMS4wLXIwL3Jvb3Rmcy8gLS1vbmRpc2sgc2RhIC0tZnN0eXBlPWV4
dDMgLS1sYWJlbCBzZWNvbmRhcnkgLS1hbGlnbiAxMDI0Cgpib290bG9hZGVyICAtLXRpbWVvdXQ9
MCAgLS1hcHBlbmQ9InJvb3R3YWl0IHJvb3Rmc3R5cGU9ZXh0MyB2aWRlbz12ZXNhZmIgdmdhPTB4
MzE4IGNvbnNvbGU9dHR5MCIKCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1867</attachid>
            <date>2014-03-29 18:53:49 +0000</date>
            <delta_ts>2014-03-29 18:53:49 +0000</delta_ts>
            <desc>.wks example with both partitions using indirect strings</desc>
            <filename>directdisk-multi-indirect-both.wks</filename>
            <type>application/vnd.lotus-1-2-3</type>
            <size>583</size>
            <attacher name="Tom Zanussi">tom.zanussi</attacher>
            
              <data encoding="base64">IyBzaG9ydC1kZXNjcmlwdGlvbjogQ3JlYXRlIGEgJ3BjYmlvcycgZGlyZWN0IGRpc2sgaW1hZ2UK
IyBsb25nLWRlc2NyaXB0aW9uOiBDcmVhdGVzIGEgcGFydGl0aW9uZWQgbGVnYWN5IEJJT1MgZGlz
ayBpbWFnZSB0aGF0IHRoZSB1c2VyCiMgY2FuIGRpcmVjdGx5IGRkIHRvIGJvb3QgbWVkaWEuCgoK
cGFydCAvYm9vdCAtLXNvdXJjZSBib290aW1nLXBjYmlvcyAtLW9uZGlzayBzZGEgLS1mc3R5cGU9
bXNkb3MgLS1sYWJlbCBib290IC0tYWN0aXZlIC0tYWxpZ24gMTAyNApwYXJ0IC8gLS1zb3VyY2Ug
cm9vdGZzIC0tcm9vdGZzLWRpcj0icm9vdGZzMSIgLS1vbmRpc2sgc2RhIC0tZnN0eXBlPWV4dDMg
LS1sYWJlbCBwbGF0Zm9ybSAtLWFsaWduIDEwMjQKCnBhcnQgL3N0YW5kYnkgLS1zb3VyY2Ugcm9v
dGZzIC0tcm9vdGZzLWRpcj0icm9vdGZzMiIgLS1vbmRpc2sgc2RhIC0tZnN0eXBlPWV4dDMgLS1s
YWJlbCBzZWNvbmRhcnkgLS1hbGlnbiAxMDI0Cgpib290bG9hZGVyICAtLXRpbWVvdXQ9MCAgLS1h
cHBlbmQ9InJvb3R3YWl0IHJvb3Rmc3R5cGU9ZXh0MyB2aWRlbz12ZXNhZmIgdmdhPTB4MzE4IGNv
bnNvbGU9dHR5MCIKCg==
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1868</attachid>
            <date>2014-03-29 18:54:14 +0000</date>
            <delta_ts>2014-03-29 18:54:14 +0000</delta_ts>
            <desc>.wks example with one partition using indirect strings</desc>
            <filename>directdisk-multi-indirect-second.wks</filename>
            <type>application/vnd.lotus-1-2-3</type>
            <size>559</size>
            <attacher name="Tom Zanussi">tom.zanussi</attacher>
            
              <data encoding="base64">IyBzaG9ydC1kZXNjcmlwdGlvbjogQ3JlYXRlIGEgJ3BjYmlvcycgZGlyZWN0IGRpc2sgaW1hZ2UK
IyBsb25nLWRlc2NyaXB0aW9uOiBDcmVhdGVzIGEgcGFydGl0aW9uZWQgbGVnYWN5IEJJT1MgZGlz
ayBpbWFnZSB0aGF0IHRoZSB1c2VyCiMgY2FuIGRpcmVjdGx5IGRkIHRvIGJvb3QgbWVkaWEuCgpw
YXJ0IC9ib290IC0tc291cmNlIGJvb3RpbWctcGNiaW9zIC0tb25kaXNrIHNkYSAtLWZzdHlwZT1t
c2RvcyAtLWxhYmVsIGJvb3QgLS1hY3RpdmUgLS1hbGlnbiAxMDI0CnBhcnQgLyAtLXNvdXJjZSBy
b290ZnMgLS1vbmRpc2sgc2RhIC0tZnN0eXBlPWV4dDMgLS1sYWJlbCBwbGF0Zm9ybSAtLWFsaWdu
IDEwMjQKCnBhcnQgL3N0YW5kYnkgLS1zb3VyY2Ugcm9vdGZzIC0tcm9vdGZzLWRpcj0icm9vdGZz
MiIgLS1vbmRpc2sgc2RhIC0tZnN0eXBlPWV4dDMgLS1sYWJlbCBzZWNvbmRhcnkgLS1hbGlnbiAx
MDI0Cgpib290bG9hZGVyICAtLXRpbWVvdXQ9MCAgLS1hcHBlbmQ9InJvb3R3YWl0IHJvb3Rmc3R5
cGU9ZXh0MyB2aWRlbz12ZXNhZmIgdmdhPTB4MzE4IGNvbnNvbGU9dHR5MCIKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>