Skip to content

Commit b221130

Browse files
committed
Updating dio_read_verify ZTS test
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]>
1 parent fe67499 commit b221130

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
@@ -56,8 +56,6 @@ log_must truncate -s $MINVDEVSIZE $DIO_VDEVS
5656
# while manipulating the buffer contents while the I/O is still in flight and
5757
# also that Direct I/O checksum verify failures and dio_verify_rd zevents are
5858
# reported.
59-
60-
6159
for type in "" "mirror" "raidz" "draid"; do
6260
typeset vdev_type=$type
6361
if [[ "${vdev_type}" == "" ]]; then
@@ -82,25 +80,28 @@ for type in "" "mirror" "raidz" "draid"; do
8280
log_must manipulate_user_buffer -f "$mntpnt/direct-write.iso" \
8381
-n $NUMBLOCKS -b $BS -r
8482

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

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

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

0 commit comments

Comments
 (0)