From a70c87ad8ace3d9408bb363e9bd7cb6346cfad69 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Wed, 22 Jul 2020 10:38:28 +0200 Subject: [PATCH] test/dd: Rerun POSIX tests with AIO In case spdk_dd was compiled with liburing support, rerun the tests with forced AIO. Change-Id: I26bee51b2671c19189a2678f48aef4809b7b1621 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3479 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki Reviewed-by: Paul Luse --- test/dd/posix.sh | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/test/dd/posix.sh b/test/dd/posix.sh index b1952fd83..15346d8d3 100755 --- a/test/dd/posix.sh +++ b/test/dd/posix.sh @@ -86,13 +86,37 @@ io() { done } +tests() { + printf '* First test run%s\n' \ + "${msg[liburing_in_use]}" >&2 + + run_test "dd_flag_append" append + run_test "dd_flag_directory" directory + run_test "dd_flag_nofollow" nofollow + run_test "dd_flag_noatime" noatime + run_test "dd_flags_misc" io +} + +tests_forced_aio() { + printf '* Second test run%s\n' \ + "${msg[liburing_in_use ? 2 : 0]}" >&2 + + DD_APP+=("--aio") + run_test "dd_flag_append_forced_aio" append + run_test "dd_flag_directory_forced_aio" directory + run_test "dd_flag_nofollow_forced_aio" nofollow + run_test "dd_flag_noatime_forced_aio" noatime + run_test "dd_flags_misc_forced_aio" io +} + +msg[0]=", using AIO" +msg[1]=", liburing in use" +msg[2]=", disabling liburing, forcing AIO" + trap "cleanup" EXIT test_file0=$SPDK_TEST_STORAGE/dd.dump0 test_file1=$SPDK_TEST_STORAGE/dd.dump1 -run_test "dd_flag_append" append -run_test "dd_flag_directory" directory -run_test "dd_flag_nofollow" nofollow -run_test "dd_flag_noatime" noatime -run_test "dd_flags_misc" io +tests +tests_forced_aio