Skip to content

Commit 50714d2

Browse files
Merge pull request #24526 from edsantiago/buildah-vendor-update
Buildah treadmill tweaks
2 parents b5d953e + 33398eb commit 50714d2

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

hack/buildah-vendor-treadmill

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,12 @@ sub assert_buildah_vendor_commit {
928928
}
929929

930930
if (! grep { m!^vendor/\Q$Buildah\E/! } @deltas) {
931-
push @missing, "no changes under $Buildah";
931+
# There's an infrequent corner case: changes in buildah are only in
932+
# the tests and/or vendor dirs, which are not checked out in our tree.
933+
my @go_mod_diffs = git('diff', '-U0', "$ref^", "$ref", "--", "go.mod");
934+
if (! grep { /^[-+]\s+$Buildah\s/ } @go_mod_diffs) {
935+
push @missing, "no changes under $Buildah";
936+
}
932937
}
933938

934939
return if !@missing;

test/buildah-bud/apply-podman-deltas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ skip_if_remote "--output option not implemented in podman-remote" \
241241
skip_if_remote "logfile not implemented on remote" "bud-logfile-with-split-logfile-by-platform"
242242

243243
skip_if_remote "envariables do not automatically work with -remote." \
244-
"build proxy"
244+
"build proxy" \
245+
"build-test --mount=type=secret test from env with chroot isolation"
245246

246247
# 2022-07-04 this is a new test in buildah; it's failing in treadmill
247248
skip_if_remote "FIXME FIXME FIXME: does this test make sense in remote?" \
@@ -260,6 +261,9 @@ skip_if_remote "--events-backend does not work with podman-remote" \
260261
skip_if_remote "--cert-dir option not working via remote and retry warnings are printed on the server" \
261262
"build add https retry ca"
262263

264+
skip_if_remote "Weird. This used to work remote, until Ed set TMPDIR in #5804" \
265+
"bud-with-mount-cache-like-buildkit with buildah prune should clear the cache"
266+
263267
###############################################################################
264268
# BEGIN tests which are skipped due to actual podman or podman-remote bugs.
265269

test/buildah-bud/buildah-tests.diff

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From e39e00a6d92acb83283705ea66c26261ca6a0170 Mon Sep 17 00:00:00 2001
1+
From d7839d93860915b2a43c486d0fed89fee7313ec0 Mon Sep 17 00:00:00 2001
22
From: Ed Santiago <[email protected]>
33
Date: Thu, 6 Oct 2022 17:32:59 -0600
44
Subject: [PATCH] tweaks for running buildah tests under podman
@@ -9,10 +9,10 @@ Signed-off-by: Ed Santiago <[email protected]>
99
1 file changed, 115 insertions(+), 4 deletions(-)
1010

1111
diff --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

Comments
 (0)