3 # Do some basic test of the --readonly parameter
5 # DUT should be a device that accepts read, write, and trim operations
9 # DUT=/dev/fioa t/readonly.sh
14 # The first parameter is the return code
15 # The second parameter is 0 if the return code should be 0
16 # positive if the return code should be positive
19 echo "********************"
23 echo "Test $TESTNUM failed"
24 echo "********************"
27 echo "Test $TESTNUM passed"
31 echo "Test $TESTNUM failed"
32 echo "********************"
35 echo "Test $TESTNUM passed"
39 echo "********************"
41 TESTNUM=$((TESTNUM+1))
44 ./fio --name=test --filename=$DUT --rw=randread --readonly --time_based --runtime=1s &> /dev/null
46 ./fio --name=test --filename=$DUT --rw=randwrite --readonly --time_based --runtime=1s &> /dev/null
48 ./fio --name=test --filename=$DUT --rw=randtrim --readonly --time_based --runtime=1s &> /dev/null
51 ./fio --name=test --filename=$DUT --readonly --rw=randread --time_based --runtime=1s &> /dev/null
53 ./fio --name=test --filename=$DUT --readonly --rw=randwrite --time_based --runtime=1s &> /dev/null
55 ./fio --name=test --filename=$DUT --readonly --rw=randtrim --time_based --runtime=1s &> /dev/null
58 ./fio --name=test --filename=$DUT --rw=randread --time_based --runtime=1s &> /dev/null
60 ./fio --name=test --filename=$DUT --rw=randwrite --time_based --runtime=1s &> /dev/null
62 ./fio --name=test --filename=$DUT --rw=randtrim --time_based --runtime=1s &> /dev/null
65 ./fio t/jobs/readonly-r.fio --readonly &> /dev/null
67 ./fio t/jobs/readonly-w.fio --readonly &> /dev/null
69 ./fio t/jobs/readonly-t.fio --readonly &> /dev/null
72 ./fio --readonly t/jobs/readonly-r.fio &> /dev/null
74 ./fio --readonly t/jobs/readonly-w.fio &> /dev/null
76 ./fio --readonly t/jobs/readonly-t.fio &> /dev/null
79 ./fio t/jobs/readonly-r.fio &> /dev/null
81 ./fio t/jobs/readonly-w.fio &> /dev/null
83 ./fio t/jobs/readonly-t.fio &> /dev/null