From: Zdenek Kabelac Date: Mon, 5 Aug 2024 15:01:13 +0000 (+0200) Subject: tests: add some udev waits X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=2dc6c3d236aee33954045be1b72dc96b8614ada2;p=lvm2.git tests: add some udev waits Avoid possible udev race - since dmsetup create is not using the same cookie logic as lvm2 commands, try to avoid racing on some systems with udev scanning. --- diff --git a/test/shell/dmsetup-integrity-keys.sh b/test/shell/dmsetup-integrity-keys.sh index cd98ead6d..a920ad8da 100644 --- a/test/shell/dmsetup-integrity-keys.sh +++ b/test/shell/dmsetup-integrity-keys.sh @@ -42,6 +42,7 @@ test "$str" = "journal_crypt:$JOURNAL_CRYPT:$HEXKEY_32" str=$(dmsetup table "$PREFIX-integrity" | cut -d ' ' -f 14) test "$str" = "internal_hash:$INTERNAL_HASH_NOCRYPT" +aux udev_wait dmsetup remove "$PREFIX-integrity" dmsetup create "$PREFIX-integrity" --table "0 7856 integrity $DM_DEV_DIR/mapper/$PREFIX-zero 0 32 J 7 journal_sectors:88 interleave_sectors:32768 buffer_sectors:128 journal_watermark:50 commit_time:10000 internal_hash:$INTERNAL_HASH_CRYPT:$HEXKEY2_32 journal_crypt:$JOURNAL_CRYPT:$HEXKEY_32" @@ -54,5 +55,6 @@ test "$str" = "internal_hash:$INTERNAL_HASH_CRYPT:$HIDENKEY_32" str=$(dmsetup table --showkeys "$PREFIX-integrity" | cut -d ' ' -f 14) test "$str" = "internal_hash:$INTERNAL_HASH_CRYPT:$HEXKEY2_32" +aux udev_wait dmsetup remove "$PREFIX-integrity" dmsetup remove "$PREFIX-zero" diff --git a/test/shell/dmsetup-keyring.sh b/test/shell/dmsetup-keyring.sh index 3c0b867e3..7b12235b4 100644 --- a/test/shell/dmsetup-keyring.sh +++ b/test/shell/dmsetup-keyring.sh @@ -71,5 +71,6 @@ test "$str" = "$HIDENKEY_32" str=$(dmsetup table --showkeys "$PREFIX-crypt" | cut -d ' ' -f 5) test "$str" = "$HEXKEY_32" +aux udev_wait dmsetup remove "$PREFIX-crypt" dmsetup remove "$PREFIX-zero"