<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/lib/oeqa, branch walnascar-next</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=walnascar-next</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=walnascar-next'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2025-03-24T17:29:16+00:00</updated>
<entry>
<title>oeqa: spdx: Add tar test for SPDX 2.2</title>
<updated>2025-03-24T17:29:16+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2025-03-21T15:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3b585c5e11b0484df761e67bad736535c2b3423e'/>
<id>urn:sha1:3b585c5e11b0484df761e67bad736535c2b3423e</id>
<content type='text'>
The base-files test for SPDX 2.2 did not give good coverage, since
base-files doesn't have any dependencies. Add building tar as another
test which more fully exercises the code

(From OE-Core rev: d678e25419c89e09c1c438363bf3a940ce903d43)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oeqa: Build cpio with C17 std</title>
<updated>2025-03-24T17:29:16+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2025-03-19T08:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b76c04bdcbc527b76c0811822d4ca8200ba809b4'/>
<id>urn:sha1:b76c04bdcbc527b76c0811822d4ca8200ba809b4</id>
<content type='text'>
cpio is not yet buildable with C23 standard which is default with
GCC 15, therefore ensure to apply needed bandage to keep it compiling
in C17 mode even with GCC 15

(From OE-Core rev: 0c637099887f1be421c8e1203f99631a1e040150)

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>devtool: reset: Escape command line input used in regular expression</title>
<updated>2025-03-20T11:29:04+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>pkj@axis.com</email>
</author>
<published>2025-03-18T23:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c0f3bc79b3e5d5b13c950cadfe558bbcd10187a0'/>
<id>urn:sha1:c0f3bc79b3e5d5b13c950cadfe558bbcd10187a0</id>
<content type='text'>
Running, e.g., `devtool reset sdbus-c++` would result in the following
error:

  re.error: multiple repeat at position 35

This was due to the ++ in the recipe name, which would be treated as an
incorrect regular expression in _reset().

Use re.escape() to make sure all characters in the recipe name are
treated literally.

(From OE-Core rev: 6e73bd9b3e6d529752db93879f2c0ed53873dd1a)

Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Signed-off-by: Mathieu Dubois-Briand &lt;mathieu.dubois-briand@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: fitimage add more u-boot tests</title>
<updated>2025-03-18T10:27:31+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-17T17:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=12801c7bbbcf902102c3350e91d9256844e2492a'/>
<id>urn:sha1:12801c7bbbcf902102c3350e91d9256844e2492a</id>
<content type='text'>
Add a new test function which checks that the device-tree of U-Boot
contains the public keys which are required for checking the signature
of the kernel FIT image at run-time.

Use this new _check_kernel_dtb function in the existing
test_sign_cascaded_uboot_fit_image test case which already creates a
build configuration with UBOOT_SIGN_ENABLE = "1" and keys for the kernel.
But so far there was no check that the keys for the kernel verification
got added to U-Boot's DTB.
This test case checks the configuration where only the configuration
nodes of the kernel FIT image are signed.

A new test case test_sign_uboot_kernel_individual checks the
configuration with two keys and signed image and signed configuration
nodes.
This test case covers the use case which recently broke with commit:
  OE-Core rev: 259bfa86f384206f0d0a96a5b84887186c5f689e
               u-boot: kernel-fitimage: Fix dependency loop if
               UBOOT_SIGN_ENABLE and UBOOT_ENV enabled
and got fixed with commit
  OE-Core rev: 0106e5efab99c8016836a2ab71e2327ce58a9a9d
               u-boot: kernel-fitimage: Restore FIT_SIGN_INDIVIDUAL="1"
               behavior

This patch also fixes a few more details:
- Simplify the code by moving all the U-Boot related variables to the
  _fit_get_bb_vars function.
- Do not set FIT_GENERATE_KEYS = "1" without inheriting the
  kernel-fitimage.bbclass which handles this variable.

(From OE-Core rev: dda1fcbc85c26d1851dda6ed235238b15939998e)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: fitimage improve bb_vars access</title>
<updated>2025-03-18T10:27:31+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-17T17:13:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=4632788c431b1348f0c281f8894acff994b3e45f'/>
<id>urn:sha1:4632788c431b1348f0c281f8894acff994b3e45f</id>
<content type='text'>
Make the code slightly more robust by using e.g.
bb_vars.get('UBOOT_SIGN_ENABLE') instead of bb_vars['UBOOT_SIGN_ENABLE']
for variables which are potentially undefined.
This is a general cleanup but also a preparation for additional test
cases.
Log bb_vars in verbose mode.
Drop one no longer used log message.

(From OE-Core rev: 22a554e1d5a2449c4c1b34f4d5cfe1572a72a142)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftest: gdbserver: Adjust regex for change to output</title>
<updated>2025-03-17T17:09:22+00:00</updated>
<author>
<name>Alex Kiernan</name>
<email>alex.kiernan@gmail.com</email>
</author>
<published>2025-03-15T10:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0b212fef33463ba73d0db5c43ff36dafaea639fe'/>
<id>urn:sha1:0b212fef33463ba73d0db5c43ff36dafaea639fe</id>
<content type='text'>
The updated kmod build (using meson) causes the output which results from `info
line kmod_help` to change. Relax the regex so that both old and new reponses
will pass.

(From OE-Core rev: 8783e7b8109b02847cf3b07421582c4fdb18949c)

Signed-off-by: Alex Kiernan &lt;alex.kiernan@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: fitimage add more kernel tests</title>
<updated>2025-03-11T11:20:34+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-10T09:35:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=840504e256ed16b2501748a9a075a2adfc940128'/>
<id>urn:sha1:840504e256ed16b2501748a9a075a2adfc940128</id>
<content type='text'>
* Test with only one externally provided ssh key not only with two
  keys generated by the kernel-fitimage.bbclass itself.
* Add a test which signs only the configuration but not the image nodes.
  There was no test case which covered the probably much more important
  use case of setting FIT_SIGN_INDIVIDUAL = "0".
* Cover also the unbundled initramfs use case. Also this use case is
  probably much more relevant than the bundled initramnfs use case.

(From OE-Core rev: 0a5b65b83dcd9f8d1d22d074fdfad1f1e472827c)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: fitimage cleanup</title>
<updated>2025-03-11T11:20:34+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-10T09:35:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=2db2709b8b2404e847adb96bc417627cb43f415e'/>
<id>urn:sha1:2db2709b8b2404e847adb96bc417627cb43f415e</id>
<content type='text'>
This is a comprehensive cleanup of the fitImage related test cases.
The existing test cases were essentially the same code copied and pasted
9 times. All 9 test cases contained the code to parse an its file and to
parse the output of the dumpimage utility in slightly different variants.
Changing the kernel-fitimage.bbclass or the uboot-sign.bbclass would mean
changing 9 test cases individually. This is no longer maintainable.

This cleanup converts the code into reusable functions. The new test
code is more like a reverse implementation of the bbclasses to be tested
than a collection of straightforward test sequences.
This also means that the test code evaluates the same bitbake variables
as the implementation. This makes it much easier to add new test cases,
as a test case is basically just another local.conf file. The code is
not yet complete. But it can now be improved step by step in this
direction.

(From OE-Core rev: 1dfa03a182d9d9e9e38c410847c7dac4ed7e8ce6)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: fitimage sort tests</title>
<updated>2025-03-11T11:20:34+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-10T09:35:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=02d2b95e6ed2efaf92b477dda4441bccd69b2ebe'/>
<id>urn:sha1:02d2b95e6ed2efaf92b477dda4441bccd69b2ebe</id>
<content type='text'>
This is a trivial refactoring.
The goal is to have all tests for kernel-fitimage.bbclass and all tests
for uboot-sign.bbclass together. This refactoring greatly simplifies
the diff of the next commit.

(From OE-Core rev: 638abab58b653a1fb120368bd5e30bc80478757c)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>oe-selftest: adapt u-boot tests to latest changes</title>
<updated>2025-03-11T11:20:34+00:00</updated>
<author>
<name>Adrian Freihofer</name>
<email>adrian.freihofer@gmail.com</email>
</author>
<published>2025-03-10T09:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c93f487dc4ff2e39ae6daca190d78ac1c3fa4b29'/>
<id>urn:sha1:c93f487dc4ff2e39ae6daca190d78ac1c3fa4b29</id>
<content type='text'>
For u-boot test cases (bitbake virtual/bootloader) inheriting the
kernel-fitimage.bbclass is no longer needed. Also setting any variable
which is evaluated by the kernel-fitimage.bbclass but not by
uboot-sign.bbclass is pointless since:

* Commit OE-Core rev: 5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e
  changed the test case from
    bitbake virtual/kernel
  to
    bitbake virtual/bootloader

* Commit OE-Core rev: 259bfa86f384206f0d0a96a5b84887186c5f689e has
  finally removed the dependency of uboot-sign.bbclass on the
  kernel-fitimage.bbclass completely.

Remove the related lines of code which are now without any effect.

The two test cases test_uboot_fit_image and test_uboot_sign_fit_image
do the exact same test. Both generate a binary equal its file:

/dts-v1/;

/ {
    description = "A model description";
    #address-cells = &lt;1&gt;;

    images {
        uboot {
            description = "U-Boot image";
            data = /incbin/("u-boot-nodtb.bin");
            type = "standalone";
            os = "u-boot";
            arch = "arm";
            compression = "none";
            load = &lt;0x80080000&gt;;
            entry = &lt;0x80080000&gt;;
        };
        fdt {
            description = "U-Boot FDT";
            data = /incbin/("u-boot.dtb");
            type = "flat_dt";
            arch = "arm";
            compression = "none";
        };
    };

    configurations {
        default = "conf";
        conf {
            description = "Boot with signed U-Boot FIT";
            loadables = "uboot";
            fdt = "fdt";
        };
    };
};

The code diff between the two equal test cases looks like:

@@ -1,8 +1,9 @@
-    def test_uboot_fit_image(self):
+    def test_uboot_sign_fit_image(self):
         """
         Summary:     Check if Uboot FIT image and Image Tree Source
                      (its) are built and the Image Tree Source has the
-                     correct fields.
+                     correct fields, in the scenario where the Kernel
+                     is also creating/signing it's fitImage.
         Expected:    1. u-boot-fitImage and u-boot-its can be built
                      2. The type, load address, entrypoint address and
                      default values of U-boot image are correct in the
@@ -26,16 +27,15 @@
 UBOOT_LOADADDRESS = "0x80080000"
 UBOOT_ENTRYPOINT = "0x80080000"
 UBOOT_FIT_DESC = "A model description"
-
-# Enable creation of Kernel fitImage
 KERNEL_IMAGETYPES += " fitImage "
-KERNEL_CLASSES = " kernel-fitimage"
+KERNEL_CLASSES = " kernel-fitimage "
 UBOOT_SIGN_ENABLE = "1"
 FIT_GENERATE_KEYS = "1"
 UBOOT_SIGN_KEYDIR = "${TOPDIR}/signing-keys"
 UBOOT_SIGN_IMG_KEYNAME = "img-oe-selftest"
 UBOOT_SIGN_KEYNAME = "cfg-oe-selftest"
 FIT_SIGN_INDIVIDUAL = "1"
+UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart U-Boot comment'"
 """
         self.write_config(config)

Conclusion: The test case test_uboot_sign_fit_image looks redundant.
Contrary to its name, it does not insert any signature nodes into the
its-file and therefore does not test any type of signature.

Code history:
- Commit OE-Core rev: e71e4c617568496ae3bd6bb678f97b4f73cb43d8
  introduces both test cases.
- Commit OE-Core rev: 5e12dc911d0c541f43aa6d0c046fb87e8b7c1f7e
  changes both test cases like this:
  -        bitbake("virtual/kernel")
  +        bitbake("virtual/bootloader")

It looks like the original implementation of test_uboot_sign_fit_image
was supposed to test the interaction between the kernel-fitimage.bbclass
and uboot-sign.bbclass which does not longer work like that.

When compiling u-boot, the variable that is relevant for creating an its
file with signature nodes is: SPL_SIGN_ENABLE. This is what the test
case test_sign_standalone_uboot_fit_image verifies. Lets just delete the
now obsolete test_uboot_sign_fit_image test case.

(From OE-Core rev: de8bfdff0f997f59a2bd27842a2ffcd365f725f3)

Signed-off-by: Adrian Freihofer &lt;adrian.freihofer@siemens.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
