[LTP] [PATCH] Small fixes (some bashisms and probable typos)

Jiri Palecek
2009-12-01T22:56:20Z

Signed-off-by: Jiri Palecek <jpalecek@web.de>
---
.../kernel/controllers/cpuacct/run_cpuacct_test.sh | 6 +++---
testcases/network/nfs/nfsstat01/nfsstat01 | 2 +-
testcases/network/tcp_cmds/rdist/rdist01 | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh b/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
index 38b2ab6..648ead5 100755
--- a/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
+++ b/testcases/kernel/controllers/cpuacct/run_cpuacct_test.sh
@@ -246,7 +246,7 @@ echo "TEST STARTED: Please avoid using system while this test executes";
status=0
case ${TEST_NUM} in
"1" )
- ls $PWD/cpuacct_task01 &> /dev/null
+ ls $PWD/cpuacct_task01 > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "TFAIL Task file cpuacct_task01.c not compiled"
@@ -314,7 +314,7 @@ case ${TEST_NUM} in
exit -1
fi

- ls $PWD/cpuacct_task01 &> /dev/null
+ ls $PWD/cpuacct_task01 > /dev/null 2>&1
if [ $? -ne 0 ]
then
echo "TFAIL Task file cpuacct_task01.c not compiled"
@@ -323,7 +323,7 @@ case ${TEST_NUM} in
task_kill 2> /dev/null
exit -1
fi
- for (( m=0 ; m<=$num_online_cpus ; m++ ))
+ for m in $(seq 0 $num_online_cpus)
do
nr_tasks
echo $pid > $cg_path/group_1/group_11/tasks
diff --git a/testcases/network/nfs/nfsstat01/nfsstat01 b/testcases/network/nfs/nfsstat01/nfsstat01
index 39d73cd..4d2aa20 100755
--- a/testcases/network/nfs/nfsstat01/nfsstat01
+++ b/testcases/network/nfs/nfsstat01/nfsstat01
@@ -48,7 +48,7 @@ HOST=`hostname`
CLEANUP=${CLEANUP:="ON"}
VERSION=${VERSION:=2}
TESTDIR=${TESTDIR:=/tmp/$TC$PID.testdir}
-NFS_TYPE=${NFS_TYPE:nfs}
+NFS_TYPE=${NFS_TYPE:-nfs}

if [ "x$NFS_TYPE" != "xnfs4" ]; then
OPTS=${OPTS:="-o vers=$VERSION "}
--
1.6.4.3