diff options
author | Vincent Fu <vincent.fu@wdc.com> | 2019-10-16 14:52:07 -0400 |
---|---|---|
committer | Vincent Fu <vincent.fu@wdc.com> | 2019-11-06 11:18:59 -0500 |
commit | 09a66e9ee8ab5caff467447fde75a6913d95c4a4 (patch) | |
tree | e9aa6e1747ba15bd1810ce40f6776dfdb66742c5 /t/readonly.sh | |
parent | 1c75cb5febdfdea9f9b6999e222859fcf2c2e801 (diff) | |
download | fio-09a66e9ee8ab5caff467447fde75a6913d95c4a4.tar.gz fio-09a66e9ee8ab5caff467447fde75a6913d95c4a4.tar.bz2 |
t/readonly: replace shell script with python script
The new script better supports automated testing than the previous one.
Also get rid of the t/jobs/readonly-?.fio job files. Using jobs files
with the --readonly parameter produces the same behavior as when
--readonly precedes --rw=XXX on the command line.
Diffstat (limited to 't/readonly.sh')
-rwxr-xr-x | t/readonly.sh | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/t/readonly.sh b/t/readonly.sh deleted file mode 100755 index d7094146..00000000 --- a/t/readonly.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -# -# Do some basic test of the --readonly parameter -# -# DUT should be a device that accepts read, write, and trim operations -# -# Example usage: -# -# DUT=/dev/fioa t/readonly.sh -# -TESTNUM=1 - -# -# The first parameter is the return code -# The second parameter is 0 if the return code should be 0 -# positive if the return code should be positive -# -check () { - echo "********************" - - if [ $2 -gt 0 ]; then - if [ $1 -eq 0 ]; then - echo "Test $TESTNUM failed" - echo "********************" - exit 1 - else - echo "Test $TESTNUM passed" - fi - else - if [ $1 -gt 0 ]; then - echo "Test $TESTNUM failed" - echo "********************" - exit 1 - else - echo "Test $TESTNUM passed" - fi - fi - - echo "********************" - echo - TESTNUM=$((TESTNUM+1)) -} - -./fio --name=test --filename=$DUT --rw=randread --readonly --time_based --runtime=1s &> /dev/null -check $? 0 -./fio --name=test --filename=$DUT --rw=randwrite --readonly --time_based --runtime=1s &> /dev/null -check $? 1 -./fio --name=test --filename=$DUT --rw=randtrim --readonly --time_based --runtime=1s &> /dev/null -check $? 1 - -./fio --name=test --filename=$DUT --readonly --rw=randread --time_based --runtime=1s &> /dev/null -check $? 0 -./fio --name=test --filename=$DUT --readonly --rw=randwrite --time_based --runtime=1s &> /dev/null -check $? 1 -./fio --name=test --filename=$DUT --readonly --rw=randtrim --time_based --runtime=1s &> /dev/null -check $? 1 - -./fio --name=test --filename=$DUT --rw=randread --time_based --runtime=1s &> /dev/null -check $? 0 -./fio --name=test --filename=$DUT --rw=randwrite --time_based --runtime=1s &> /dev/null -check $? 0 -./fio --name=test --filename=$DUT --rw=randtrim --time_based --runtime=1s &> /dev/null -check $? 0 - -./fio t/jobs/readonly-r.fio --readonly &> /dev/null -check $? 0 -./fio t/jobs/readonly-w.fio --readonly &> /dev/null -check $? 1 -./fio t/jobs/readonly-t.fio --readonly &> /dev/null -check $? 1 - -./fio --readonly t/jobs/readonly-r.fio &> /dev/null -check $? 0 -./fio --readonly t/jobs/readonly-w.fio &> /dev/null -check $? 1 -./fio --readonly t/jobs/readonly-t.fio &> /dev/null -check $? 1 - -./fio t/jobs/readonly-r.fio &> /dev/null -check $? 0 -./fio t/jobs/readonly-w.fio &> /dev/null -check $? 0 -./fio t/jobs/readonly-t.fio &> /dev/null -check $? 0 |