From ede56b79bc4b0df9067118dcf6abe7f8eeca0e6c Mon Sep 17 00:00:00 2001 From: prabatuty Date: Mon, 17 Nov 2008 07:58:57 +0000 Subject: [PATCH] Fixing failed test --- test/cache/Recovery/test001.ksh | 6 +++++- test/cache/Recovery/test002.ksh | 13 +++++++------ test/cache/Recovery/test003.ksh | 7 ++++++- test/cache/Recovery/test004.ksh | 7 ++++++- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/test/cache/Recovery/test001.ksh b/test/cache/Recovery/test001.ksh index c842dee0..34cb143f 100755 --- a/test/cache/Recovery/test001.ksh +++ b/test/cache/Recovery/test001.ksh @@ -10,6 +10,7 @@ then REL_PATH=${PWD}/cache/Recovery fi export CSQL_CONFIG_FILE=$REL_PATH/csql.conf +cp $CSQL_CONFIG_FILE /tmp echo DSN=$DSN >> $CSQL_CONFIG_FILE isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1 @@ -28,10 +29,13 @@ sleep 3 if [ $? -ne 0 ] then mv /tmp/.odbc.ini ~ + mv /tmp/csql.conf $CSQL_CONFIG_FILE isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1 exit 1; fi - +ipcrm -M 1199 +ipcrm -M 2277 +mv /tmp/csql.conf $CSQL_CONFIG_FILE mv /tmp/.odbc.ini ~ isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1 diff --git a/test/cache/Recovery/test002.ksh b/test/cache/Recovery/test002.ksh index 4cd66688..0bfc44cc 100755 --- a/test/cache/Recovery/test002.ksh +++ b/test/cache/Recovery/test002.ksh @@ -1,5 +1,5 @@ #!/bin/sh - +#This test requires kernel.shmmax to be 1GB, otherwise it may fail #Run this test only under csql/test or on this directory. #Otherwise, it may fail CSQL_CONF=${PWD}/cache/Recovery/csql.conf @@ -10,14 +10,15 @@ then REL_PATH=${PWD}/cache/Recovery fi export CSQL_CONFIG_FILE=$REL_PATH/csql.conf +cp $CSQL_CONFIG_FILE /tmp echo DSN=$DSN >> $CSQL_CONFIG_FILE isql $DSN < $REL_PATH/create.sql > /dev/null 2>&1 if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 1; fi - # edit /tmp/csql/csqltable.conf rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db touch /tmp/csql/csqltable.conf /tmp/csql/csql.db @@ -29,21 +30,21 @@ done >> /tmp/csql/csqltable.conf $CSQL_INSTALL_ROOT/bin/csqlserver -c >/dev/null 2>&1 & pid=$! sleep 60 - rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db touch /tmp/csql/csqltable.conf /tmp/csql/csql.db $CSQL_INSTALL_ROOT/bin/csqldump - if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 5; fi kill $pid > /dev/null 2>&1 - +ipcrm -M 1199 +ipcrm -M 2277 isql $DSN < $REL_PATH/dropall.sql > /dev/null 2>&1 - +mv /tmp/csql.conf $CSQL_CONFIG_FILE rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db touch /tmp/csql/csqltable.conf /tmp/csql/csql.db exit 0; diff --git a/test/cache/Recovery/test003.ksh b/test/cache/Recovery/test003.ksh index bb3bede5..8227c09b 100755 --- a/test/cache/Recovery/test003.ksh +++ b/test/cache/Recovery/test003.ksh @@ -10,11 +10,13 @@ then REL_PATH=${PWD}/cache/Recovery fi export CSQL_CONFIG_FILE=$REL_PATH/csql.conf +cp $CSQL_CONFIG_FILE /tmp echo DSN=$DSN >> $CSQL_CONFIG_FILE isql $DSN < $REL_PATH/createt1.sql > /dev/null 2>&1 if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 1; fi @@ -37,13 +39,16 @@ $CSQL_INSTALL_ROOT/bin/csqldump if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 5; fi kill $pid > /dev/null 2>&1 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1 - +ipcrm -M 1199 +ipcrm -M 2277 +mv /tmp/csql.conf $CSQL_CONFIG_FILE rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db touch /tmp/csql/csqltable.conf /tmp/csql/csql.db exit 0; diff --git a/test/cache/Recovery/test004.ksh b/test/cache/Recovery/test004.ksh index 39b7b413..393a41c6 100755 --- a/test/cache/Recovery/test004.ksh +++ b/test/cache/Recovery/test004.ksh @@ -16,11 +16,13 @@ then REL_PATH=${PWD}/cache/Recovery fi export CSQL_CONFIG_FILE=$REL_PATH/csql.conf +cp $CSQL_CONFIG_FILE /tmp echo DSN=$DSN >> $CSQL_CONFIG_FILE isql $DSN < $REL_PATH/createt1.sql > /dev/null 2>&1 if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 1; fi @@ -45,13 +47,16 @@ $CSQL_INSTALL_ROOT/bin/csqldump if [ $? -ne 0 ] then + mv /tmp/csql.conf $CSQL_CONFIG_FILE exit 5; fi kill $pid > /dev/null 2>&1 isql $DSN < $REL_PATH/drop.sql > /dev/null 2>&1 - +ipcrm -M 1199 +ipcrm -M 2277 +mv /tmp/csql.conf $CSQL_CONFIG_FILE rm -f /tmp/csql/csqltable.conf /tmp/csql/csql.db touch /tmp/csql/csqltable.conf /tmp/csql/csql.db exit 0; -- 2.11.4.GIT