#!/bin/bash export TCID=aiodio; export TST_TOTAL=16; export TST_COUNT=1 . run_profile.txt . $base_dir/plans/commands/common.fns export PATH=/usr/local/bin:$PATH tst_resm TINFO "BEGIN PACKAGE $TCID" # Check needed vars from run_profile.txt [ ! -d "$run_dir" ] && tst_resm TCONF "ERROR: $run_dir does not exist" && exit -10 SUT=`hostname -s` tst_resm TINFO "Running aiodio on SUT: $SUT" log_dir="$run_dir/test_output" mkdir -p $log_dir # no filesystem mounting needed other than the build dir. cwd=`/bin/pwd` tst_resm TINFO "cwd: $cwd" name=aio-dio-extend-stat run_test "aiodio" "/usr/bin/time ./$name testfileadxs" "$log_dir" "aiodio.log" sts=$? if [ $sts -eq 2 ]; then sts=0 fi tst_status $sts $name TST_COUNT=2 name=aio-dio-page-errors run_test "aiodio" "/usr/bin/time ./$name testfileadpe" "$log_dir" "aiodio.log" sts=$? if [ $sts -eq 2 ]; then sts=0 fi tst_status $sts $name TST_COUNT=3 name=aiodio_append run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=4 name=aiodio_sparse run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=5 run_test "aiodio" "/usr/bin/time ./$name -D" "$log_dir" "aiodio.log" tst_status $? $name -D TST_COUNT=6 run_test "aiodio" "/usr/bin/time ./$name -S" "$log_dir" "aiodio.log" tst_status $? $name -S TST_COUNT=7 run_test "aiodio" "/usr/bin/time ./$name -D -S" "$log_dir" "aiodio.log" tst_status $? $name -D -S TST_COUNT=8 name=dio_append run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=9 name=dio_sparse run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=10 name=dio_truncate run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=11 name=direct_read_under opt="-n10 testfiledru" run_test "aiodio" "/usr/bin/time ./$name $opt" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=12 name=dirty run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name TST_COUNT=13 name=read_checkzero run_test "aiodio" "/usr/bin/time ./$name" "$log_dir" "aiodio.log" tst_status $? $name rm -f testfile* file junkfile dd ibs=4 count=100000 if=/dev/urandom of=urandfile TST_COUNT=14 name=aiocp opt="-f CREAT urandfile urandcpfile1" run_test "aiodio" "/usr/bin/time ./$name $opt" "$log_dir" "aiodio.log" tst_status $? $name $opt cmp urandfile urandcpfile1 tst_status $? cmp: $name $opt TST_COUNT=15 opt="-f CREAT -f SYNC urandfile urandcpfile2" run_test "aiodio" "/usr/bin/time ./$name $opt" "$log_dir" "aiodio.log" tst_status $? $name $opt cmp urandfile urandcpfile2 tst_status $? cmp: $name $opt TST_COUNT=16 opt="-f CREAT -f DIRECT urandfile urandcpfile3" run_test "aiodio" "/usr/bin/time ./$name $opt" "$log_dir" "aiodio.log" tst_status $? $name $opt cmp urandfile urandcpfile3 tst_status $? cmp: $name $opt rm -f urand* tst_resm TINFO fini exit 0