mbox series

[0/7] oe-selftest FIT image cleanup

Message ID 20250310093641.1983560-1-adrian.freihofer@siemens.com
Headers show
Series oe-selftest FIT image cleanup | expand

Message

Adrian Freihofer March 10, 2025, 9:35 a.m. UTC
This is a major cleanup of the fitimage oe-selftests. The tests are very hard
to maintain. There are now 10 tests, each of which has been copy & pasted in a
slightly modified version. The tests consist of a simple parser for its files
and a parser for the stdout of the dumpimage utility. There are now 10 variants
of these two parsers in the code.

This patch series restructures the code into reusable functions. Instead of
implementing several independent, self-contained but copy & pasted test
functions, there are now a few generic functions that implement the counterpart
of the bbclasses uboot-sign and kernel-fitimage. These functions are then used
by very small test functions. A test function now essentially only generates a
local.conf file. Checking the functionality is done by the generic functions.
The generic functions therefore take the bitbake variables into account.
This means that adding another test now consists primarily of generating
another local.conf file instead of copying a large test function. In practice,
adding a new test probably means a few more extensions to the generic
functions.

This is part of solving https://bugzilla.yoctoproject.org/show_bug.cgi?id=12912.
The next step is to add more test coverage before the fitImage related code is
reworked and probably moved to a separate recipe. Moving the code to a separate
recipe is necessary to fix the sstate cache for fitImage.

Adrian Freihofer (7):
  oe-selftest: drop redundant imports
  linux-fitimage: sign setup sections
  uboot, kernel: use hex address for UBOOT_ENTRYPOINT
  oe-selftest: adapt u-boot tests to latest changes
  oe-selftest: fitimage sort tests
  oe-selftest: fitimage cleanup
  oe-selftest: fitimage add more kernel tests

 meta/classes-recipe/kernel-fitimage.bbclass |   13 +
 meta/classes-recipe/kernel.bbclass          |    2 +-
 meta/classes-recipe/uboot-config.bbclass    |    2 +-
 meta/lib/oeqa/selftest/cases/fitimage.py    | 1934 ++++++++++---------
 scripts/oe-selftest                         |    2 -
 5 files changed, 1069 insertions(+), 884 deletions(-)