1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

10 Commits

Author SHA1 Message Date
Zdenek Kabelac
b2431d105e tests: catch all output
Previous fix was invalid (after some in-place shuffling)
'dd' copied goes to 'stderr' so we need to catch all output.
Grep needs to check output of tee tool.
Ensure 'C' locales are in use with 'dd'.
2023-07-17 16:34:14 +02:00
Zdenek Kabelac
f71d3cce93 tests: ensure single leg is broken
Make sure only the first raid5 leg, that contains searched string
is being modified, so we do not 'damage'  2legs at once.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
04860b6324 tests: correct checked devices
Fix the testing logic.
With raid5 device the layout of files on a filesystem does not define
which leg will actually contain the block we try to damage.
So test will now figure out which device has damaged block.

Use 'check' functionality and also drop unneeded random write as we
now can identify easily in other way.
2023-06-25 13:02:36 +02:00
Zdenek Kabelac
4a003ba671 tests: fix pattern for raid4
Since the strip in raid4 might be XOR - we might eventually end
with 2 blocks of 'B' on 2 disks - so will rest of stripe with 'b'.
2023-04-25 00:12:31 +02:00
Zdenek Kabelac
80ebec099d aux: add wait_recalc
Share function across tests.
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
4e0aab7428 tests: convert to use ext4
Convert test to use only ext4 instead of 300M demanding XFS.
Shorten  'B' files to 4K and use 4K strip size with >raid1 arrays
so we do not risk spreading of the file across stripe.

Also use easier 'aux corrupt_dev()' method to introduce a bit
corruption into a block device with integrity.

TODO: shorten _wait_recalc (should't be needed).
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
b2360437e0 tests: use aux clear_dev
Use wrapper over 'blkdiscard -z'
2023-04-21 14:52:43 +02:00
Zdenek Kabelac
94c4af232c tests: prohibit 4K brd device with integrity
Older kernels hit these errors:

device-mapper: integrity: Bio not aligned on 8 sectors: 0x8ffc, 0x4
2021-03-20 10:52:24 +01:00
David Teigland
1cc75317f9 tests: integrity mismatch checks for all raid levels
Verify that corruption is corrected for raid levels other
than raid1.  For other raid levels, attempt to corrupt the
given file pattern on each underlying device, since we don't
know which device contains the file being corrupted.
This ensures that corruption is actually be introduced
when testing the other raid levels.

Verify that corruption is being corrected by checking
the integritymismatches count is non-zero for the raid LV,
which includes the total from all images (since we don't
know which image will have the corruption.)
2020-11-11 15:13:46 -06:00
David Teigland
2317ba3934 tests: update integrity tests
simplified the method of corrupting data, the old method
was not working reliably.  moved syncation tests to a
different file
2020-11-10 17:41:04 -06:00