Bug 9787 - create selftest for useradd-staticids
Summary: create selftest for useradd-staticids
Status: RESOLVED FIXED
Alias: None
Product: Build Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 2.5 M2
Assignee: Jose Perez C
QA Contact: Juan Ramos
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-06-16 15:01 UTC by Joshua Lock
Modified: 2017-12-07 14:37 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock 2016-06-16 15:01:43 UTC
In #9777 we discovered that the useradd-staticids changes were broken in krogoth.

We need to develop automated testing for this to ensure we can better track when useradd changes break the staticids use-case.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=9777

Specifically we should add selftests to ensure that the users & groups are created with the expected id's from a static map. Furthermore we should test that the expected outcome happens when a recipe tries to create a user or group which doesn't exist in the map.
Comment 1 Stephano Cetola 2016-11-14 23:23:40 UTC
A good test case for breaking this selftest is Bug 9789. In that case, systemd-sysusers can circumvent the staticids feature, adding users and groups without checking to see if staticids have been set. This should throw some kind of warning, and would be a perfect way to test the failure.