mirror of
https://github.com/systemd/systemd.git
synced 2024-12-27 07:22:31 +03:00
808b65a087
6 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Zbigniew Jędrzejewski-Szmek
|
22d3cfe54c |
tests: add spdx license header to test unit/link/network/conf files
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. |
||
Zbigniew Jędrzejewski-Szmek
|
4cce6f2524 |
test-path: start infinite sleep instead of a short command
The test sometimes fails, e.g. in bionic-s390x ci. I think it might be because the service binary exits before we get a chance to notice that it is running: 13:59:31 --- Listing only the last 100 lines from a long log. --- 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4639845) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4539608) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4439376) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4338946) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4238702) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4138424) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 4038116) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3937835) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3837553) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3737250) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3636934) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3536622) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3436318) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3336021) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3235730) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3135468) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 3035158) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2934855) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2834541) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2732511) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2632255) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2532014) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2431746) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2331438) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2231213) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2130952) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 2030663) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1930428) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1830172) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1729906) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1629652) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1529368) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1429110) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1328852) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1228593) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1128320) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 1028083) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 927824) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 827564) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 724935) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 624664) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 524411) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 424124) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 323853) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 223585) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 120356) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: 18053) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 line 293: path-unit.path: state = running; result = success (left: -82385) 13:59:31 line 293: path-mycustomunit.service: state = exited; result = success 13:59:31 Test timeout when testing path-unit.path It seems test/test-path/path-service.service wasn't actually used for anything. |
||
Zbigniew Jędrzejewski-Szmek
|
333d102c64 |
test-path: use Type=exec
In general, Type=exec is superior to Type=simple. Let's not assume that the service is started before it was really started. |
||
Michael Chapman
|
708961c701 |
core/path: recheck path specs when triggered unit changes state
As documented in systemd.path(5): When a service unit triggered by a path unit terminates (regardless whether it exited successfully or failed), monitored paths are checked immediately again, and the service accordingly restarted instantly. This commit implements this behaviour for PathExists=, PathExistsGlob=, and DirectoryNotEmpty=. These predicates are essentially "level-triggered": the service should be activated whenever the predicate is true. PathChanged= and PathModified=, on the other hand, are "edge-triggered": the service should only be activated when the predicate *becomes* true. The behaviour has been broken since at least as far back as commit |
||
Zbigniew Jędrzejewski-Szmek
|
f55198f034 |
test: replace symlinks with actual unit files
During installation, meson complains: > Installing /home/zbyszek/src/systemd-work/test/units/sysinit.target to /var/tmp/systemd-test.Q1FSuj/root/usr/lib/systemd/tests/testdata/units > Warning: trying to copy a symlink that points to a file. This will copy the file, > but this will be changed in a future version of Meson to copy the symlink as is. Please update your > build definitions so that it will not break when the change happens. It *is* convenient to have those files as symlinks, but it is also confusing, because symlinks create aliases, and it seems that in those cases we actually don't want aliases (at least in the case of loopy*.service that'd make the test pointless). |
||
Ronny Chevalier
|
aa8e00da54 |
test-path: move all related test files to a specific directory
To avoid polluting test/ |