test: check the skip condition before installing additional files
authorLuca Boccassi <bluca@debian.org>
Sun, 16 Jun 2024 12:41:50 +0000 (13:41 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 18 Jun 2024 18:41:01 +0000 (20:41 +0200)
(cherry picked from commit e1daedb4be6d8180790e0b303872fb1c87ddc7fc)

test/units/TEST-43-PRIVATEUSER-UNPRIV.sh

index 165af47f152691bfc51d41b7024017ee08188bd5..f8a2a624676a1065fa88c09da1cdb48fe75161a3 100755 (executable)
@@ -6,13 +6,13 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-install_extension_images
-
 if [[ "$(sysctl -ne kernel.apparmor_restrict_unprivileged_userns)" -eq 1 ]]; then
     echo "Cannot create unprivileged user namespaces" >/skipped
     exit 77
 fi
 
+install_extension_images
+
 systemd-analyze log-level debug
 
 runas testuser systemd-run --wait --user --unit=test-private-users \