*** empty log message ***
[csql.git] / test / system / proc / test001.ksh
blobc897b79ed00032e0dd07bea2b0f0252c6db5cff4
1 #!/bin/ksh
2 # TestCase:
3 # check proc slots used and free in proctable
4 # for i = 1 to 120
5 # catalog
6 # end for
7 # check proc slots used and free in proctable
8 # check if any proc slot holds mutexes
9 # Note: catalog tool with no option specified connects and disconnects
11 echo "Case 1: -d option with no connections"
12 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D proc |grep Slots
13 if [ $? -ne 0 ]
14 then
15 exit 1;
19 count=120
20 while [ ${count} -gt 0 ]
21 do
22 count=`expr ${count} - 1`
23 if [ $VALGRIND = "true" ]
24 then
25 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/catalog 2> $0.valgr
26 else
27 $CSQL_INSTALL_ROOT/bin/catalog >/dev/null
28 if [ $? -ne 0 ]
29 then
30 echo "create table failed"
31 exit 100;
32 fi
34 done
35 echo "Case 2: -d option after 120 connect/disconnect"
36 if [ $VALGRIND = "true" ]
37 then
38 valgrind --tool=memcheck --leak-check=full $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D proc |grep Slots 2>> $0.valgr
39 else
40 $CSQL_INSTALL_ROOT/bin/catalog -u root -p manager -D proc |grep Slots
41 if [ $? -ne 0 ]
42 then
43 exit 1;
46 exit 0