Skip to content

Commit f48672f

Browse files
bwatkinsonFedorUporovVstack
authored andcommitted
Updating dio_read_verify ZTS test (openzfs#16830)
There was a recent CI ZTS test failure on FreeBSD 14 for the dio_read_verify test case. The failure reported there was no ARC reads while the buffer wes being manipulated. All checksum verify errors for Direct I/O reads are rerouted through the ARC, so there should be ARC reads accounted for. In order to help debug any future failures of this test case, the order of checks has been changed. First there is a check for DIO verify failures for the reads and then ARC read counts are checked. This PR also contains general cleanup of the comments in the test script. Signed-off-by: Brian Atkinson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]>
1 parent ee25c11 commit f48672f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ log_must truncate -s $MINVDEVSIZE $DIO_VDEVS
5757
# while manipulating the buffer contents while the I/O is still in flight and
5858
# also that Direct I/O checksum verify failures and dio_verify_rd zevents are
5959
# reported.
60-
61-
6260
for type in "" "mirror" "raidz" "draid"; do
6361
typeset vdev_type=$type
6462
if [[ "${vdev_type}" == "" ]]; then
@@ -83,25 +81,28 @@ for type in "" "mirror" "raidz" "draid"; do
8381
log_must manipulate_user_buffer -f "$mntpnt/direct-write.iso" \
8482
-n $NUMBLOCKS -b $BS -r
8583

86-
# Getting new Direct I/O and ARC Write counts.
84+
# Getting new Direct I/O and ARC read counts.
8785
curr_dio_rd=$(kstat_pool $TESTPOOL1 iostats.direct_read_count)
8886
curr_arc_rd=$(kstat_pool $TESTPOOL1 iostats.arc_read_count)
8987
total_dio_rd=$((curr_dio_rd - prev_dio_rd))
9088
total_arc_rd=$((curr_arc_rd - prev_arc_rd))
9189

92-
log_note "Making sure there are no checksum errors with the ZPool"
93-
log_must check_pool_status $TESTPOOL "errors" "No known data errors"
94-
95-
log_note "Making sure we have Direct I/O and ARC reads logged"
90+
log_note "Making sure we have Direct I/O reads logged"
9691
if [[ $total_dio_rd -lt 1 ]]; then
9792
log_fail "No Direct I/O reads $total_dio_rd"
9893
fi
94+
95+
log_note "Making sure we have Direct I/O read checksum verifies with ZPool"
96+
check_dio_chksum_verify_failures "$TESTPOOL1" "$vdev_type" 1 "rd"
97+
98+
log_note "Making sure we have ARC reads logged"
9999
if [[ $total_arc_rd -lt 1 ]]; then
100100
log_fail "No ARC reads $total_arc_rd"
101101
fi
102102

103-
log_note "Making sure we have Direct I/O write checksum verifies with ZPool"
104-
check_dio_chksum_verify_failures "$TESTPOOL1" "$vdev_type" 1 "rd"
103+
log_note "Making sure there are no checksum errors with the ZPool"
104+
log_must check_pool_status $TESTPOOL "errors" "No known data errors"
105+
105106
destroy_pool $TESTPOOL1
106107
done
107108

0 commit comments

Comments
 (0)