* [PATCH] runqemu: match .rootfs. in image names instead of -image- @ 2024-01-03 10:16 Mikko Rapeli 2024-01-03 14:54 ` [OE-core] " Martin Jansa 0 siblings, 1 reply; 6+ messages in thread From: Mikko Rapeli @ 2024-01-03 10:16 UTC (permalink / raw) To: openembedded-core; +Cc: Mikko Rapeli Don't expect image file names to include "-image-" but expect them to have the ".rootfs." postfix which is the default. Enables running tests against image recipes which are not called "bla-image" but plain "bla". Currently they fail with do_testimage/runqemu error: runqemu - ERROR - Unknown path arg /home/builder/src/base/build/tmp_qemuarm64/deploy/images/qemuarm64/img-qemuarm64.rootfs.wic Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> --- scripts/runqemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/runqemu b/scripts/runqemu index 18aeb7f5f0..1575677c45 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -373,7 +373,7 @@ class BaseConfig(object): re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p - elif os.path.exists(p) and (not os.path.isdir(p)) and '-image-' in os.path.basename(p): + elif os.path.exists(p) and (not os.path.isdir(p)) and '.rootfs.' in os.path.basename(p): self.rootfs = p # Check filename against self.fstypes can handle <file>.cpio.gz, # otherwise, its type would be "gz", which is incorrect. -- 2.34.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] runqemu: match .rootfs. in image names instead of -image- 2024-01-03 10:16 [PATCH] runqemu: match .rootfs. in image names instead of -image- Mikko Rapeli @ 2024-01-03 14:54 ` Martin Jansa 2024-01-04 6:59 ` Mikko Rapeli [not found] ` <17A712B42F330FC5.10454@lists.openembedded.org> 0 siblings, 2 replies; 6+ messages in thread From: Martin Jansa @ 2024-01-03 14:54 UTC (permalink / raw) To: Mikko Rapeli; +Cc: openembedded-core [-- Attachment #1: Type: text/plain, Size: 649 bytes --] On Wed, Jan 3, 2024 at 11:16 AM Mikko Rapeli <mikko.rapeli@linaro.org> wrote: > Don't expect image file names to include "-image-" but > expect them to have the ".rootfs." postfix which is the > default. > It's the current default, but whole runqemu won't work when someone changes: meta/classes-recipe/image-artifact-names.bbclass:IMAGE_NAME_SUFFIX ??= ".rootfs" So you should probably read IMAGE_NAME_SUFFIX variable first, but the most likely change someone will have in local.conf would be to drop this suffix and set this to empty and then the check for empty string in basename won't be very useful as well. Regards, [-- Attachment #2: Type: text/html, Size: 1039 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] runqemu: match .rootfs. in image names instead of -image- 2024-01-03 14:54 ` [OE-core] " Martin Jansa @ 2024-01-04 6:59 ` Mikko Rapeli [not found] ` <17A712B42F330FC5.10454@lists.openembedded.org> 1 sibling, 0 replies; 6+ messages in thread From: Mikko Rapeli @ 2024-01-04 6:59 UTC (permalink / raw) To: Martin Jansa; +Cc: openembedded-core Hi, On Wed, Jan 03, 2024 at 03:54:02PM +0100, Martin Jansa wrote: > On Wed, Jan 3, 2024 at 11:16 AM Mikko Rapeli <mikko.rapeli@linaro.org> > wrote: > > > Don't expect image file names to include "-image-" but > > expect them to have the ".rootfs." postfix which is the > > default. > > > > It's the current default, but whole runqemu won't work when someone changes: > > meta/classes-recipe/image-artifact-names.bbclass:IMAGE_NAME_SUFFIX ??= > ".rootfs" > > So you should probably read IMAGE_NAME_SUFFIX variable first, but the most > likely change someone will have in local.conf would be to drop this suffix > and set this to empty and then the check for empty string in basename won't > be very useful as well. So drop this file name check completely? Fine for me. I'll send an update. Cheers, -Mikko ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <17A712B42F330FC5.10454@lists.openembedded.org>]
* Re: [OE-core] [PATCH] runqemu: match .rootfs. in image names instead of -image- [not found] ` <17A712B42F330FC5.10454@lists.openembedded.org> @ 2024-01-04 7:50 ` Mikko Rapeli 2024-01-04 8:34 ` Richard Purdie 0 siblings, 1 reply; 6+ messages in thread From: Mikko Rapeli @ 2024-01-04 7:50 UTC (permalink / raw) To: Martin Jansa, openembedded-core Hi, On Thu, Jan 04, 2024 at 08:59:03AM +0200, Mikko Rapeli via lists.openembedded.org wrote: > Hi, > > On Wed, Jan 03, 2024 at 03:54:02PM +0100, Martin Jansa wrote: > > On Wed, Jan 3, 2024 at 11:16 AM Mikko Rapeli <mikko.rapeli@linaro.org> > > wrote: > > > > > Don't expect image file names to include "-image-" but > > > expect them to have the ".rootfs." postfix which is the > > > default. > > > > > > > It's the current default, but whole runqemu won't work when someone changes: > > > > meta/classes-recipe/image-artifact-names.bbclass:IMAGE_NAME_SUFFIX ??= > > ".rootfs" > > > > So you should probably read IMAGE_NAME_SUFFIX variable first, but the most > > likely change someone will have in local.conf would be to drop this suffix > > and set this to empty and then the check for empty string in basename won't > > be very useful as well. > > So drop this file name check completely? Fine for me. I'll send an update. As you said too, this doesn't work. runqemu has a bunch of heuristics to detect different kinds of file arguments which break too easily. Test for .rootfs. in file name is IMO better than than -image- in recipe/file name, but also not perfect. Using IMAGE_NAME_SUFFIX would be nice but the indirection with qemuboot.conf makes this hard too, and if that variable is set to empty then a lot of things break again on runqemu side heuristics, gah... I have a dm-verity image recipe and a separate recipe which bakes that into a .wic image file which I'd like to test with oeqa, testimage.bbclass and qemu. It's either this patch or I rename all image recipes to have -image in their names. Cheers, -Mikko ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] runqemu: match .rootfs. in image names instead of -image- 2024-01-04 7:50 ` Mikko Rapeli @ 2024-01-04 8:34 ` Richard Purdie 2024-01-04 9:38 ` Mikko Rapeli 0 siblings, 1 reply; 6+ messages in thread From: Richard Purdie @ 2024-01-04 8:34 UTC (permalink / raw) To: Mikko Rapeli, Martin Jansa, openembedded-core On Thu, 2024-01-04 at 09:50 +0200, Mikko Rapeli wrote: > Hi, > > On Thu, Jan 04, 2024 at 08:59:03AM +0200, Mikko Rapeli via lists.openembedded.org wrote: > > Hi, > > > > On Wed, Jan 03, 2024 at 03:54:02PM +0100, Martin Jansa wrote: > > > On Wed, Jan 3, 2024 at 11:16 AM Mikko Rapeli <mikko.rapeli@linaro.org> > > > wrote: > > > > > > > Don't expect image file names to include "-image-" but > > > > expect them to have the ".rootfs." postfix which is the > > > > default. > > > > > > > > > > It's the current default, but whole runqemu won't work when someone changes: > > > > > > meta/classes-recipe/image-artifact-names.bbclass:IMAGE_NAME_SUFFIX ??= > > > ".rootfs" > > > > > > So you should probably read IMAGE_NAME_SUFFIX variable first, but the most > > > likely change someone will have in local.conf would be to drop this suffix > > > and set this to empty and then the check for empty string in basename won't > > > be very useful as well. > > > > So drop this file name check completely? Fine for me. I'll send an update. > > As you said too, this doesn't work. runqemu has a bunch of heuristics to detect different > kinds of file arguments which break too easily. Test for .rootfs. in file name is IMO > better than than -image- in recipe/file name, but also not perfect. Using IMAGE_NAME_SUFFIX > would be nice but the indirection with qemuboot.conf makes this hard too, and if that variable > is set to empty then a lot of things break again on runqemu side heuristics, gah... > > I have a dm-verity image recipe and a separate recipe which bakes that into a .wic image > file which I'd like to test with oeqa, testimage.bbclass and qemu. > > It's either this patch or I rename all image recipes to have -image in their names. You could change the check to check for -image- or .rootfs. ? Not perfect either but might be good enough... Cheers, Richard ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [PATCH] runqemu: match .rootfs. in image names instead of -image- 2024-01-04 8:34 ` Richard Purdie @ 2024-01-04 9:38 ` Mikko Rapeli 0 siblings, 0 replies; 6+ messages in thread From: Mikko Rapeli @ 2024-01-04 9:38 UTC (permalink / raw) To: Richard Purdie; +Cc: Martin Jansa, openembedded-core Hi, On Thu, Jan 04, 2024 at 08:34:03AM +0000, Richard Purdie wrote: > On Thu, 2024-01-04 at 09:50 +0200, Mikko Rapeli wrote: > > Hi, > > > > On Thu, Jan 04, 2024 at 08:59:03AM +0200, Mikko Rapeli via lists.openembedded.org wrote: > > > Hi, > > > > > > On Wed, Jan 03, 2024 at 03:54:02PM +0100, Martin Jansa wrote: > > > > On Wed, Jan 3, 2024 at 11:16 AM Mikko Rapeli <mikko.rapeli@linaro.org> > > > > wrote: > > > > > > > > > Don't expect image file names to include "-image-" but > > > > > expect them to have the ".rootfs." postfix which is the > > > > > default. > > > > > > > > > > > > > It's the current default, but whole runqemu won't work when someone changes: > > > > > > > > meta/classes-recipe/image-artifact-names.bbclass:IMAGE_NAME_SUFFIX ??= > > > > ".rootfs" > > > > > > > > So you should probably read IMAGE_NAME_SUFFIX variable first, but the most > > > > likely change someone will have in local.conf would be to drop this suffix > > > > and set this to empty and then the check for empty string in basename won't > > > > be very useful as well. > > > > > > So drop this file name check completely? Fine for me. I'll send an update. > > > > As you said too, this doesn't work. runqemu has a bunch of heuristics to detect different > > kinds of file arguments which break too easily. Test for .rootfs. in file name is IMO > > better than than -image- in recipe/file name, but also not perfect. Using IMAGE_NAME_SUFFIX > > would be nice but the indirection with qemuboot.conf makes this hard too, and if that variable > > is set to empty then a lot of things break again on runqemu side heuristics, gah... > > > > I have a dm-verity image recipe and a separate recipe which bakes that into a .wic image > > file which I'd like to test with oeqa, testimage.bbclass and qemu. > > > > It's either this patch or I rename all image recipes to have -image in their names. > > You could change the check to check for -image- or .rootfs. ? > > Not perfect either but might be good enough... Good idea, I'll do that. Cheers, -Mikko ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-01-04 9:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 10:16 [PATCH] runqemu: match .rootfs. in image names instead of -image- Mikko Rapeli
2024-01-03 14:54 ` [OE-core] " Martin Jansa
2024-01-04 6:59 ` Mikko Rapeli
[not found] ` <17A712B42F330FC5.10454@lists.openembedded.org>
2024-01-04 7:50 ` Mikko Rapeli
2024-01-04 8:34 ` Richard Purdie
2024-01-04 9:38 ` Mikko Rapeli
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.