diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-01 15:03:54 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-01 15:04:13 +0100 |
commit | 5479d0f83a80810c475b14fbaf61872f4df6b20e (patch) | |
tree | 625216b6219c0f6b421545be3154ecb770ab5b29 /test | |
parent | core: split system/user job timeouts and make them configurable (diff) | |
download | systemd-5479d0f83a80810c475b14fbaf61872f4df6b20e.tar.xz systemd-5479d0f83a80810c475b14fbaf61872f4df6b20e.zip |
test: make helper_check_device_units() log unit name
Diffstat (limited to 'test')
-rwxr-xr-x | test/units/testsuite-64.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index c4406f381b..d5ccad7e64 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -89,6 +89,8 @@ check_device_unit() {( path="${2?}" unit=$(systemd-escape --path --suffix=device "$path") + [[ "$log_level" == 1 ]] && echo "INFO: check_device_unit($unit)" + syspath=$(systemctl show --value --property SysFSPath "$unit" 2>/dev/null) if [[ -z "$syspath" ]]; then [[ "$log_level" == 1 ]] && echo >&2 "ERROR: $unit not found." @@ -156,12 +158,11 @@ helper_check_device_units() {( local i - for ((i = 0; i < 20; i++)); do - (( i == 0 )) || sleep .5 - + for (( i = 0; i < 20; i++ )); do if check_device_units 0 "$@"; then return 0 fi + sleep .5 done check_device_units 1 "$@" |