* [PATCH] oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes
@ 2023-03-20 13:48 romuald.jeanne
2023-03-24 10:14 ` [OE-core] " Alexandre Belloni
0 siblings, 1 reply; 3+ messages in thread
From: romuald.jeanne @ 2023-03-20 13:48 UTC (permalink / raw)
To: openembedded-core; +Cc: Romuald Jeanne
From: Romuald Jeanne <romuald.jeanne@st.com>
Allow 'multiubi' fstype image.
Set 'MULTIUBI_BUILD' with two entries to allow configuration for two
different '.ubifs'.
Configure 'MKUBIFS_ARGS_*' and 'UBINIZE_ARGS_*' for both configurations.
Signed-off-by: Romuald Jeanne <romuald.jeanne@st.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 27 +++++++++++++++----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index bdd4d3200e2..cc374663e1a 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -203,7 +203,7 @@ class ImageFeatures(OESelftestTestCase):
image_name = 'core-image-minimal'
all_image_types = set(get_bb_var("IMAGE_TYPES", image_name).split())
- skip_image_types = set(('container', 'elf', 'f2fs', 'multiubi', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
+ skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
img_types = all_image_types - skip_image_types
config = """
@@ -211,6 +211,12 @@ IMAGE_FSTYPES += "%s"
WKS_FILE = "wictestdisk.wks"
MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"
UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"
+MULTIUBI_BUILD += "mtd_2_128"
+MKUBIFS_ARGS_mtd_2_128 ?= "-m 2048 -e 129024 -c 2047"
+UBINIZE_ARGS_mtd_2_128 ?= "-m 2048 -p 128KiB -s 512"
+MULTIUBI_BUILD += "mtd_4_256"
+MKUBIFS_ARGS_mtd_4_256 ?= "-m 4096 -e 253952 -c 4096"
+UBINIZE_ARGS_mtd_4_256 ?= "-m 4096 -p 256KiB"
""" % ' '.join(img_types)
self.write_config(config)
@@ -219,10 +225,21 @@ UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"
deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
for itype in img_types:
- image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
- # check if result image is in deploy directory
- self.assertTrue(os.path.exists(image_path),
- "%s image %s doesn't exist" % (itype, image_path))
+ if itype == 'multiubi':
+ # For multiubi build we need to manage MULTIUBI_BUILD entry to append
+ # specific name to IMAGE_LINK_NAME
+ multiubi_build = get_bb_var('MULTIUBI_BUILD', image_name).split()
+ for vname in multiubi_build:
+ image_path = os.path.join(deploy_dir_image, "%s_%s.ubifs" % (link_name, vname))
+ # check if result image is in deploy directory
+ self.assertTrue(os.path.exists(image_path),
+ "%s image %s doesn't exist" % (itype, image_path))
+ else:
+ image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
+ # check if result image is in deploy directory
+ self.assertTrue(os.path.exists(image_path),
+ "%s image %s doesn't exist" % (itype, image_path))
+
def test_useradd_static(self):
config = """
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes
2023-03-20 13:48 [PATCH] oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes romuald.jeanne
@ 2023-03-24 10:14 ` Alexandre Belloni
0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Belloni @ 2023-03-24 10:14 UTC (permalink / raw)
To: romuald.jeanne; +Cc: openembedded-core
Hello Romuald,
This doesn't apply cleanly on master anymore, can you rebase?
On 20/03/2023 14:48:18+0100, Romuald Jeanne via lists.openembedded.org wrote:
> From: Romuald Jeanne <romuald.jeanne@st.com>
>
> Allow 'multiubi' fstype image.
> Set 'MULTIUBI_BUILD' with two entries to allow configuration for two
> different '.ubifs'.
> Configure 'MKUBIFS_ARGS_*' and 'UBINIZE_ARGS_*' for both configurations.
>
> Signed-off-by: Romuald Jeanne <romuald.jeanne@st.com>
> ---
> meta/lib/oeqa/selftest/cases/imagefeatures.py | 27 +++++++++++++++----
> 1 file changed, 22 insertions(+), 5 deletions(-)
>
> diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
> index bdd4d3200e2..cc374663e1a 100644
> --- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
> +++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
> @@ -203,7 +203,7 @@ class ImageFeatures(OESelftestTestCase):
> image_name = 'core-image-minimal'
>
> all_image_types = set(get_bb_var("IMAGE_TYPES", image_name).split())
> - skip_image_types = set(('container', 'elf', 'f2fs', 'multiubi', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
> + skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
> img_types = all_image_types - skip_image_types
>
> config = """
> @@ -211,6 +211,12 @@ IMAGE_FSTYPES += "%s"
> WKS_FILE = "wictestdisk.wks"
> MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"
> UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"
> +MULTIUBI_BUILD += "mtd_2_128"
> +MKUBIFS_ARGS_mtd_2_128 ?= "-m 2048 -e 129024 -c 2047"
> +UBINIZE_ARGS_mtd_2_128 ?= "-m 2048 -p 128KiB -s 512"
> +MULTIUBI_BUILD += "mtd_4_256"
> +MKUBIFS_ARGS_mtd_4_256 ?= "-m 4096 -e 253952 -c 4096"
> +UBINIZE_ARGS_mtd_4_256 ?= "-m 4096 -p 256KiB"
> """ % ' '.join(img_types)
> self.write_config(config)
>
> @@ -219,10 +225,21 @@ UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"
> deploy_dir_image = get_bb_var('DEPLOY_DIR_IMAGE')
> link_name = get_bb_var('IMAGE_LINK_NAME', image_name)
> for itype in img_types:
> - image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
> - # check if result image is in deploy directory
> - self.assertTrue(os.path.exists(image_path),
> - "%s image %s doesn't exist" % (itype, image_path))
> + if itype == 'multiubi':
> + # For multiubi build we need to manage MULTIUBI_BUILD entry to append
> + # specific name to IMAGE_LINK_NAME
> + multiubi_build = get_bb_var('MULTIUBI_BUILD', image_name).split()
> + for vname in multiubi_build:
> + image_path = os.path.join(deploy_dir_image, "%s_%s.ubifs" % (link_name, vname))
> + # check if result image is in deploy directory
> + self.assertTrue(os.path.exists(image_path),
> + "%s image %s doesn't exist" % (itype, image_path))
> + else:
> + image_path = os.path.join(deploy_dir_image, "%s.%s" % (link_name, itype))
> + # check if result image is in deploy directory
> + self.assertTrue(os.path.exists(image_path),
> + "%s image %s doesn't exist" % (itype, image_path))
> +
>
> def test_useradd_static(self):
> config = """
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#178830): https://lists.openembedded.org/g/openembedded-core/message/178830
> Mute This Topic: https://lists.openembedded.org/mt/97731135/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes
@ 2023-03-27 14:38 romuald.jeanne
0 siblings, 0 replies; 3+ messages in thread
From: romuald.jeanne @ 2023-03-27 14:38 UTC (permalink / raw)
To: openembedded-core; +Cc: Romuald Jeanne
From: Romuald Jeanne <romuald.jeanne@st.com>
Allow 'multiubi' fstype image.
Set 'MULTIUBI_BUILD' with two entries to allow configuration for two
different '.ubifs'.
Configure 'MKUBIFS_ARGS_*' and 'UBINIZE_ARGS_*' for both configurations.
Signed-off-by: Romuald Jeanne <romuald.jeanne@st.com>
---
meta/lib/oeqa/selftest/cases/imagefeatures.py | 25 +++++++++++++++----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/meta/lib/oeqa/selftest/cases/imagefeatures.py b/meta/lib/oeqa/selftest/cases/imagefeatures.py
index 3dc750594c7..d31b43d9cc1 100644
--- a/meta/lib/oeqa/selftest/cases/imagefeatures.py
+++ b/meta/lib/oeqa/selftest/cases/imagefeatures.py
@@ -199,7 +199,7 @@ class ImageFeatures(OESelftestTestCase):
image = 'core-image-minimal'
all_image_types = set(get_bb_var("IMAGE_TYPES", image).split())
- skip_image_types = set(('container', 'elf', 'f2fs', 'multiubi', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
+ skip_image_types = set(('container', 'elf', 'f2fs', 'tar.zst', 'wic.zst', 'squashfs-lzo'))
img_types = all_image_types - skip_image_types
config = """
@@ -207,16 +207,31 @@ IMAGE_FSTYPES += "%s"
WKS_FILE = "wictestdisk.wks"
MKUBIFS_ARGS ?= "-m 2048 -e 129024 -c 2047"
UBINIZE_ARGS ?= "-m 2048 -p 128KiB -s 512"
+MULTIUBI_BUILD += "mtd_2_128"
+MKUBIFS_ARGS_mtd_2_128 ?= "-m 2048 -e 129024 -c 2047"
+UBINIZE_ARGS_mtd_2_128 ?= "-m 2048 -p 128KiB -s 512"
+MULTIUBI_BUILD += "mtd_4_256"
+MKUBIFS_ARGS_mtd_4_256 ?= "-m 4096 -e 253952 -c 4096"
+UBINIZE_ARGS_mtd_4_256 ?= "-m 4096 -p 256KiB"
""" % ' '.join(img_types)
self.write_config(config)
bitbake(image)
- bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'], image)
+ bb_vars = get_bb_vars(['DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME', 'MULTIUBI_BUILD'], image)
for itype in img_types:
- image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.%s" % (bb_vars['IMAGE_LINK_NAME'], itype))
- # check if result image is in deploy directory
- self.assertTrue(os.path.exists(image_path),
+ if itype == 'multiubi':
+ # For multiubi build we need to manage MULTIUBI_BUILD entry to append
+ # specific name to IMAGE_LINK_NAME
+ for vname in bb_vars['MULTIUBI_BUILD'].split():
+ image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s_%s.ubifs" % (bb_vars['IMAGE_LINK_NAME'], vname))
+ # check if result image is in deploy directory
+ self.assertTrue(os.path.exists(image_path),
+ "%s image %s doesn't exist" % (itype, image_path))
+ else:
+ image_path = os.path.join(bb_vars['DEPLOY_DIR_IMAGE'], "%s.%s" % (bb_vars['IMAGE_LINK_NAME'], itype))
+ # check if result image is in deploy directory
+ self.assertTrue(os.path.exists(image_path),
"%s image %s doesn't exist" % (itype, image_path))
def test_useradd_static(self):
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-27 14:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-20 13:48 [PATCH] oeqa/selftest/imagefeatures: set a test for mutliubi in test_image_fstypes romuald.jeanne
2023-03-24 10:14 ` [OE-core] " Alexandre Belloni
2023-03-27 14:38 romuald.jeanne
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.