1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-20 10:50:12 +03:00

12 Commits

Author SHA1 Message Date
Frantisek Sumsal
744ea4536f test: add coverage for #26483
(cherry picked from commit adae3552f0f06ed286374311cb1265024ad1eb31)
(cherry picked from commit 7e5a5a79c0a74f9ee3afe6d983eddd945b51cc7a)
2023-03-30 18:56:36 +02:00
Frantisek Sumsal
252c31631b test: add coverage for #26467
(cherry picked from commit 4190124b3ca005830d893303bbc563baaf9984ed)
(cherry picked from commit 9b552ce86dbe52a02eca84819f2d88d56b105953)
2023-03-30 18:56:35 +02:00
Frantisek Sumsal
4ac9f178ea test: explicitly create the /etc/init.d directory
On RHEL/CentOS/Fedora this directory is provided by the chkconfig or
initscripts package, which might not be installed:

testsuite-26.sh[1225]: + [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]
testsuite-26.sh[1225]: + cat
testsuite-26.sh[2330]: /usr/lib/systemd/tests/testdata/units/testsuite-26.sh: line 299: /etc/init.d/issue-24990: No such file or directory

Follow-up to 5f882cc3ab32636d9242effb2cefad20d92d2ec2.

(cherry picked from commit 7fcf0fab078ed92a4f6c3c3658c0a9dfd67c9601)
2023-01-26 09:12:21 +01:00
Yu Watanabe
e579554dfa test: add test case for sysv-generator and invalid dependency
(cherry picked from commit 5f882cc3ab32636d9242effb2cefad20d92d2ec2)
2022-12-20 19:15:44 +01:00
Frantisek Sumsal
30ec52a92a test: further extend systemctl's sanity coverage
Also, fix a race condition introduced by d16684fe13:
```
[   16.904218] H testsuite-26.sh[394]: + systemd-run --unit failed.service /bin/false
[   16.964783] H systemd[845]: failed.service: Executing: /bin/false
[   16.965062] H systemd[1]: Started failed.service.
[   16.965462] H testsuite-26.sh[844]: Running as unit: failed.service
[   16.966390] H testsuite-26.sh[394]: + systemctl is-failed failed.service
[   16.977970] H testsuite-26.sh[846]: active
[   16.978403] H systemd[1]: failed.service: Main process exited, code=exited, status=1/FAILURE
[   16.978478] H systemd[1]: failed.service: Failed with result 'exit-code'.
```

(cherry picked from commit 23f3a6f5ff864fd26063c6c35fdaa6d85de566c7)
2022-11-04 23:31:28 +00:00
Frantisek Sumsal
77860d006d test: add a couple of sanity tests for systemctl
(cherry picked from commit d16684fe13e1d56e55df19b57b6c01b9a9303086)
2022-11-04 23:31:28 +00:00
Joris Hartog
5ef599b324 systemctl: support JSON output for "show-environment"
This commit adds a function which converts a bus message containing the
environment variables to a JSON object and uses this function to support
JSON formatted output for the "systemctl show-environment" command.

Fixes #21348
2021-12-06 11:40:52 +01:00
Zbigniew Jędrzejewski-Szmek
7b3cec95db tests: add spdx headers to scripts and Makefiles 2021-10-18 09:04:45 +02:00
Frantisek Sumsal
084575ff91 test: use set -eux and set -o pipefail everywhere
This should make the scripts more robust.
2021-04-13 12:08:01 +02:00
Zbigniew Jędrzejewski-Szmek
0ee994836c TEST-*: use spacing before redirection operator, but not after
<< EOF → <<EOF
> foo < bar → >foo <bar
2021-04-08 20:21:50 +02:00
Zbigniew Jędrzejewski-Szmek
4e20fe2795 TEST-*: make failure tests actually fail on failure
Here the intent was actually correct, and the tests still pass when the check
is made effective.
2021-04-08 20:21:50 +02:00
Zbigniew Jędrzejewski-Szmek
dfa633ca6a test: move TEST-26-SETENV setup to static files
Also run mask_supporting_services() here.
2020-03-28 11:46:47 +01:00