For debugging, it can be useful to run a single ZBD test case in all
zoned configurations defined in run-tests-against-nullb. Add -t option
to run-tests-against-nullb so that the single ZBD test case specified
in run-tests-against-nullb command line is executed in all sections
of the script.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Dmitry Fomichev <dmitry.fomichev@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
echo -e "\t tests."
echo -e "\t-s <#section> Only run the section with the given number."
echo -e "\t-l Use libzbc ioengine to run the tests."
+ echo -e "\t-t <#test> Only run the test with the given number in every section."
echo -e "\t-o <max_open_zones> Specify MaxOpen value, (${set_max_open} by default)."
echo -e "\t-n <#number of runs> Set the number of times to run the entire suite "
echo -e "\t or an individual section/test."
zbd_test_opts=()
libzbc=0
num_of_runs=1
+test_case=0
while (($#)); do
case "$1" in
-r) cleanup_nullb; exit 0;;
-l) libzbc=1; shift;;
-n) num_of_runs="${2}"; shift; shift;;
+ -t) test_case="${2}"; shift; shift;;
-h) usage; break;;
--) shift; break;;
*) usage; exit 1;;
exit 1
fi
zbd_test_opts=()
+ if ((test_case)); then
+ zbd_test_opts+=("-t" "${test_case}")
+ fi
section$section_number
configure_nullb
rc=$?