summaryrefslogtreecommitdiff
path: root/contrib/cirrus/check_image.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-07-30 08:46:13 -0400
committerChris Evich <cevich@redhat.com>2019-08-12 12:01:55 -0400
commit5f99703594414039b9e7e1b615687d009f21d7c4 (patch)
tree983000fb303d8cb7f8bce936bd5be1b569e95463 /contrib/cirrus/check_image.sh
parent7508179ed973a1ad0d26754d39180be8066c7df4 (diff)
downloadpodman-5f99703594414039b9e7e1b615687d009f21d7c4.tar.gz
podman-5f99703594414039b9e7e1b615687d009f21d7c4.tar.bz2
podman-5f99703594414039b9e7e1b615687d009f21d7c4.zip
Cirrus: Add verification for cgroupv2 image
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/check_image.sh')
-rwxr-xr-xcontrib/cirrus/check_image.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/cirrus/check_image.sh b/contrib/cirrus/check_image.sh
index 8a9fbae1d..c8e8c4c63 100755
--- a/contrib/cirrus/check_image.sh
+++ b/contrib/cirrus/check_image.sh
@@ -4,6 +4,8 @@ set -eo pipefail
source $(dirname $0)/lib.sh
+req_env_var PACKER_BUILDER_NAME TEST_REMOTE_CLIENT EVIL_UNITS OS_RELEASE_ID
+
NFAILS=0
echo "Validating VM image"
@@ -49,5 +51,16 @@ then
item_test "On ubuntu /usr/bin/runc is /usr/lib/cri-o-runc/sbin/runc" "$SAMESAME" -eq "0" || let "NFAILS+=1"
fi
+echo "Checking items specific to ${PACKER_BUILDER_NAME}${BUILT_IMAGE_SUFFIX}"
+case "$PACKER_BUILDER_NAME" in
+ xfedora*)
+ echo "Kernel Command-line: $(cat /proc/cmdline)"
+ item_test \
+ "On ${PACKER_BUILDER_NAME} images, the /sys/fs/cgroup/unified directory does NOT exist" \
+ "!" "-d" "/sys/fs/cgroup/unified" || let "NFAILS+=1"
+ ;;
+ *) echo "No vm-image specific items to check"
+esac
+
echo "Total failed tests: $NFAILS"
exit $NFAILS