summaryrefslogtreecommitdiffstats
path: root/test/test-sysusers.sh.in (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test: quote paths to executablesYu Watanabe2024-09-181-18/+18
| | | | Fixes #34459.
* Set SYSTEMD_LOG_LEVEL=info explicitly in test-sysusersDaan De Meyer2024-02-191-1/+1
| | | | | If we're looking for output on stderr, let's make sure it's not littered with debug logs if SYSTEMD_LOG_LEVEL=debug.
* test: show error messages to stderrYu Watanabe2024-02-111-4/+4
| | | | Otherwise, 'meson test' hides the messages on failure.
* tests: fix shellcheck warningsLuca Boccassi2023-06-061-2/+2
|
* test: fix shellcheck warnings in test-sysusers.shLuca Boccassi2023-03-291-57/+63
|
* test-sysusers: check that sysusers creates /etc when missingZbigniew Jędrzejewski-Szmek2023-02-011-0/+8
|
* sysusers: use log_syntax (changes prefix from '[%s:%u]' to '%s:%u:')Zbigniew Jędrzejewski-Szmek2022-08-221-1/+1
| | | | | This makes the sysusers use the same message convention as other tools. Also adds the prefix in a few places.
* licensing: add forgotten spdx headersZbigniew Jędrzejewski-Szmek2021-10-011-0/+1
| | | | | Those are all "our" files, but we forgot to add the headers, most likely because of non-standard file extensions.
* sysusers: look at login.defs when setting the default range to allocate usersZbigniew Jędrzejewski-Szmek2020-10-011-5/+54
| | | | | | | | | | | | | 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-sysusers: fix how paths are calculatedZbigniew Jędrzejewski-Szmek2020-10-011-8/+8
| | | | | | | | | | | | | | | | | | | We were looking at ${f%.*}, i.e. the $f with any suffix starting with a dot removed. This worked fine for paths like /some/path/test-11.input. It also worked for paths like /some/path/inline (there were no dots, so we got $f back unscathed). But in the ubuntu CI the package is built in a temporary directory like /tmp/autopkgtest-lxc.nnnfqb26/downtmp/build.UfW/ (yes, it has a dot, even two.). That still worked for the first case, but in the second case we truncated things after the first dot, and we would try to get /tmp/autopkgtest-lxc.nnnfqb26/downtmp/build and try to load /tmp/autopkgtest-lxc.nnnfqb26/downtmp/build.expected-password, which obviously didn't work as expected. To avoid this issue, do the suffix removal only when we know that there really is a suffix. A second minor issue was that we would try to copy $1.expected-*, and sometimes $1 would be given, and sometimes not. Effectively we were relying on there not being any files matching .expected-*. There weren't any such files, but let's avoid this ugliness and always pass $1.
* test-sysusers: sort examplesZbigniew Jędrzejewski-Szmek2020-10-011-4/+4
| | | | This shouldn't affect the outcome, but makes outputs easier to compare.
* test/TEST-21-SYSUSERS: turn into a unit testZbigniew Jędrzejewski-Szmek2020-10-011-0/+111
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.