summaryrefslogtreecommitdiff
path: root/src/test/test-os-util.c
Commit message (Collapse)AuthorAgeFilesLines
* os-util: invert order of arguments in extension release parserYu Watanabe2023-04-111-4/+4
| | | | | | | For consistency with other functions. Unfortunately, va_start() requires that the previous argument is a pointer, hence the order of the arguments in the internal function cannot be changed.
* test-os-util: add tests for sysext and confext release filesmaanyagoenka2023-04-051-1/+47
|
* os-util: optionally, return EOL time in os_release_support_ended()Lennart Poettering2023-01-241-4/+4
|
* manager: add taint flag "support-ended"Zbigniew Jędrzejewski-Szmek2022-07-101-0/+14
| | | | | | | | | | | | | | In the welcome line, use NAME= as the fallback for PRETTY_NAME=. PRETTY_NAME= doesn't have to be set, but NAME= should. Example output: --- Welcome to Fedora Linux 37 (Rawhide Prerelease)! [ !! ] This OS version (Fedora Linux 37 (Rawhide Prerelease)) is past its end-of-support date (1999-01-01) Queued start job for default target graphical.target. [ OK ] Created slice system-getty.slice. ---
* systemctl: fix silent failure when --root is not foundZbigniew Jędrzejewski-Szmek2022-03-291-4/+3
| | | | | | | | | | | | | | | | | | | | Some calls to lookup_path_init() were not followed by any log emission. E.g.: $ SYSTEMD_LOG_LEVEL=debug systemctl --root=/missing enable unit; echo $? 1 Let's add a helper function and use it in various places. $ SYSTEMD_LOG_LEVEL=debug build/systemctl --root=/missing enable unit; echo $? Failed to initialize unit search paths for root directory /missing: No such file or directory 1 $ SYSTEMCTL_SKIP_SYSV=1 build/systemctl --root=/missing enable unit; echo $? Failed to initialize unit search paths for root directory /missing: No such file or directory Failed to enable: No such file or directory. 1 The repeated error in the second case is not very nice, but this is a niche case and I don't think it's worth the trouble to trying to avoid it.
* basic/env-file: make load-env-file deduplicate entries with the same keyZbigniew Jędrzejewski-Szmek2022-03-291-2/+1
| | | | | We generally assume parsing like the shell would do it, so the last value should win when there are repeats.
* test-os-util: add basic tests for os-release parsingZbigniew Jędrzejewski-Szmek2022-03-291-0/+62
|
* test: Use TEST macroJan Janssen2021-11-251-8/+2
| | | | | | | | | This converts to TEST macro where it is trivial. Some additional notable changes: - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c - use saved_argc/saved_argv in test-copy.c, test-path-util.c, test-tmpfiles.c and test-unit-file.c
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* tests: use a helper function to parse environment and open loggingZbigniew Jędrzejewski-Szmek2018-09-141-3/+2
| | | | | The advantages are that we save a few lines, and that we can override logging using environment variables in more test executables.
* os-util: add helpers for finding /etc/os-releaseLennart Poettering2018-05-241-0/+22
Place this new helpers in a new source file os-util.[ch], and move the existing and related call path_is_os_tree() to it as well.