linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix random failures in shell/integrity.sh
@ 2025-08-04 14:17 Mikulas Patocka
  2025-08-06 21:24 ` John Stoffel
  0 siblings, 1 reply; 10+ messages in thread
From: Mikulas Patocka @ 2025-08-04 14:17 UTC (permalink / raw)
  To: Peter Rajnoha, Zdenek Kabelac, Heinz Mauelshagen, David Teigland
  Cc: linux-lvm, lvm-devel

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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-08-11 12:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-04 14:17 [PATCH] fix random failures in shell/integrity.sh Mikulas Patocka
2025-08-06 21:24 ` 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

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).