From 0859cabdcd29b714b0040ccd3841ad5009b5e448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20M=C3=A9ndez=20Hern=C3=A1ndez?= Date: Mon, 15 Jan 2024 20:10:34 +0100 Subject: [PATCH] Let `fio` deal with the IO file removal Use the ` --unlink=1` parameter to remove the IO file. --- storage-benchmark | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/storage-benchmark b/storage-benchmark index ab93bfb..83febe1 100755 --- a/storage-benchmark +++ b/storage-benchmark @@ -38,22 +38,13 @@ testlocation(){ echo "" echo "************* Running READ test via fio:" echo "" - fio --name=read-test --rw=read --size="$FILEGB"G --directory=$TESTDIRECTORY - echo "" - echo "************* Removing test files." - rm -f "$TESTDIRECTORY"/* + fio --name=read-test --rw=read --size="$FILEGB"G --directory=$TESTDIRECTORY --unlink=1 echo "" echo "************* Running WRITE test via fio:" - fio --name=write-test --rw=write --size="$FILEGB"G --directory=$TESTDIRECTORY - echo "" - echo "************* Removing test files." - rm -f "$TESTDIRECTORY"/* + fio --name=write-test --rw=write --size="$FILEGB"G --directory=$TESTDIRECTORY --unlink=1 echo "" echo "************* Running Random READ/WRITE test via fio:" - fio --name=randrw-test --rw=randrw --size="$FILEGB"G --directory=$TESTDIRECTORY --rwmixread=80 - echo "" - echo "************* Removing test files." - rm -f "$TESTDIRECTORY"/* + fio --name=randrw-test --rw=randrw --size="$FILEGB"G --directory=$TESTDIRECTORY --rwmixread=80 --unlink=1 echo "" echo "Test complete! There is still a directory located : $TESTDIRECTORY that you" echo "will need to remove to run this test again."