Skip to content

Commit e85ba3d

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 f29dcc2 commit e85ba3d

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,28 @@ for type in "" "mirror" "raidz" "draid"; do
8282
log_must manipulate_user_buffer -f "$mntpnt/direct-write.iso" \
8383
-n $NUMBLOCKS -b $BS -r
8484

85-
# Getting new Direct I/O and ARC Write counts.
85+
# Getting new Direct I/O and ARC read counts.
8686
curr_dio_rd=$(get_iostats_stat $TESTPOOL1 direct_read_count)
8787
curr_arc_rd=$(get_iostats_stat $TESTPOOL1 arc_read_count)
8888
total_dio_rd=$((curr_dio_rd - prev_dio_rd))
8989
total_arc_rd=$((curr_arc_rd - prev_arc_rd))
9090

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"
91+
log_note "Making sure we have Direct I/O reads logged"
9592
if [[ $total_dio_rd -lt 1 ]]; then
9693
log_fail "No Direct I/O reads $total_dio_rd"
9794
fi
95+
96+
log_note "Making sure there are no checksum errors with the ZPool"
97+
log_must check_pool_status $TESTPOOL "errors" "No known data errors"
98+
99+
log_note "Making sure we have Direct I/O read checksum verifies with ZPool"
100+
check_dio_chksum_verify_failures "$TESTPOOL1" "$vdev_type" 1 "rd"
101+
102+
log_note "Making sure we have ARC reads logged"
98103
if [[ $total_arc_rd -lt 1 ]]; then
99104
log_fail "No ARC reads $total_arc_rd"
100105
fi
101106

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"
104107
destroy_pool $TESTPOOL1
105108
done
106109

0 commit comments

Comments
 (0)