]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: make helper_check_device_symlinks() less verbose
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 14 Sep 2021 12:36:04 +0000 (14:36 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 14 Sep 2021 17:15:13 +0000 (19:15 +0200)
test/units/testsuite-64.sh

index b721ffd07fad3b7677fd5d156a250c396647d456..5f68a5f1ede2ffbcce2632d1027cde3343316d9a 100755 (executable)
@@ -7,12 +7,17 @@ set -o pipefail
 # Check if all symlinks under /dev/disk/ are valid
 # shellcheck disable=SC2120
 helper_check_device_symlinks() {
+    # Disable verbose logging only for this function (and reset the signal handler
+    # when leaving the function)
+    set +x; trap "trap - RETURN; set -x" RETURN
+
     local dev link paths target
 
     [[ $# -gt 0 ]] && paths=("$@") || paths=("/dev/disk")
 
     while read -r link; do
         target="$(readlink -f "$link")"
+        echo "$link -> $target"
         # Both checks should do virtually the same thing, but check both to be
         # on the safe side
         if [[ ! -e "$link" || ! -e "$target" ]]; then