From 1a13757880479921966adeca839cf182b3ffcbd0 Mon Sep 17 00:00:00 2001 From: cidkidnix Date: Thu, 13 Jul 2023 14:17:22 -0500 Subject: [PATCH] Add comment regarding the unset of NIX_STORE_DIR in build-remote.sh and supplementary-groups.sh --- tests/build-remote.sh | 1 + tests/supplementary-groups.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/tests/build-remote.sh b/tests/build-remote.sh index 78e12b477..d2a2132c1 100644 --- a/tests/build-remote.sh +++ b/tests/build-remote.sh @@ -1,6 +1,7 @@ requireSandboxSupport [[ $busybox =~ busybox ]] || skipTest "no busybox" +# Avoid store dir being inside sandbox build-dir unset NIX_STORE_DIR unset NIX_STATE_DIR diff --git a/tests/supplementary-groups.sh b/tests/supplementary-groups.sh index 47c6ef605..474ba7503 100644 --- a/tests/supplementary-groups.sh +++ b/tests/supplementary-groups.sh @@ -5,6 +5,10 @@ requireSandboxSupport if ! command -p -v unshare; then skipTest "Need unshare"; fi needLocalStore "The test uses --store always so we would just be bypassing the daemon" +# Avoid store dir being inside sandbox build-dir +unset NIX_STORE_DIR +unset NIX_STATE_DIR + unshare --mount --map-root-user bash <