summaryrefslogtreecommitdiffstats
path: root/test/test-sysusers (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gitattributes: introduce and use "generated" attributeZbigniew Jędrzejewski-Szmek2021-10-181-0/+2
| | | | | | | | | | | | | | I want to mark some files to be ignored for licensing purposes, e.g. output from fuzzers and other samples. By using the gitattribute machinery for this we don't need to design a custom protocol: $ git check-attr generated test/test-sysusers/unhappy-* test/test-sysusers/unhappy-1.expected-err: generated: set test/test-sysusers/unhappy-1.input: generated: unspecified test/test-sysusers/unhappy-2.expected-err: generated: set test/test-sysusers/unhappy-2.input: generated: unspecified test/test-sysusers/unhappy-3.expected-err: generated: set test/test-sysusers/unhappy-3.input: generated: unspecified
* tests: add spdx license header to test unit/link/network/conf filesZbigniew Jędrzejewski-Szmek2021-10-1817-0/+17
| | | | | | | | Those are all consumed by our parser, so they all support comments. I was considering whether they should have a license header at all, but in the end I decided to add it because those files are often created by copying parts of real unit files. And if the real ones have a license, then those might as well. It's easier to add it than to make an exception.
* sysusers: look at login.defs when setting the default range to allocate usersZbigniew Jędrzejewski-Szmek2020-10-0112-12/+12
| | | | | | | | | | | | | Also, even if login.defs are not present, don't start allocating at 1, but at SYSTEM_UID_MIN. Fixes #9769. The test is adjusted. Actually, it was busted before, because sysusers would never use SYSTEM_GID_MIN, so if SYSTEM_GID_MIN was different than SYSTEM_UID_MIN, the tests would fail. On all "normal" systems the two are equal, so we didn't notice. Since sysusers now always uses the minimum of the two, we only need to substitute one value.
* test/TEST-21-SYSUSERS: turn into a unit testZbigniew Jędrzejewski-Szmek2020-10-0155-0/+309
All this test does is manipulate text files in a subdir specified with --testroot. It can be a normal unittest without the overhead of creating a machine image. As a bonus, also test the .standalone version.