From: Mikulas Patocka <mpatocka@redhat.com>
To: Peter Rajnoha <prajnoha@redhat.com>,
Zdenek Kabelac <zkabelac@redhat.com>,
Heinz Mauelshagen <heinzm@redhat.com>,
David Teigland <teigland@redhat.com>
Cc: linux-lvm@lists.linux.dev, lvm-devel@lists.linux.dev
Subject: [PATCH] fix random failures in shell/integrity.sh
Date: Mon, 4 Aug 2025 16:17:40 +0200 (CEST) [thread overview]
Message-ID: <06d25902-7239-1fc7-ec3b-1798332c3315@redhat.com> (raw)
Hi
The test shell/integrity.sh creates raid arrays, corrupts one of the
legs, then reads the array and verifies that the corruption was
corrected. Finally, the test tests that the number of mismatches on the
corrupted leg is non-zero.
The problem is that the raid1 implementation may freely choose which leg
to read from. If it chooses to read from the non-corrupted leg, the
corruption is not detected, the number of mismatches is not incremented
and the test reports this as a failure.
Fix the test by not checking the number of integrity mismatches for
raid1.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
test/shell/integrity.sh | 14 --------------
1 file changed, 14 deletions(-)
Index: lvm2/test/shell/integrity.sh
===================================================================
--- lvm2.orig/test/shell/integrity.sh 2025-07-29 19:35:54.000000000 +0200
+++ lvm2/test/shell/integrity.sh 2025-08-01 15:08:02.000000000 +0200
@@ -136,10 +136,6 @@ aux wait_recalc $vg/${lv1}_rimage_0
aux wait_recalc $vg/${lv1}_rimage_1
aux wait_recalc $vg/$lv1
_test_fs_with_read_repair "$dev1"
-lvs -o integritymismatches $vg/${lv1}_rimage_0 |tee mismatch
-not grep 0 mismatch
-lvs -o integritymismatches $vg/$lv1 |tee mismatch
-not grep 0 mismatch
lvchange -an $vg/$lv1
lvconvert --raidintegrity n $vg/$lv1
lvremove $vg/$lv1
@@ -153,10 +149,6 @@ aux wait_recalc $vg/${lv1}_rimage_1
aux wait_recalc $vg/${lv1}_rimage_2
aux wait_recalc $vg/$lv1
_test_fs_with_read_repair "$dev1" "$dev2"
-lvs -o integritymismatches $vg/${lv1}_rimage_0 |tee mismatch
-not grep 0 mismatch
-lvs -o integritymismatches $vg/$lv1 |tee mismatch
-not grep 0 mismatch
lvchange -an $vg/$lv1
lvconvert --raidintegrity n $vg/$lv1
lvremove $vg/$lv1
@@ -233,8 +225,6 @@ lvs -o integritymismatches $vg/${lv1}_ri
lvs -o integritymismatches $vg/${lv1}_rimage_1
lvs -o integritymismatches $vg/${lv1}_rimage_2
lvs -o integritymismatches $vg/${lv1}_rimage_3
-lvs -o integritymismatches $vg/$lv1 |tee mismatch
-not grep 0 mismatch
lvchange -an $vg/$lv1
lvconvert --raidintegrity n $vg/$lv1
lvremove $vg/$lv1
@@ -603,10 +593,6 @@ aux wait_recalc $vg/${lv1}_rimage_0
aux wait_recalc $vg/${lv1}_rimage_1
aux wait_recalc $vg/$lv1
_test_fs_with_read_repair "$dev1"
-lvs -o integritymismatches $vg/${lv1}_rimage_0 |tee mismatch
-not grep 0 mismatch
-lvs -o integritymismatches $vg/$lv1 |tee mismatch
-not grep 0 mismatch
lvchange -an $vg/$lv1
lvconvert --raidintegrity n $vg/$lv1
lvremove $vg/$lv1
next reply other threads:[~2025-08-04 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 14:17 Mikulas Patocka [this message]
2025-08-06 21:24 ` [PATCH] fix random failures in shell/integrity.sh John Stoffel
2025-08-06 23:25 ` matthew patton
2025-08-07 4:23 ` Stuart D Gathman
2025-08-07 14:07 ` Mikulas Patocka
2025-08-07 14:26 ` Zdenek Kabelac
2025-08-11 12:22 ` Mikulas Patocka
2025-08-07 14:38 ` John Stoffel
2025-08-07 14:58 ` Mikulas Patocka
2025-08-07 15:31 ` Stuart D Gathman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06d25902-7239-1fc7-ec3b-1798332c3315@redhat.com \
--to=mpatocka@redhat.com \
--cc=heinzm@redhat.com \
--cc=linux-lvm@lists.linux.dev \
--cc=lvm-devel@lists.linux.dev \
--cc=prajnoha@redhat.com \
--cc=teigland@redhat.com \
--cc=zkabelac@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).