diff mbox series

[v3,3/3] oe-selftest: add test for useradd with only USERADD_DEPENDS

Message ID 20260423100405.25255-4-zizuzacker@gmail.com
State New
Headers show
Series useradd.bbclass: fix parse error when only USERADD_DEPENDS is set | expand

Commit Message

Zk47T April 23, 2026, 10:04 a.m. UTC
Add a test case to verify that a recipe inheriting useradd with only
USERADD_DEPENDS set (and no USERADD_PACKAGES) parses and builds
successfully. This validates the fix in useradd.bbclass for
[YOCTO #15863].

Signed-off-by: Nguyen Minh Tien <zizuzacker@gmail.com>
---
 meta/lib/oeqa/selftest/cases/usergrouptests.py | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Zk47T April 23, 2026, 10:09 a.m. UTC | #1
Hi,
i remove these 2 lines in poky/meta-selftest/recipes-test/selftest-users/
usegroup-deponly.bb
- S = "${WORKDIR}/sources"
- UNPACKDIR = "${S}"

My poky base on walnascar-next, it seem that the autobuilder base on newer
branch that more strict in S and UNPACKDIR variables that caused do_unpack
failed
I have just updated new patch v3 for this . Please help review it

Thank,
Nguyen Minh Tien


Vào Thứ 5, 23 thg 4, 2026 vào lúc 17:04 Nguyen Minh Tien <
zizuzacker@gmail.com> đã viết:

> Add a test case to verify that a recipe inheriting useradd with only
> USERADD_DEPENDS set (and no USERADD_PACKAGES) parses and builds
> successfully. This validates the fix in useradd.bbclass for
> [YOCTO #15863].
>
> Signed-off-by: Nguyen Minh Tien <zizuzacker@gmail.com>
> ---
>  meta/lib/oeqa/selftest/cases/usergrouptests.py | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/meta/lib/oeqa/selftest/cases/usergrouptests.py
> b/meta/lib/oeqa/selftest/cases/usergrouptests.py
> index 3c59b0f290..69025a59aa 100644
> --- a/meta/lib/oeqa/selftest/cases/usergrouptests.py
> +++ b/meta/lib/oeqa/selftest/cases/usergrouptests.py
> @@ -55,3 +55,9 @@ class UserGroupTests(OESelftestTestCase):
>          self.write_config("USERADD_GID_TABLES += \"files/static-group\"")
>          self.logger.info("Rebuild with other staticids")
>          self.assertTrue(bitbake(' core-image-minimal'))
> +
> +    def test_useradd_depends_only(self):
> +        # Test that a recipe inheriting useradd with only USERADD_DEPENDS
> +        # (and no USERADD_PACKAGES) parses and builds successfully.
> [YOCTO #15863]
> +        self.logger.info("Building usegroup-deponly to test
> USERADD_DEPENDS only")
> +        self.assertTrue(bitbake(' usegroup-deponly'))
> --
> 2.34.1
>
>
diff mbox series

Patch

diff --git a/meta/lib/oeqa/selftest/cases/usergrouptests.py b/meta/lib/oeqa/selftest/cases/usergrouptests.py
index 3c59b0f290..69025a59aa 100644
--- a/meta/lib/oeqa/selftest/cases/usergrouptests.py
+++ b/meta/lib/oeqa/selftest/cases/usergrouptests.py
@@ -55,3 +55,9 @@  class UserGroupTests(OESelftestTestCase):
         self.write_config("USERADD_GID_TABLES += \"files/static-group\"")
         self.logger.info("Rebuild with other staticids")
         self.assertTrue(bitbake(' core-image-minimal'))
+
+    def test_useradd_depends_only(self):
+        # Test that a recipe inheriting useradd with only USERADD_DEPENDS
+        # (and no USERADD_PACKAGES) parses and builds successfully. [YOCTO #15863]
+        self.logger.info("Building usegroup-deponly to test USERADD_DEPENDS only")
+        self.assertTrue(bitbake(' usegroup-deponly'))