useradd: Add testcase for bugzilla issue (currently disabled)

Add a disabled a test for 14961 - addtask between do_populate_sysroot and do_package breaks useradd class.
A fix is still needed for this.

(From OE-Core rev: b6af5788f7f8fb1e9d8ad14bd12168ff9d6baa21)

Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Eilís 'pidge' Ní Fhlannagáin 2023-12-07 12:45:32 +00:00 committed by Richard Purdie
parent ecef665062
commit e3ce7ce215
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,20 @@
SUMMARY = "UserAddBadTask"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
LICENSE = "MIT"
DEPENDS:append = "coreutils-native"
S = "${WORKDIR}"
inherit useradd allarch
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "-u 5555 --gid groupaddtask useraddtask"
GROUPADD_PARAM:${PN} = "-r groupaddtask"
do_badthingshappen() {
echo "foo"
}
addtask badthingshappen after do_populate_sysroot before do_package

View File

@ -15,3 +15,8 @@ class UserGroupTests(OESelftestTestCase):
self.logger.info("Packaging creategroup2")
self.assertTrue(bitbake(' creategroup2 -c package'))
def _test_add_task_between_p_sysroot_and_package(self):
self.logger.info("Cleaning sstate for useraddbadtask")
self.logger.info("Building useraddbadtask")
# fails due to bug #14961
self.assertTrue(bitbake(' useraddbadtask -C fetch'))