From 8d0a03b5a22df6f764686386edde6b90d290b8e4 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Mon, 11 Dec 2023 13:48:42 -0500 Subject: [PATCH] Fix tests after last rename (`path` -> `pathInLowerStore`) --- .../check-post-init-inner.sh | 20 +++++++++---------- .../redundant-add-inner.sh | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/functional/local-overlay-store/check-post-init-inner.sh b/tests/functional/local-overlay-store/check-post-init-inner.sh index ccc0461a3..ac2499002 100755 --- a/tests/functional/local-overlay-store/check-post-init-inner.sh +++ b/tests/functional/local-overlay-store/check-post-init-inner.sh @@ -19,13 +19,13 @@ mountOverlayfs ### Check status # Checking for path in lower layer -stat $(toRealPath "$storeA/nix/store" "$path") +stat $(toRealPath "$storeA/nix/store" "$pathInLowerStore") # Checking for path in upper layer (should fail) -expect 1 stat $(toRealPath "$storeBTop" "$path") +expect 1 stat $(toRealPath "$storeBTop" "$pathInLowerStore") # Checking for path in overlay store matching lower layer -diff $(toRealPath "$storeA/nix/store" "$path") $(toRealPath "$storeBRoot/nix/store" "$path") +diff $(toRealPath "$storeA/nix/store" "$pathInLowerStore") $(toRealPath "$storeBRoot/nix/store" "$pathInLowerStore") # Checking requisites query agreement [[ \ @@ -44,9 +44,9 @@ busyboxStore=$(nix store --store $storeA add-path $busybox) # Checking derivers query agreement [[ \ - $(nix-store --store $storeA --query --deriver $path) \ + $(nix-store --store $storeA --query --deriver $pathInLowerStore) \ == \ - $(nix-store --store $storeB --query --deriver $path) \ + $(nix-store --store $storeB --query --deriver $pathInLowerStore) \ ]] # Checking outputs query agreement @@ -57,15 +57,15 @@ busyboxStore=$(nix store --store $storeA add-path $busybox) ]] # Verifying path in lower layer -nix-store --verify-path --store "$storeA" "$path" +nix-store --verify-path --store "$storeA" "$pathInLowerStore" # Verifying path in merged-store -nix-store --verify-path --store "$storeB" "$path" +nix-store --verify-path --store "$storeB" "$pathInLowerStore" -hashPart=$(echo $path | sed "s^${NIX_STORE_DIR:-/nix/store}/^^" | sed 's/-.*//') +hashPart=$(echo $pathInLowerStore | sed "s^${NIX_STORE_DIR:-/nix/store}/^^" | sed 's/-.*//') # Lower store can find from hash part -[[ $(nix store --store $storeA path-from-hash-part $hashPart) == $path ]] +[[ $(nix store --store $storeA path-from-hash-part $hashPart) == $pathInLowerStore ]] # merged store can find from hash part -[[ $(nix store --store $storeB path-from-hash-part $hashPart) == $path ]] +[[ $(nix store --store $storeB path-from-hash-part $hashPart) == $pathInLowerStore ]] diff --git a/tests/functional/local-overlay-store/redundant-add-inner.sh b/tests/functional/local-overlay-store/redundant-add-inner.sh index d2c95b187..e37ef90e5 100755 --- a/tests/functional/local-overlay-store/redundant-add-inner.sh +++ b/tests/functional/local-overlay-store/redundant-add-inner.sh @@ -19,17 +19,17 @@ mountOverlayfs ### Do a redundant add # (Already done in `initLowerStore`, but repeated here for clarity.) -path=$(nix-store --store "$storeA" --add ../dummy) +pathInLowerStore=$(nix-store --store "$storeA" --add ../dummy) # upper layer should not have it -expect 1 stat $(toRealPath "$storeBTop/nix/store" "$path") +expect 1 stat $(toRealPath "$storeBTop/nix/store" "$pathInLowerStore") pathFromB=$(nix-store --store "$storeB" --add ../dummy) -[[ $path == $pathFromB ]] +[[ $pathInLowerStore == $pathFromB ]] # lower store should have it from before -stat $(toRealPath "$storeA/nix/store" "$path") +stat $(toRealPath "$storeA/nix/store" "$pathInLowerStore") # upper layer should still not have it (no redundant copy) -expect 1 stat $(toRealPath "$storeBTop" "$path") +expect 1 stat $(toRealPath "$storeBTop" "$pathInLowerStore")