Skip to content

Commit

Permalink
Don't stack overlays in test-suite
Browse files Browse the repository at this point in the history
Rather than using the root overlay mount in the rpmtests container as
our lowerdir for per test mounts, just use the original lowerdir from
the host.

This eliminates the extra level of indirection and enables us to use a
podman image mount as the lowerdir (to be done later) as otherwise we
would hit the kernel's limit for maximum fs stacking depth of 2.

Keep the podman backend as is (using "/"), we'll remove it soon anyway.

No functional change.
  • Loading branch information
dmnks authored and pmatilai committed Oct 11, 2023
1 parent 3fe6c98 commit 03dd074
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions tests/atlocal.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
RPMTREE=/

RPMLIBDIR="@CMAKE_INSTALL_FULL_LIBDIR@"
export RPMLIBDIR

HAVE_UNSHARE=@HAVE_UNSHARE@
PYTHON=@PYTHON@
PGP=@PGP@

RPMTEST="$RPMTREE"
RPMTREE=${RPMTREE:-/}
RPMTEST=/
RPMDATA="/data/"

RPM_CONFIGDIR_PATH="@RPM_CONFIGDIR@"
Expand Down
2 changes: 1 addition & 1 deletion tests/mktree.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ case $CMD in
;;
check)
mount_tree
snapshot exec --tmpfs /tmp --bind $PWD $PWD \
snapshot exec --tmpfs /tmp --bind $PWD $PWD --setenv RPMTREE $RPMTREE \
sh -c 'cd '$PWD' && exec ./rpmtests "$@"' rpmtests "$@"
;;
reset)
Expand Down
2 changes: 1 addition & 1 deletion tests/mktree.podman
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ case $CMD in
esac
$PODMAN run --privileged -it --rm --read-only --tmpfs /tmp \
-v /srv --workdir /srv -e ROOTLESS=$ROOTLESS \
$OPTS $IMAGE mktree check "$@"
--env RPMTREE=/ $OPTS $IMAGE mktree check "$@"
;;
reset)
$PODMAN stop $NAME >/dev/null &&
Expand Down

0 comments on commit 03dd074

Please sign in to comment.