* [PATCH 0/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
@ 2017-06-16 17:01 Humberto Ibarra
2017-06-16 17:01 ` [PATCH 1/1] " Humberto Ibarra
0 siblings, 1 reply; 6+ messages in thread
From: Humberto Ibarra @ 2017-06-16 17:01 UTC (permalink / raw)
To: openembedded-core
Patch to add a testcase for IMAGE_GEN_DEBUGFS variable. Checks if debug filesystem
and packages were created.
The following changes since commit 9ea5a31776440abd6468f003c5e1905f079446d3:
ovmf: fix secureboot PACKAGECONFIG + OpenSSL update (2017-06-16 10:58:23 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib humberto/ImageGenDebugfs
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=humberto/ImageGenDebugfs
Humberto Ibarra (1):
imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
meta/lib/oeqa/selftest/cases/imagefeatures.py | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
--
2.7.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
2017-06-16 17:01 [PATCH 0/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS Humberto Ibarra
@ 2017-06-16 17:01 ` Humberto Ibarra
2017-06-16 17:07 ` Burton, Ross
0 siblings, 1 reply; 6+ messages in thread
From: Humberto Ibarra @ 2017-06-16 17:01 UTC (permalink / raw)
To: openembedded-core
Add new testcase to check varibale IMAGE_GEN_DEBUGFS. Test makes
sure that debug filesystem and packages are created accordingly.
[YOCTO #10906]
Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 33 +++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 45a06fe..8bf084e 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -3,6 +3,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
from oeqa.core.decorator.oeid import OETestID
from oeqa.utils.sshcontrol import SSHControl
import os
+import glob
class ImageFeatures(OESelftestTestCase):
@@ -123,3 +124,35 @@ class ImageFeatures(OESelftestTestCase):
# check if result image is sparse
image_stat = os.stat(image_path)
self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
+
+ def test_image_gen_debugfs(self):
+ """
+ Summary: Check debugfs generation
+ Expected: 1. core-image-minimal can be build with IMAGE_GEN_DEBUGFS variable set
+ 2. debug filesystem is created when variable set
+ 3. debug packages created, either rpm, deb or ipk
+ Product: oe-core
+ Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
+ """
+
+ image_name = 'core-image-minimal'
+ clean_cmd = '-c clean %s' % image_name
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+
+ for pack_class in [ "rpm", "deb", "ipk"]:
+ bitbake(clean_cmd)
+ features = 'IMAGE_GEN_DEBUGFS = "1"\n'
+ features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
+ features += 'PACKAGE_CLASSES = "package_%s"' % pack_class
+ self.write_config(features)
+
+ bitbake(image_name)
+ debug_files = glob.glob(os.path.join(deploy_dir_image,"*-dbg.rootfs.tar.bz2"))
+ self.assertNotEqual(len(debug_files), 0,
+ 'debug filesystem not generated for %s' % pack_class)
+
+ deploy_packages_var = 'DEPLOY_DIR_%s' % pack_class.upper()
+ debug_pack_files = glob.glob(os.path.join(get_bb_var(deploy_packages_var),
+ get_bb_var("MACHINE").replace("-","_"), "*-dbg*"))
+ self.assertNotEqual(len(debug_pack_files), 0,
+ 'debug packages not generated for %s' % pack_class)
--
2.7.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
2017-06-16 17:01 ` [PATCH 1/1] " Humberto Ibarra
@ 2017-06-16 17:07 ` Burton, Ross
2017-06-16 17:37 ` Ibarra Lopez, Humberto
0 siblings, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2017-06-16 17:07 UTC (permalink / raw)
To: Humberto Ibarra; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
On 16 June 2017 at 18:01, Humberto Ibarra <humberto.ibarra.lopez@intel.com>
wrote:
> + image_name = 'core-image-minimal'
> + clean_cmd = '-c clean %s' % image_name
> + deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
> +
> + for pack_class in [ "rpm", "deb", "ipk"]:
> + bitbake(clean_cmd)
> + features = 'IMAGE_GEN_DEBUGFS = "1"\n'
> + features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
> + features += 'PACKAGE_CLASSES = "package_%s"' % pack_class
> + self.write_config(features)
> +
> + bitbake(image_name)
> + debug_files = glob.glob(os.path.join(deploy_
> dir_image,"*-dbg.rootfs.tar.bz2"))
> + self.assertNotEqual(len(debug_files), 0,
> + 'debug filesystem not generated for %s' % pack_class)
> +
> + deploy_packages_var = 'DEPLOY_DIR_%s' % pack_class.upper()
> + debug_pack_files = glob.glob(os.path.join(get_bb_
> var(deploy_packages_var),
> + get_bb_var("MACHINE").replace("-","_"), "*-dbg*"))
> + self.assertNotEqual(len(debug_pack_files), 0,
> + 'debug packages not generated for %s' % pack_class)
>
Each call to get_bb_var() is a call to bitbake, so it's best to batch up
these as much as possible into a single get_bb_vars() call.
Also is there any point to checking that dbg packages were created?
Ross
[-- Attachment #2: Type: text/html, Size: 2295 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
2017-06-16 17:07 ` Burton, Ross
@ 2017-06-16 17:37 ` Ibarra Lopez, Humberto
2017-06-27 11:20 ` Burton, Ross
0 siblings, 1 reply; 6+ messages in thread
From: Ibarra Lopez, Humberto @ 2017-06-16 17:37 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2054 bytes --]
Thought about testing debug packages because the bug comments mentioned iterating through rpm, deb and ipk. If there is no value to this part I could drop it and only test for the debug filesystem. In this cases there any value to check the debug filesystem in all three package classes?
Humberto
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Friday, June 16, 2017 12:07 PM
To: Ibarra Lopez, Humberto <humberto.ibarra.lopez@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
On 16 June 2017 at 18:01, Humberto Ibarra <humberto.ibarra.lopez@intel.com<mailto:humberto.ibarra.lopez@intel.com>> wrote:
+ image_name = 'core-image-minimal'
+ clean_cmd = '-c clean %s' % image_name
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+
+ for pack_class in [ "rpm", "deb", "ipk"]:
+ bitbake(clean_cmd)
+ features = 'IMAGE_GEN_DEBUGFS = "1"\n'
+ features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"\n'
+ features += 'PACKAGE_CLASSES = "package_%s"' % pack_class
+ self.write_config(features)
+
+ bitbake(image_name)
+ debug_files = glob.glob(os.path.join(deploy_dir_image,"*-dbg.rootfs.tar.bz2"))
+ self.assertNotEqual(len(debug_files), 0,
+ 'debug filesystem not generated for %s' % pack_class)
+
+ deploy_packages_var = 'DEPLOY_DIR_%s' % pack_class.upper()
+ debug_pack_files = glob.glob(os.path.join(get_bb_var(deploy_packages_var),
+ get_bb_var("MACHINE").replace("-","_"), "*-dbg*"))
+ self.assertNotEqual(len(debug_pack_files), 0,
+ 'debug packages not generated for %s' % pack_class)
Each call to get_bb_var() is a call to bitbake, so it's best to batch up these as much as possible into a single get_bb_vars() call.
Also is there any point to checking that dbg packages were created?
Ross
[-- Attachment #2: Type: text/html, Size: 5957 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
2017-06-16 17:37 ` Ibarra Lopez, Humberto
@ 2017-06-27 11:20 ` Burton, Ross
0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2017-06-27 11:20 UTC (permalink / raw)
To: Ibarra Lopez, Humberto; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
On 16 June 2017 at 18:37, Ibarra Lopez, Humberto <
humberto.ibarra.lopez@intel.com> wrote:
> Thought about testing debug packages because the bug comments mentioned
> iterating through rpm, deb and ipk. If there is no value to this part I
> could drop it and only test for the debug filesystem. In this cases there
> any value to check the debug filesystem in all three package classes?
>
>
The debugfs generation involves using the package manager, but we exercise
those codepaths already so I'd be happy with just one package manager being
used for speed.
Ross
[-- Attachment #2: Type: text/html, Size: 1120 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS
2017-06-29 20:42 [PATCH v3 0/1] " Humberto Ibarra
@ 2017-06-29 20:42 ` Humberto Ibarra
0 siblings, 0 replies; 6+ messages in thread
From: Humberto Ibarra @ 2017-06-29 20:42 UTC (permalink / raw)
To: openembedded-core
Add new testcase to check varibale IMAGE_GEN_DEBUGFS. Test makes
sure that debug filesystem is created accordingly.
[YOCTO #10906]
Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index e6652ec..8233957 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -3,6 +3,7 @@ from oeqa.utils.commands import runCmd, bitbake, get_bb_var, runqemu
from oeqa.core.decorator.oeid import OETestID
from oeqa.utils.sshcontrol import SSHControl
import os
+import glob
class ImageFeatures(OESelftestTestCase):
@@ -124,3 +125,23 @@ class ImageFeatures(OESelftestTestCase):
# check if result image is sparse
image_stat = os.stat(image_path)
self.assertTrue(image_stat.st_size > image_stat.st_blocks * 512)
+
+ def test_image_gen_debugfs(self):
+ """
+ Summary: Check debugfs generation
+ Expected: 1. core-image-minimal can be build with IMAGE_GEN_DEBUGFS variable set
+ 2. debug filesystem is created when variable set
+ Product: oe-core
+ Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
+ """
+
+ image_name = 'core-image-minimal'
+ deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
+
+ features = 'IMAGE_GEN_DEBUGFS = "1"\n'
+ features += 'IMAGE_FSTYPES_DEBUGFS = "tar.bz2"'
+ self.write_config(features)
+
+ bitbake(image_name)
+ debug_files = glob.glob(os.path.join(deploy_dir_image,"*-dbg.rootfs.tar.bz2"))
+ self.assertNotEqual(len(debug_files), 0, 'debug filesystem not generated')
--
2.7.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-06-29 20:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 17:01 [PATCH 0/1] imagefeatures.py: Added testcase to track IMAGE_GEN_DEBUGFS Humberto Ibarra
2017-06-16 17:01 ` [PATCH 1/1] " Humberto Ibarra
2017-06-16 17:07 ` Burton, Ross
2017-06-16 17:37 ` Ibarra Lopez, Humberto
2017-06-27 11:20 ` Burton, Ross
2017-06-29 20:42 [PATCH v3 0/1] " Humberto Ibarra
2017-06-29 20:42 ` [PATCH 1/1] " Humberto Ibarra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.