diff options
author | Chris Evich <cevich@redhat.com> | 2019-07-12 10:32:12 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-07-16 14:30:42 -0400 |
commit | f58b754c8d3a45b8d9123c624bf299b87285c3bf (patch) | |
tree | d6cb0b59cea580450d6d76bbc9ab65fca4516ac8 | |
parent | efdb7ad8f2da30c0d1de07d54cc81027aa8720c9 (diff) | |
download | podman-f58b754c8d3a45b8d9123c624bf299b87285c3bf.tar.gz podman-f58b754c8d3a45b8d9123c624bf299b87285c3bf.tar.bz2 podman-f58b754c8d3a45b8d9123c624bf299b87285c3bf.zip |
Cirrus: Add image-test for locked dpkg
Signed-off-by: Chris Evich <cevich@redhat.com>
-rwxr-xr-x | contrib/cirrus/check_image.sh | 6 | ||||
-rw-r--r-- | contrib/cirrus/lib.sh | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/contrib/cirrus/check_image.sh b/contrib/cirrus/check_image.sh index 67e807d61..690a38119 100755 --- a/contrib/cirrus/check_image.sh +++ b/contrib/cirrus/check_image.sh @@ -36,4 +36,10 @@ do "$(systemctl list-unit-files --no-legend $REQ_UNIT)" = "$REQ_UNIT enabled" || let "RET+=1" done +# Exits zero if any unit matching pattern is running +UNIT_STATUS=$(systemctl is-active $EVIL_UNITS; echo $?) +item_test "No interfering background units are active:" \ + "$UNIT_STATUS" -ne "0" || let "RET+=1" + +echo "Total failed tests: $RET" exit $RET diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index ab3c5642d..a9da3f4ce 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -78,6 +78,9 @@ ROOTLESS_ENV_RE='(CIRRUS_.+)|(ROOTLESS_.+)|(.+_IMAGE.*)|(.+_BASE)|(.*DIRPATH)|(. # Unsafe env. vars for display SECRET_ENV_RE='(IRCID)|(ACCOUNT)|(^GC[EP]..+)|(SSH)' +# Names of systemd units which should never be running +EVIL_UNITS="cron crond atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean" + SPECIALMODE="${SPECIALMODE:-none}" TEST_REMOTE_CLIENT="${TEST_REMOTE_CLIENT:-false}" export CONTAINER_RUNTIME=${CONTAINER_RUNTIME:-podman} @@ -351,9 +354,9 @@ remove_packaged_podman_files(){ } systemd_banish(){ - echo "Disabling periodic services that could destabalize testing:" + echo "Disabling periodic services that could destabilize testing:" set +e # Not all of these exist on every platform - for unit in cron atd apt-daily-upgrade apt-daily fstrim motd-news systemd-tmpfiles-clean + for unit in $EVIL_UNITS do ooe.sh sudo systemctl stop $unit ooe.sh sudo systemctl disable $unit |