1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-24 17:57:48 +03:00

tests: better synchronization

This commit is contained in:
Zdenek Kabelac 2023-10-15 21:42:20 +02:00
parent dfaa891281
commit 098bc780a2
2 changed files with 8 additions and 2 deletions

View File

@ -73,8 +73,10 @@ int main (int argc, char *argv[])
(void) dm_task_run(dmt);
(void) dm_task_destroy(dmt);
(void) dm_udev_wait(cookie); /* Finish udev processing */
printf("Created device: %s\n", devname);
}
fflush(stdout);
/* At this point there should be no memory trace from a secure table line */
#ifdef SLEEP

View File

@ -40,7 +40,11 @@ for j in empty existing ; do
"$i" "$dev1" "$DMTEST" >cmdout 2>&1 &
PID=$!
sleep .6
for k in $(seq 1 10); do
lines=$(wc -l < cmdout 2>/dev/null || true)
test "${lines:-0}" = "0" || break
sleep .1
done
# 0 8192 crypt aes-xts-plain64 434e0cbab02ca68ffba9268222c3789d703fe62427b78b308518b3228f6a2122 0 253:0 8192
# crypt device should be loaded
@ -50,7 +54,7 @@ dmsetup status "$DMTEST"
gcore "$PID" | tee out || skip
# check we capture core while dmsecuretest was already sleeping
grep "nanosleep" out || grep kernel_vsyscall out
grep -e "nanosleep\|kernel_vsyscall" out
kill "$PID" || true
wait