Bug 9787

Summary: create selftest for useradd-staticids
Product: [QA/Testing] Build Testing Reporter: Joshua Lock <joshuagloe>
Component: generalAssignee: Jose Perez C <jose.perez.carranza>
Status: RESOLVED FIXED QA Contact: Juan Ramos <juan.fernandox.ramos.frayle>
Severity: enhancement    
Priority: Medium CC: richard.purdie, stephano
Version: 2.2   
Target Milestone: 2.5 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

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.