t/zbd: add test case to check zone_reset_threshold/frequency with verify
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Mon, 14 Nov 2022 02:13:06 +0000 (11:13 +0900)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 18 Nov 2022 14:55:16 +0000 (09:55 -0500)
Recent commit fixed assertion failure observed with zone_reset_threshold
and zone_reset_frequency options together with verify. Add a test case
to confirm the fix. Run four types of workloads and confirm no error.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
t/zbd/test-zbd-support

index 37af67247f869a7e9454f5e57f14f9287ecac5c7..fec93099b4be33bb2f5488bb17d71a6eac3196ea 100755 (executable)
@@ -1280,6 +1280,24 @@ test58() {
            >>"${logfile}.${test_number}" 2>&1
 }
 
+# Test zone_reset_threshold with verify.
+test59() {
+       local off bs loops=2 size=$((zone_size)) w
+       local -a workloads=(write randwrite rw randrw)
+
+       prep_write
+       off=$((first_sequential_zone_sector * 512))
+
+       bs=$(min $((256*1024)) "$zone_size")
+       for w in "${workloads[@]}"; do
+               run_fio_on_seq "$(ioengine "psync")" --rw=${w} --bs="$bs" \
+                              --size=$size --loops=$loops --do_verify=1 \
+                              --verify=md5 --zone_reset_frequency=.9 \
+                              --zone_reset_threshold=.1 \
+                              >> "${logfile}.${test_number}" 2>&1 || return $?
+       done
+}
+
 SECONDS=0
 tests=()
 dynamic_analyzer=()