Commit graph

4 commits

Author SHA1 Message Date
Ed Santiago c8cffe1b35 system tests: socket activation: clean up
Multiarch folks are seeing flakes in this test. I can't reproduce
them, but I did notice that the test isn't doing the best possible
job of reporting failures nor of confirming what it purports to test.

Major fix here is to check the exit status of each curl: if we
see the flake again, that will help us track down the failure.

Other fixes are just refactoring, cleanup, and disambiguation
(using the random service name consistently)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-10-18 08:47:15 -06:00
Ed Santiago 86083c580b System tests: speed up. They've gotten too slow.
- logs: remove unnecessary sleeps. This saves ~25s.
   Unfortunately, journald seems to have some sort of lag,
   so we need to keep retrying until we get the 'after' string.

 - ps: add placeholder test for once buildah 3544 is fixed

 - cp: bulk-kill containers when finished, instead of one by one.
   This is a big change and only saves about 8s per run, but hey.

 - mount,pause,healthcheck: 'podman stop -t 0' before rm'ing containers.
   Easy 50s.
   Have I mentioned, lately, that 'podman rm -f' needs a '-t 0' flag?

 - play: same, and also 'podman pod stop'. Seems to shave ~20s.

 - socket-activation: UGH! Buggy and useless tests! They were
   running "sleep 90" containers for no reason whatsoever. I
   assume the intention was to run them with "-d", so that's
   what I've done here. Also fixed some language. 180 seconds!

(Unrelated: cleanup in 070-build, use $IMAGE, not alpine)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-09-27 20:06:18 -06:00
Ed Santiago 313c7118ea system tests: cleaner, safer use of systemd
First and foremost: use ephemeral (/run, $XDG) directories
for systemd unit files, so as not to vandalize a working system.

Second, refactor common systemd-related functionality into
a new helper file, loaded by the systemd-related tests.
Shared functionality includes:

  * setting $XDG_RUNTIME_DIR if unset and rootless
  * setting $UNIT_DIR for use by tests
  * new systemctl() and journalctl() functions, which
    include "--user" when rootless (why can't systemd
    figure this out on its own?)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2021-07-20 08:57:26 -06:00
pendulm 11917a1a6b Move socket activation check into init() and set global condition.
So rootless setup could use this condition in parent and child, child
podman should adjust LISTEN_PID to its self PID.

Add system test for systemd socket activation

Signed-off-by: pendulm <lonependulm@gmail.com>
2021-04-05 17:43:11 +08:00