Bug 2610 - poky-tiny builds should be marked as failed if the image size is above a specified threshold
Summary: poky-tiny builds should be marked as failed if the image size is above a spec...
Status: RESOLVED FIXED
Alias: None
Product: AutoBuilder
Classification: Infrastructure
Component: autobuilder (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 1.7 M2
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
: 6396 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-14 17:08 UTC by Darren Hart
Modified: 2014-07-11 09:52 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2012-06-14 17:08:05 UTC
The goal of poky-tiny is to build small images. Sometimes unrelated changes result in packages being pulled into the dependency chain of poky-tiny builds. A QA test comparing the size of a poky-tiny core-image-minimal image to a threshold and marking the build as failed if it exceeds it would make this apparent earlier.

TODO: get the threshold
Comment 1 Saul Wold 2013-10-18 16:16:35 UTC
Could be sanity test related, so giving it to paul to look into
Comment 2 Paul Eggleton 2013-12-16 11:41:44 UTC
This is something that needs to be checked at do_rootfs time; we can't know how large the image will be until that point.

A couple of questions:

1) Are we checking the maximum size of the output image file (in which case it is specific to the format type)? Although this is more complicated it does seem like the most sensible given that this is what you'll end up writing to storage on the target.

2) What size threshold do we want to set by default for poky-tiny?
Comment 3 Paul Eggleton 2014-01-17 18:11:23 UTC
Setting to NEEDINFO as per above.
Comment 4 Darren Hart 2014-03-06 18:04:47 UTC
How about a SANITY test that does a du -s for tmp/work/core-image-minimal/1.0-r0/rootfs ? That avoids all the fs / package (tar, cpio, etc.) overhead.

We should also check the kernel as that is a critical part of this, possibly with two unique THRESHOLD values, maybe:

TINY_ROOTFS_THRESHOLD
TINY_KERNEL_THRESHOLD

Threshold is tricky. Ideally it would be per-machine - but for now, even something like 4MB would be a good starting point. The THRESHOLD should be the easiest aspect of this to change... it should be a variable that a machine config can override as well.

For the kernel, 2MB would be a good start I think.

THis is assuming eglibc of course, with uclibc, the THRESHOLD for ROOTFS should be more like 2MB. Each could be defined in poky-tiny.conf I suspect, depending on the value of TCLIBC...
Comment 5 Richard Purdie 2014-05-03 18:04:46 UTC
We already have a setting for the kernel size check. We discussed this at OEDAM and there was general interest in some kind of image size check too as others have run into this kind of issue.

A generic image size check would therefore be useful.
Comment 6 Martin Jansa 2014-05-03 18:05:50 UTC
There is meta/lib/oe/image.py _get_rootfs_size function, so it should be enhanced a bit to issue warning when the rootfs exceeds the maximal size.
Comment 7 Paul Eggleton 2014-06-05 14:47:35 UTC
*** Bug 6396 has been marked as a duplicate of this bug. ***