From 2b5d806be3a6641b86c0adb038755d8480501e91 Mon Sep 17 00:00:00 2001 From: Brian Atkinson Date: Mon, 2 Dec 2024 16:12:36 -0700 Subject: [PATCH] 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 --- .../zfs-tests/tests/functional/direct/dio_read_verify.ksh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh b/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh index 456d429b1d99..eabee956f1cb 100755 --- a/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh +++ b/tests/zfs-tests/tests/functional/direct/dio_read_verify.ksh @@ -82,7 +82,7 @@ for type in "" "mirror" "raidz" "draid"; do log_must manipulate_user_buffer -f "$mntpnt/direct-write.iso" \ -n $NUMBLOCKS -b $BS -r - # Getting new Direct I/O and ARC Write counts. + # Getting new Direct I/O and ARC read counts. curr_dio_rd=$(get_iostats_stat $TESTPOOL1 direct_read_count) curr_arc_rd=$(get_iostats_stat $TESTPOOL1 arc_read_count) total_dio_rd=$((curr_dio_rd - prev_dio_rd)) @@ -90,6 +90,9 @@ for type in "" "mirror" "raidz" "draid"; do log_note "Making sure there are no checksum errors with the ZPool" log_must check_pool_status $TESTPOOL "errors" "No known data errors" + + log_note "Making sure we have Direct I/O read checksum verifies with ZPool" + check_dio_chksum_verify_failures "$TESTPOOL1" "$vdev_type" 1 "rd" log_note "Making sure we have Direct I/O and ARC reads logged" if [[ $total_dio_rd -lt 1 ]]; then @@ -99,8 +102,6 @@ for type in "" "mirror" "raidz" "draid"; do log_fail "No ARC reads $total_arc_rd" fi - log_note "Making sure we have Direct I/O write checksum verifies with ZPool" - check_dio_chksum_verify_failures "$TESTPOOL1" "$vdev_type" 1 "rd" destroy_pool $TESTPOOL1 done