]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: ignore tty* devices when checking device units
authorFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 27 Sep 2022 11:06:27 +0000 (13:06 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Tue, 27 Sep 2022 13:10:18 +0000 (15:10 +0200)
This lower the runtime of `check_device_units()` in a plain QEMU VM from
~45 seconds to ~25 seconds.

test/units/testsuite-64.sh

index 505e949c0940398d13db3ae96ac2ddc61e19ef39..58f96ecce8f8cafc9156aad2deca467e5cf828dd 100755 (executable)
@@ -149,7 +149,7 @@ check_device_units() {(
         if ! check_device_unit "$log_level" "$path"; then
            return 1
         fi
-    done < <(systemctl list-units --all --type=device --no-legend dev-* | awk '{ print $1 }' | sed -e 's/\.device$//')
+    done < <(systemctl list-units --all --type=device --no-legend dev-* | awk '$1 !~ /dev-tty.+/ { print $1 }' | sed -e 's/\.device$//')
 
     return 0
 )}