1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-08 20:58:20 +03:00

partition: use udevadm wait

This commit is contained in:
Frantisek Sumsal 2022-04-04 15:56:00 +02:00
parent c189d3bd78
commit 9b264c1dfa
2 changed files with 26 additions and 26 deletions

View File

@ -3076,27 +3076,6 @@ if conf.get('ENABLE_BINFMT') == 1
endif endif
endif endif
if conf.get('ENABLE_REPART') == 1
exe = executable(
'systemd-repart',
systemd_repart_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
libblkid,
libfdisk],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
public_programs += exe
if want_tests != 'false'
test('test-repart',
test_repart_sh,
args : exe.full_path())
endif
endif
if conf.get('ENABLE_SYSUPDATE') == 1 if conf.get('ENABLE_SYSUPDATE') == 1
exe = executable( exe = executable(
'systemd-sysupdate', 'systemd-sysupdate',
@ -3517,7 +3496,7 @@ public_programs += executable(
install : true, install : true,
install_dir : rootlibexecdir) install_dir : rootlibexecdir)
public_programs += executable( udevadm = executable(
'udevadm', 'udevadm',
udevadm_sources, udevadm_sources,
include_directories : includes, include_directories : includes,
@ -3531,6 +3510,28 @@ public_programs += executable(
install_rpath : udev_rpath, install_rpath : udev_rpath,
install : true, install : true,
install_dir : rootbindir) install_dir : rootbindir)
public_programs += udevadm
if conf.get('ENABLE_REPART') == 1
exe = executable(
'systemd-repart',
systemd_repart_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [threads,
libblkid,
libfdisk],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
public_programs += exe
if want_tests != 'false'
test('test-repart',
test_repart_sh,
args : [exe.full_path(), udevadm.full_path()])
endif
endif
executable( executable(
'systemd-shutdown', 'systemd-shutdown',

View File

@ -6,7 +6,9 @@ set -o pipefail
[[ -e /dev/loop-control ]] || exit 77 [[ -e /dev/loop-control ]] || exit 77
repart="${1:?}" repart="${1:?}"
udevadm="${2:?}"
test -x "$repart" test -x "$repart"
test -x "$udevadm"
PATH=$PATH:/sbin:/usr/sbin PATH=$PATH:/sbin:/usr/sbin
@ -199,10 +201,7 @@ $D/zzz7 : start= 6291416, size= 98304, type=0FC63DAF-8483-4772-8E79-3D
EOF EOF
LOOP="$(losetup -P --show --find "$D/zzz")" LOOP="$(losetup -P --show --find "$D/zzz")"
while : ; do "${udevadm:?}" wait --timeout 60 --initialized=yes --settle "${LOOP:?}"
test -e "$LOOP" && break
sleep .2
done
VOLUME="test-repart-$RANDOM" VOLUME="test-repart-$RANDOM"