diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 370e8f01ed..dc31ce4da3 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -808,6 +808,10 @@ prep_root() { local r=${1}; shift local h=${1}; shift + if [[ -d ${r} ]]; then + die "${r@Q} is being reused as a root, possibly a result of copy-pasting some test case and forgetting to rename the root directory name" + fi + mkdir -p "${r}${h}" "${r}/usr/lib" "${r}/var/lib/extensions" "${r}/var/lib/extensions.mutable" }