2023-05-15 22:34:57 +03:00
|
|
|
source common.sh
|
2024-05-06 16:42:49 +03:00
|
|
|
source ../common/init.sh
|
2023-05-15 22:34:57 +03:00
|
|
|
|
|
|
|
requireEnvironment
|
|
|
|
setupConfig
|
2023-12-11 20:30:40 +02:00
|
|
|
setupStoreDirs
|
2023-05-15 22:34:57 +03:00
|
|
|
|
|
|
|
mkdir -p $TEST_ROOT/bad_test
|
|
|
|
badTestRoot=$TEST_ROOT/bad_test
|
2023-10-25 22:29:11 +03:00
|
|
|
storeBadRoot="local-overlay://?root=$badTestRoot&lower-store=$storeA&upper-layer=$storeBTop"
|
|
|
|
storeBadLower="local-overlay://?root=$storeBRoot&lower-store=$badTestRoot&upper-layer=$storeBTop"
|
|
|
|
storeBadUpper="local-overlay://?root=$storeBRoot&lower-store=$storeA&upper-layer=$badTestRoot"
|
2023-05-15 22:34:57 +03:00
|
|
|
|
|
|
|
declare -a storesBad=(
|
|
|
|
"$storeBadRoot" "$storeBadLower" "$storeBadUpper"
|
|
|
|
)
|
|
|
|
|
|
|
|
for i in "${storesBad[@]}"; do
|
|
|
|
echo $i
|
|
|
|
unshare --mount --map-root-user bash <<EOF
|
|
|
|
source common.sh
|
2023-12-11 20:30:40 +02:00
|
|
|
setupStoreDirs
|
2023-05-15 22:34:57 +03:00
|
|
|
mountOverlayfs
|
|
|
|
expectStderr 1 nix doctor --store "$i" | grepQuiet "overlay filesystem .* mounted incorrectly"
|
|
|
|
EOF
|
|
|
|
done
|