1- From e39e00a6d92acb83283705ea66c26261ca6a0170 Mon Sep 17 00:00:00 2001
1+ From d7839d93860915b2a43c486d0fed89fee7313ec0 Mon Sep 17 00:00:00 2001
22From: Ed Santiago <
[email protected] >
33Date: Thu, 6 Oct 2022 17:32:59 -0600
44Subject: [PATCH] tweaks for running buildah tests under podman
99 1 file changed, 115 insertions(+), 4 deletions(-)
1010
1111diff --git a/tests/helpers.bash b/tests/helpers.bash
12- index 20f0787ff..c356500ae 100644
12+ index f8ab624a8..0d8f5ce69 100644
1313--- a/tests/helpers.bash
1414+++ b/tests/helpers.bash
15- @@ -79 ,6 +79 ,38 @@ EOF
15+ @@ -80 ,6 +80 ,38 @@ EOF
1616 BUILDAH_REGISTRY_OPTS="${regconfopt} ${regconfdir} --short-name-alias-conf ${TEST_SCRATCH_DIR}/cache/shortnames.conf"
1717 COPY_REGISTRY_OPTS="${BUILDAH_REGISTRY_OPTS}"
1818 PODMAN_REGISTRY_OPTS="${regconfopt}"
@@ -51,7 +51,7 @@ index 20f0787ff..c356500ae 100644
5151 }
5252
5353 function starthttpd() { # directory [working-directory-or-"" [certfile, keyfile]]
54- @@ -143 ,6 +175 ,32 @@ function teardown_tests() {
54+ @@ -144 ,6 +176 ,32 @@ function teardown_tests() {
5555 stop_git_daemon
5656 stop_registry
5757
@@ -84,7 +84,7 @@ index 20f0787ff..c356500ae 100644
8484 # Workaround for #1991 - buildah + overlayfs leaks mount points.
8585 # Many tests leave behind /var/tmp/.../root/overlay and sub-mounts;
8686 # let's find those and clean them up, otherwise 'rm -rf' fails.
87- @@ -232 ,7 +290 ,12 @@ function copy() {
87+ @@ -252 ,7 +310 ,12 @@ function copy() {
8888 }
8989
9090 function podman() {
@@ -98,7 +98,7 @@ index 20f0787ff..c356500ae 100644
9898 }
9999
100100 # There are various scenarios where we would like to execute `tests` as rootless user, however certain commands like `buildah mount`
101- @@ -296 ,8 +359 ,36 @@ function run_buildah() {
101+ @@ -316 ,8 +379 ,36 @@ function run_buildah() {
102102 --retry) retry=3; shift;; # retry network flakes
103103 esac
104104
@@ -136,7 +136,7 @@ index 20f0787ff..c356500ae 100644
136136
137137 # If session is rootless and `buildah mount` is invoked, perform unshare,
138138 # since normal user cannot mount a filesystem unless they're in a user namespace along with its own mount namespace.
139- @@ -311 ,8 +402 ,8 @@ function run_buildah() {
139+ @@ -331 ,8 +422 ,8 @@ function run_buildah() {
140140 retry=$(( retry - 1 ))
141141
142142 # stdout is only emitted upon error; this echo is to help a debugger
@@ -147,7 +147,7 @@ index 20f0787ff..c356500ae 100644
147147 # without "quotes", multiple lines are glommed together into one
148148 if [ -n "$output" ]; then
149149 echo "$output"
150- @@ -673 ,6 +764 ,26 @@ function skip_if_no_unshare() {
150+ @@ -693 ,6 +784 ,26 @@ function skip_if_no_unshare() {
151151 fi
152152 }
153153
@@ -175,5 +175,5 @@ index 20f0787ff..c356500ae 100644
175175 daemondir=${TEST_SCRATCH_DIR}/git-daemon
176176 mkdir -p ${daemondir}/repo
177177- -
178- 2.45.2
178+ 2.47.0
179179
0 commit comments