diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2020-03-14 10:36:17 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-03-16 12:28:14 +0900 |
commit | 197298ff9fc930de450330095cc5b67d165d0801 (patch) | |
tree | 0998fe5374341788be550cf71ed52f23649bc030 /test | |
parent | 9790ca75fc2a2646949a5bfb1f3ce8691fe71991 (diff) | |
download | systemd-197298ff9fc930de450330095cc5b67d165d0801.tar.gz |
test: wait a bit after starting the test service
otherwise we might end up being faster than the unit itself, causing
unexpected fails, like:
```
testsuite.sh[297]: + systemctl start issue_14566_test
testsuite.sh[297]: + systemctl status issue_14566_test
testsuite.sh[304]: ● issue_14566_test.service - Issue 14566 Repro
testsuite.sh[304]: Loaded: loaded (/etc/systemd/system/issue_14566_test.service; static; vendor preset: enabled)
testsuite.sh[304]: Active: active (running) since Sat 2020-03-14 02:02:23 UTC; 417ms ago
testsuite.sh[304]: Main PID: 301 ((repro.sh))
testsuite.sh[304]: Tasks: 1 (limit: 535)
testsuite.sh[304]: Memory: 180.0K
testsuite.sh[304]: CPU: 122ms
testsuite.sh[304]: CGroup: /system.slice/issue_14566_test.service
testsuite.sh[304]: └─301 [(repro.sh)]
testsuite.sh[307]: ++ cat /leakedtestpid
testsuite.sh[307]: cat: /leakedtestpid: No such file or directory
testsuite.sh[297]: + leaked_pid=
```
Diffstat (limited to 'test')
-rwxr-xr-x | test/TEST-47-ISSUE-14566/testsuite.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/TEST-47-ISSUE-14566/testsuite.sh b/test/TEST-47-ISSUE-14566/testsuite.sh index d917cf52ff..a0ba32530e 100755 --- a/test/TEST-47-ISSUE-14566/testsuite.sh +++ b/test/TEST-47-ISSUE-14566/testsuite.sh @@ -6,6 +6,7 @@ systemd-analyze log-level debug systemd-analyze log-target console systemctl start issue_14566_test +sleep 1 systemctl status issue_14566_test leaked_pid=$(cat /leakedtestpid) |