From: Krzesimir Nowak Date: Tue, 19 Mar 2024 13:40:57 +0000 (+0100) Subject: test: Fail sysext test if reusing a root directory X-Git-Tag: v256-rc1~405^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73cfa16d1695e3ba8b62c4f1db0625c14b1f16a9;p=thirdparty%2Fsystemd.git test: Fail sysext test if reusing a root directory --- diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 370e8f01ed3..dc31ce4da36 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" }