Commit Graph

3 Commits

Author SHA1 Message Date
Frantisek Sumsal 2e7090e94d test: bump the TEST-47 sleeps once again
Several recent failed runs show that the test is still racy in two ways:

1) Sometimes it takes a while before the PID file is created, leading
   to:

```
[   10.950540] testsuite-47.sh[308]: ++ cat /leakedtestpid
[   10.959712] testsuite-47.sh[308]: cat: /leakedtestpid: No such file or directory
[   10.959824] testsuite-47.sh[298]: + leaked_pid=
```

2) Again, sometimes we check the leaked PID before the unit is actually
   stopped, leading to a false negative:

```
[   18.099599] testsuite-47.sh[346]: ++ cat /leakedtestpid
[   18.116462] testsuite-47.sh[333]: + leaked_pid=342
[   18.117101] testsuite-47.sh[333]: + systemctl stop testsuite-47-repro
...
[   20.033907] testsuite-47.sh[333]: + ps -p 342
[   20.080050] testsuite-47.sh[351]:     PID TTY          TIME CMD
[   20.080050] testsuite-47.sh[351]:     342 ?        00:00:00 sleep
[   20.082040] testsuite-47.sh[333]: + exit 42
```
2020-07-08 22:09:55 +02:00
Frantisek Sumsal e00e2e0b50 test: wait a bit after stopping the test service
Give systemd a chance to process the stop event before checking if the
PID has indeed leaked. This should fix the intermittent test fails in CI
even with a fixed systemd version, like this one:

```
Apr 08 10:22:09 testsuite-47.sh[345]: ++ cat /leakedtestpid
Apr 08 10:22:09 testsuite-47.sh[334]: + leaked_pid=342
Apr 08 10:22:09 testsuite-47.sh[334]: + systemctl stop testsuite-47-repro
Apr 08 10:22:10 testsuite-47.sh[334]: + ps -p 342
Apr 08 10:22:10 testsuite-47.sh[348]:     PID TTY          TIME CMD
Apr 08 10:22:10 testsuite-47.sh[348]:     342 ?        00:00:00 sleep
Apr 08 10:22:10 testsuite-47.sh[334]: + exit 42
```

Followup to 197298ff9f
2020-04-08 12:15:52 +02:00
Zbigniew Jędrzejewski-Szmek bdfa9657d0 test: move TEST-47-* to static files 2020-03-28 11:50:53 +01:00
Renamed from test/TEST-47-ISSUE-14566/testsuite.sh (Browse further)