[PATCH blktests v3 01/11] common/fio: Remove state file in common helper

From: Logan Gunthorpe
Date: Thu Oct 08 2020 - 12:41:11 EST


Instead of each individual test removing this file, just do it
in the common helper.

Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx>
---
common/fio | 1 +
tests/nvme/010 | 1 -
tests/nvme/011 | 1 -
tests/nvme/012 | 1 -
tests/nvme/013 | 1 -
5 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/common/fio b/common/fio
index 8bfad4238dda..94c65c107a14 100644
--- a/common/fio
+++ b/common/fio
@@ -181,6 +181,7 @@ _run_fio_rand_io() {
_run_fio_verify_io() {
_run_fio --name=verify --rw=randwrite --direct=1 --ioengine=libaio --bs=4k \
--iodepth=16 --verify=crc32c "$@"
+ rm -f local*verify*state
}

_fio_perf_report() {
diff --git a/tests/nvme/010 b/tests/nvme/010
index 9d96d7803be3..0188e842213e 100755
--- a/tests/nvme/010
+++ b/tests/nvme/010
@@ -52,7 +52,6 @@ test() {
losetup -d "${loop_dev}"

rm "${file_path}"
- rm -f local*verify*state

echo "Test complete"
}
diff --git a/tests/nvme/011 b/tests/nvme/011
index 06dc568fb6ea..543dbe840874 100755
--- a/tests/nvme/011
+++ b/tests/nvme/011
@@ -48,7 +48,6 @@ test() {
_remove_nvmet_port "${port}"

rm "${file_path}"
- rm -f local-write-and-verify*state

echo "Test complete"
}
diff --git a/tests/nvme/012 b/tests/nvme/012
index 8110430e49d4..1dbd59804ed7 100755
--- a/tests/nvme/012
+++ b/tests/nvme/012
@@ -63,7 +63,6 @@ test() {

losetup -d "${loop_dev}"

- rm -f local*verify*state
rm "${file_path}"
rm -fr "${mount_dir}"

diff --git a/tests/nvme/013 b/tests/nvme/013
index 176b11b9ccb5..df7f23e69252 100755
--- a/tests/nvme/013
+++ b/tests/nvme/013
@@ -58,7 +58,6 @@ test() {
_remove_nvmet_subsystem "${subsys_name}"
_remove_nvmet_port "${port}"

- rm -f local*verify*state
rm "${file_path}"
rm -fr "${mount_dir}"

--
2.20.1