Skip to content

Commit ead3f78

Browse files
kawasakiosandov
authored andcommitted
zbd/007: Reset test target zones at test end
The test case zbd/007 checks write pointer mapping between a logical device and its container device. To do so, it moves write pointers of the container device by writing data to the container device. When the logical device is a dm-crypt device, this test case works as expected, but the data written to the container device is not encrypted, then it leaves broken data on the logical, dm-crypt device. This results in I/O errors in the following operations to the dm-crypt device. To avoid the I/O errors, reset the test target zones of the logical device at the test case end to wipe out the broken data. Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
1 parent 21b514d commit ead3f78

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/zbd/007

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,12 @@ test_device() {
109109
done
110110
_put_blkzone_report
111111

112+
# When the logical devices is dm-crypt, the write pointer moves on
113+
# its container device break data contents on the logical device. Reset
114+
# zones of the logical device to wipe out the broken data.
115+
for ((i=0; i < ${#test_z[@]}; i++)); do
116+
blkzone reset -o "${test_z_start[i]}" -c 1 "${TEST_DEV}"
117+
done
118+
112119
echo "Test complete"
113120
}

0 commit comments

Comments
 (0)