From 3858fc1d019d13fe3378c129d133fd22789ac0dc Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Wed, 29 Jul 2020 14:39:02 -0400 Subject: Use runtime names instead of paths in E2E tests My patches to fix `--runtime /usr/bin/crun` being allowed to use a different version of the crun runtime revealed a problem: we were actually relying on that exact behavior in our E2E tests. We specified the runtime path as `/usr/bin/runc` for the Ubuntu tests, but that didn't exist, so Podman was actively looking for a different, usable runc binary and using that, instead of the path we explicitly hardcoded. Fixing the bug broke this, and thus broke the tests. Instead of hard-coding OCI runtime paths, swap to just using the runtime name, `runc` or `crun`, and letting Podman figure out where the runtime lives - it's quite good at that. This should un-break the tests and make them more durable. Signed-off-by: Matthew Heon --- contrib/cirrus/setup_environment.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'contrib') diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh index 1b992711f..df5280439 100755 --- a/contrib/cirrus/setup_environment.sh +++ b/contrib/cirrus/setup_environment.sh @@ -52,7 +52,7 @@ case "$CG_FS_TYPE" in if [[ "$OS_RELEASE_ID" == "ubuntu" ]]; then echo "export OCI_RUNTIME=/usr/lib/cri-o-runc/sbin/runc" >> /etc/environment else - echo "export OCI_RUNTIME=/usr/bin/runc" >> /etc/environment + echo "export OCI_RUNTIME=runc" >> /etc/environment fi fi ;; @@ -61,7 +61,7 @@ case "$CG_FS_TYPE" in # This is necessary since we've built/installed from source, # which uses runc as the default. warn "Forcing testing with crun instead of runc" - echo "export OCI_RUNTIME=/usr/bin/crun" >> /etc/environment + echo "export OCI_RUNTIME=crun" >> /etc/environment fi ;; *) die_unknown CG_FS_TYPE @@ -127,6 +127,9 @@ case "$PRIV_NAME" in echo "$_suns" >> /etc/environment source /etc/environment fi + +# Reload to incorporate any changes from above +source "$SCRIPT_BASE/lib.sh" ;; rootless) _ru="export ROOTLESS_USER='${ROOTLESS_USER:-some${RANDOM}dude}'" -- cgit v1.2.3-54-g00ecf