diff mbox series

[v2,2/2] oeqa/selftest/pkgdata: add a test for variable consistency in multilib

Message ID 20260506172416.4017418-3-jaeyoon.jung@lge.com
State Changes Requested
Headers show
Series Fix multilib package variable propagation | expand

Commit Message

From: Jaeyoon Jung <jaeyoon.jung@lge.com>

Add a selftest to verify that the pkgdata variable LICENSE is identical
between libsystemd and lib32-libsystemd.

Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
---
 meta/lib/oeqa/selftest/cases/pkgdata.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

Comments

Mathieu Dubois-Briand May 8, 2026, 7:25 a.m. UTC | #1
On Wed May 6, 2026 at 7:24 PM CEST, Jaeyoon Jung (LGE) via lists.openembedded.org wrote:
> From: Jaeyoon Jung <jaeyoon.jung@lge.com>
>
> Add a selftest to verify that the pkgdata variable LICENSE is identical
> between libsystemd and lib32-libsystemd.
>
> Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
> ---

Hi Jaeyoon,

Thanks for your patch.

It looks like the added test is failing on the autobuilder:

2026-05-07 11:45:34,293 - oe-selftest - INFO - pkgdata.OePkgdataUtilTests.test_multilib_variables (subunit.RemotedTestCase)
2026-05-07 11:45:34,296 - oe-selftest - INFO -  ... FAIL
...
  File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/selftest/cases/pkgdata.py", line 239, in test_multilib_variables
    bitbake('systemd lib32-systemd')
  File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/utils/commands.py", line 236, in bitbake
    return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/layers/openembedded-core/meta/lib/oeqa/utils/commands.py", line 214, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, exc_output))
AssertionError: Command 'bitbake  systemd lib32-systemd' returned non-zero exit status 1:
NOTE: Reconnecting to bitbake server...
Loading cache...done.
Loaded 0 entries from dependency cache.
Parsing recipes...done.
ERROR: Nothing PROVIDES 'systemd'

https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/3911
https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3806
https://autobuilder.yoctoproject.org/valkyrie/#/builders/48/builds/3678

Can you have a look at the issue?

Thanks,
Mathieu
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py
index d786c33018..357578a240 100644
--- a/meta/lib/oeqa/selftest/cases/pkgdata.py
+++ b/meta/lib/oeqa/selftest/cases/pkgdata.py
@@ -225,3 +225,21 @@  class OePkgdataUtilTests(OESelftestTestCase):
         self.assertEqual(result.status, 2, "Status different than 2. output: %s" % result.output)
         currpos = result.output.find('usage: oe-pkgdata-util')
         self.assertTrue(currpos != -1, msg = "Test is Failed. Help is not Displayed in %s" % result.output)
+
+    def test_multilib_variables(self):
+        # Set up a lib32 multilib configuration
+        self.write_config("""
+MACHINE:forcevariable = "qemux86-64"
+require conf/multilib.conf
+MULTILIBS = "multilib:lib32"
+DEFAULTTUNE:virtclass-multilib-lib32 = "x86"
+DISTRO_FEATURES:append = " systemd usrmerge"
+""")
+        # Build systemd and lib32-systemd to get their pkgdata
+        bitbake('systemd lib32-systemd')
+        # Verify that LICENSE values of libsystemd and lib32-libsystemd are the same
+        pkg = runCmd('oe-pkgdata-util lookup-pkg libsystemd').output
+        pkg_lib32 = runCmd('oe-pkgdata-util lookup-pkg lib32-libsystemd').output
+        license = runCmd('oe-pkgdata-util read-value LICENSE %s' % pkg).output
+        license_lib32 = runCmd('oe-pkgdata-util read-value LICENSE %s' % pkg_lib32).output
+        self.assertEqual(license, license_lib32)