Skip to content

Commit

Permalink
Merge pull request #1312 from giuseppe/improve-podman-tests
Browse files Browse the repository at this point in the history
tests: some small improvements and enable overlay driver for podman
  • Loading branch information
flouthoc authored Sep 27, 2023
2 parents 78384e5 + 8f6b76f commit c7db23d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
8 changes: 7 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,14 @@ BUILT_SOURCES = .version git-version.h

CLEANFILES = crun.spec .version git-version.h $(LUACRUN_ROCKSPEC)

man1_MANS =

if ENABLE_CRUN
man1_MANS = crun.1 krun.1
man1_MANS += crun.1
endif

if ENABLE_KRUN
man1_MANS += krun.1
endif

crun.1: $(abs_srcdir)/crun.1.md
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ AS_IF([test "x$with_wasmedge" = "xyes"], AC_CHECK_HEADERS([wasmedge/wasmedge.h],
dnl include support for libkrun (EXPERIMENTAL)
AC_ARG_WITH([libkrun], AS_HELP_STRING([--with-libkrun], [build with libkrun support]))
AS_IF([test "x$with_libkrun" = "xyes"], AC_CHECK_HEADERS([libkrun.h], AC_DEFINE([HAVE_LIBKRUN], 1, [Define if libkrun is available]), [AC_MSG_ERROR([*** Missing libkrun headers])]))

AM_CONDITIONAL([ENABLE_KRUN], [test "x$with_libkrun" = xyes])


dnl libseccomp
AC_ARG_ENABLE([seccomp],
AS_HELP_STRING([--disable-seccomp], [Ignore libseccomp and disable support]))
Expand Down
3 changes: 0 additions & 3 deletions rpm/crun.spec
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ rm -rf %{buildroot}%{_prefix}/lib*

%if %{defined krun_support}
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun
%else
# remove krun man page if krun not supported
rm -f %{buildroot}%{_mandir}/man1/krun.1
%endif

%if %{defined wasm_support}
Expand Down
17 changes: 10 additions & 7 deletions tests/podman/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ if test "$(id -u)" != 0; then
exit 1
fi

set -e
set -xeuo pipefail

(
cd /crun
git config --global --add safe.directory /crun
Expand All @@ -16,9 +17,13 @@ make -j "$(nproc)"
make install
)

uname -a
cat /proc/self/mountinfo

export OCI_RUNTIME=/usr/bin/crun
export CGROUP_MANAGER=cgroupfs
export STORAGE_OPTIONS="--storage-driver=vfs"
export STORAGE_OPTIONS="--storage-driver=overlay"
export STORAGE_FS="overlay"

export GO111MODULE=off

Expand All @@ -37,13 +42,11 @@ export TMPDIR=/var/tmp
# - notify_socket
#
# - podman run exit 12*|podman run exit code on failure to exec|failed to start
# assumption that "create" must fail if the executable is not found. We must add lookup for the executable in $PATH to mimic the runc behavior.
# device-cgroup-rule|capabilities|network|overlay volume flag|prune removes a pod with a stopped container: not working on github actions
#
# - Podman run with specified static IPv6 has correct IP
# Does not work inside test environment.


ginkgo --focus='.*' --skip='.*(selinux|notify_socket|systemd|podman run exit 12*|podman run exit code on failure to exec|failed to start|search|trust|inspect|logs|generate|import|mounted rw|inherit host devices|play kube|cgroups=disabled|privileged CapEff|device-cgroup-rule|capabilities|network|pull from docker|--add-host|removes a pod with a container|prune removes a pod with a stopped container|overlay volume flag|prune unused images|podman images filter|image list filter|create --pull|podman ps json format|using journald for container|image tree|--pull|shared layers|child images|cached images|flag with multiple mounts|overlay and used as workdir|image_copy_tmp_dir|Podman run with specified static IPv6 has correct IP|authenticated push|pod create --share-parent|podman kill paused container|login and logout|podman top on privileged container|local registry with authorization|podman update container all options v2|push test|uidmapping and gidmapping with a volume|uidmapping and gidmapping with an idmapped volume|Podman kube play).*' \
-v -tags "seccomp ostree selinux varlink exclude_graphdriver_devicemapper" \
-timeout=50m -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
ginkgo --focus='.*' --skip='.*(selinux|notify_socket|systemd|podman run exit 12*|podman run exit code on failure to exec|failed to start|search|trust|inspect|logs|generate|import|mounted rw|inherit host devices|play kube|cgroups=disabled|privileged CapEff|device-cgroup-rule|capabilities|network|pull from docker|--add-host|removes a pod with a container|prune removes a pod with a stopped container|overlay volume flag|prune unused images|podman images filter|image list filter|create --pull|podman ps json format|using journald for container|image tree|--pull|shared layers|child images|cached images|flag with multiple mounts|overlay and used as workdir|image_copy_tmp_dir|Podman run with specified static IPv6 has correct IP|authenticated push|pod create --share-parent|podman kill paused container|login and logout|podman top on privileged container|local registry with authorization|podman update container all options v2|push test|podman pull and run on split imagestore|Podman kube play|uidmapping and gidmapping).*' \
-vv -tags "seccomp ostree selinux exclude_graphdriver_devicemapper" \
-timeout=50m -cover -flake-attempts 3 -progress -trace -no-color test/e2e/.

1 comment on commit c7db23d

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.