Openembedded Core Discussions
 help / color / mirror / Atom feed
* ✗ patchtest: failure for runqemu: support non-bootable wic images
  2019-06-07 21:47 [meta-oe][PATCH v2 0/4] " Adrian Freihofer
@ 2019-06-08  4:10 ` Patchwork
  0 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-06-08  4:10 UTC (permalink / raw)
  To: Adrian Freihofer; +Cc: openembedded-core

== Series Details ==

Series: runqemu: support non-bootable wic images
Revision: 1
URL   : https://patchwork.openembedded.org/series/18046/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [meta-oe,v2,1/4] qemurunner: fix undefined variable
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✗ patchtest: failure for runqemu: support non-bootable wic images
  2019-06-08  7:59 [meta-oe][PATCH v3 0/4] " Adrian Freihofer
@ 2019-06-08  8:30 ` Patchwork
  0 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-06-08  8:30 UTC (permalink / raw)
  To: Adrian Freihofer; +Cc: openembedded-core

== Series Details ==

Series: runqemu: support non-bootable wic images
Revision: 1
URL   : https://patchwork.openembedded.org/series/18051/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [meta-oe,v3,1/4] qemurunner: fix undefined variable
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images
@ 2019-06-09 12:03 Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 1/3] qemurunner: fix undefined variable Adrian Freihofer
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Adrian Freihofer @ 2019-06-09 12:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Adrian Freihofer

Compared to V3 this is a new implementation, as suggested by Richard.
Thanks for the hint, it makes perfect sense.

Adrian Freihofer (3):
  qemurunner: fix undefined variable
  testimage: consider QB_DEFAULT_FSTYPE
  runqemu: QB_FSINFO to support fstype wic images

 meta/classes/testimage.bbclass    |  6 ++++-
 meta/lib/oeqa/utils/qemurunner.py |  1 +
 scripts/runqemu                   | 49 +++++++++++++++++++++++++++++++++++----
 3 files changed, 50 insertions(+), 6 deletions(-)

-- 
2.11.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [meta-oe][PATCH v4 1/3] qemurunner: fix undefined variable
  2019-06-09 12:03 [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images Adrian Freihofer
@ 2019-06-09 12:03 ` Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 2/3] testimage: consider QB_DEFAULT_FSTYPE Adrian Freihofer
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Adrian Freihofer @ 2019-06-09 12:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Adrian Freihofer

While hacking on this I got an Exception. It's better to define
variables also in python.

Signe:-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/lib/oeqa/utils/qemurunner.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 6d2860c106..c16227fc38 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -60,6 +60,7 @@ class QemuRunner:
         self.runqemutime = 120
         self.qemu_pidfile = 'pidfile_'+str(os.getpid())
         self.host_dumper = HostDumper(dump_host_cmds, dump_dir)
+        self.monitorpipe = None
 
         self.logger = logger
 
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-oe][PATCH v4 2/3] testimage: consider QB_DEFAULT_FSTYPE
  2019-06-09 12:03 [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 1/3] qemurunner: fix undefined variable Adrian Freihofer
@ 2019-06-09 12:03 ` Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 3/3] runqemu: QB_FSINFO to support fstype wic images Adrian Freihofer
  2019-06-09 13:00 ` ✗ patchtest: failure for runqemu: support non-bootable " Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Adrian Freihofer @ 2019-06-09 12:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Adrian Freihofer

testimage.bbclass starts qemu with the first image type found in
the IMAGE_FSTYPES list. It's weird: this ['wic', 'tar'] works but
this ['tar'. 'wic'] does not. If QB_DEFAULT_FSTYPE is defined,
this fstype is booted.

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 meta/classes/testimage.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 9bb5a5cb0b..525c5a6173 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -210,7 +210,11 @@ def testimage_main(d):
             bb.fatal('Unsupported image type built. Add a comptible image to '
                      'IMAGE_FSTYPES. Supported types: %s' %
                      ', '.join(supported_fstypes))
-    rootfs = '%s.%s' % (image_name, fstypes[0])
+    qfstype = fstypes[0]
+    qdeffstype = d.getVar("QB_DEFAULT_FSTYPE")
+    if qdeffstype:
+        qfstype = qdeffstype
+    rootfs = '%s.%s' % (image_name, qfstype)
 
     # Get tmpdir (not really used, just for compatibility)
     tmpdir = d.getVar("TMPDIR")
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [meta-oe][PATCH v4 3/3] runqemu: QB_FSINFO to support fstype wic images
  2019-06-09 12:03 [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 1/3] qemurunner: fix undefined variable Adrian Freihofer
  2019-06-09 12:03 ` [meta-oe][PATCH v4 2/3] testimage: consider QB_DEFAULT_FSTYPE Adrian Freihofer
@ 2019-06-09 12:03 ` Adrian Freihofer
  2019-06-09 13:00 ` ✗ patchtest: failure for runqemu: support non-bootable " Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Adrian Freihofer @ 2019-06-09 12:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Adrian Freihofer

wic images are handled as vmtype images. Starting qemu with "-kernel"
parameter and an image of type wic is not supported. Especially for
"-machine virt" the combination of wic with -kernel parameter would
be beneficial.

The new parameter QB_FSINFO allows to pass image type specific flags to
runqemu. QB_FSINFO is a space separated list of parameters. Parameters are
structured according to the following pattern: image-type:flag.

For now two parameters are supported:
- wic:no-kernel-in-fs
  The wic image is treated as rootfs only image. A -kernel option is
  passed to qemu.
- wic:kernel-in-fs
  The wic image is treated as VM image including a bootloader and a
  kernel. This is still the default behavior.

Example:
QB_DEFAULT_FSTYPE = "wic"
QB_FSINFO = "wic:no-kernel-in-fs"
QB_KERNEL_ROOT = "/dev/vda1"
QB_SYSTEM_NAME = "qemu-system-aarch64"
QB_MACHINE = "-machine virt"
...

[YOCTO #13336]

Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
---
 scripts/runqemu | 49 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index af90c010da..4079f2b17d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -185,10 +185,11 @@ class BaseConfig(object):
         self.lock_descriptor = None
         self.bitbake_e = ''
         self.snapshot = False
+        self.wictypes = ('wic', 'wic.vmdk', 'wic.qcow2', 'wic.vdi')
         self.fstypes = ('ext2', 'ext3', 'ext4', 'jffs2', 'nfs', 'btrfs',
                         'cpio.gz', 'cpio', 'ramfs', 'tar.bz2', 'tar.gz')
-        self.vmtypes = ('hddimg', 'hdddirect', 'wic', 'wic.vmdk',
-                        'wic.qcow2', 'wic.vdi', 'iso')
+        self.vmtypes = ('hddimg', 'hdddirect', 'iso')
+        self.fsinfo = {}
         self.network_device = "-device e1000,netdev=net0,mac=@MAC@"
         # Use different mac section for tap and slirp to avoid
         # conflicts, e.g., when one is running with tap, the other is
@@ -253,7 +254,7 @@ class BaseConfig(object):
 
     def check_arg_fstype(self, fst):
         """Check and set FSTYPE"""
-        if fst not in self.fstypes + self.vmtypes:
+        if fst not in self.fstypes + self.vmtypes + self.wictypes:
             logger.warning("Maybe unsupported FSTYPE: %s" % fst)
         if not self.fstype or self.fstype == fst:
             if fst == 'ramfs':
@@ -390,7 +391,7 @@ class BaseConfig(object):
 
         unknown_arg = ""
         for arg in sys.argv[1:]:
-            if arg in self.fstypes + self.vmtypes:
+            if arg in self.fstypes + self.vmtypes + self.wictypes:
                 self.check_arg_fstype(arg)
             elif arg == 'nographic':
                 self.qemu_opt_script += ' -nographic'
@@ -536,6 +537,40 @@ class BaseConfig(object):
             else:
                 raise RunQemuError("FSTYPE is NULL!")
 
+        # parse QB_FSINFO into dict, e.g. { 'wic': ['no-kernel-in-fs', 'a-flag'], 'ext4': ['another-flag']}
+        wic_fs = False
+        qb_fsinfo = self.get('QB_FSINFO')
+        if qb_fsinfo:
+            qb_fsinfo = qb_fsinfo.split()
+            for fsinfo in qb_fsinfo:
+                try:
+                    fstype, fsflag = fsinfo.split(':')
+
+                    if fstype == 'wic':
+                        if fsflag == 'no-kernel-in-fs':
+                            wic_fs = True
+                        elif fsflag == 'kernel-in-fs':
+                            wic_fs = False
+                        else:
+                            logger.warn('Unknown flag "%s:%s" in QB_FSINFO', fstype, fsflag)
+                            continue
+                    else:
+                        logger.warn('QB_FSINFO is not supported for image type "%s"', fstype)
+                        continue
+
+                    if fstype in self.fsinfo:
+                        self.fsinfo[fstype].append(fsflag)
+                    else:
+                        self.fsinfo[fstype] = [fsflag]
+                except Exception:
+                    logger.error('Invalid parameter "%s" in QB_FSINFO', fsinfo)
+
+        # treat wic images as vmimages (with kernel) or as fsimages (rootfs only)
+        if wic_fs:
+            self.fstypes = self.fstypes + self.wictypes
+        else:
+            self.vmtypes = self.vmtypes + self.wictypes
+
     def check_rootfs(self):
         """Check and set rootfs"""
 
@@ -832,7 +867,11 @@ class BaseConfig(object):
             if self.dtb:
                 print('DTB: [%s]' % self.dtb)
         print('MACHINE: [%s]' % self.get('MACHINE'))
-        print('FSTYPE: [%s]' % self.fstype)
+        try:
+            fstype_flags = ' (' + ', '.join(self.fsinfo[self.fstype]) + ')'
+        except KeyError:
+            fstype_flags = ''
+        print('FSTYPE: [%s%s]' % (self.fstype, fstype_flags))
         if self.fstype  == 'nfs':
             print('NFS_DIR: [%s]' % self.rootfs)
         else:
-- 
2.11.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* ✗ patchtest: failure for runqemu: support non-bootable wic images
  2019-06-09 12:03 [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images Adrian Freihofer
                   ` (2 preceding siblings ...)
  2019-06-09 12:03 ` [meta-oe][PATCH v4 3/3] runqemu: QB_FSINFO to support fstype wic images Adrian Freihofer
@ 2019-06-09 13:00 ` Patchwork
  3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2019-06-09 13:00 UTC (permalink / raw)
  To: Adrian Freihofer; +Cc: openembedded-core

== Series Details ==

Series: runqemu: support non-bootable wic images
Revision: 1
URL   : https://patchwork.openembedded.org/series/18057/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Patch            [meta-oe,v4,1/3] qemurunner: fix undefined variable
 Issue             Series sent to the wrong mailing list [test_target_mailing_list] 
  Suggested fix    Check the project's README (meta-oe,v4,1/3) and send the patch to the indicated list

* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at 00fa839136)

* Patch            [meta-oe,v4,1/3] qemurunner: fix undefined variable
 Issue             Patch is missing Signed-off-by [test_signed_off_by_presence] 
  Suggested fix    Sign off the patch (either manually or with "git commit --amend -s")



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-09 13:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-09 12:03 [meta-oe][PATCH v4 0/3] runqemu: support non-bootable wic images Adrian Freihofer
2019-06-09 12:03 ` [meta-oe][PATCH v4 1/3] qemurunner: fix undefined variable Adrian Freihofer
2019-06-09 12:03 ` [meta-oe][PATCH v4 2/3] testimage: consider QB_DEFAULT_FSTYPE Adrian Freihofer
2019-06-09 12:03 ` [meta-oe][PATCH v4 3/3] runqemu: QB_FSINFO to support fstype wic images Adrian Freihofer
2019-06-09 13:00 ` ✗ patchtest: failure for runqemu: support non-bootable " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-06-08  7:59 [meta-oe][PATCH v3 0/4] " Adrian Freihofer
2019-06-08  8:30 ` ✗ patchtest: failure for " Patchwork
2019-06-07 21:47 [meta-oe][PATCH v2 0/4] " Adrian Freihofer
2019-06-08  4:10 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox