]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: don't ignore non-existent paths in inst_recursive()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 7 Nov 2022 10:55:29 +0000 (11:55 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 7 Nov 2022 11:18:49 +0000 (12:18 +0100)
The process substitution in the while loop hides errors raised by the
find utility, which might (and did), in turn, hide errors in test setup.

test/test-functions

index 16d9da637bf881ed447e1764aa3e6e4de7614ec1..80ce383e647eb3f0abb9865f8ce19cd9c2eb8a76 100644 (file)
@@ -2773,6 +2773,10 @@ inst_recursive() {
     local p item
 
     for p in "$@"; do
+        # Make sure the source exists, as the process substitution below
+        # suppresses errors
+        stat "$p" >/dev/null || return 1
+
         while read -r item; do
             if [[ -d "$item" ]]; then
                 inst_dir "$item"