提交 1491f399 编写于 作者: S Shengliang Guan

test: valgrind cases

上级 ef36848b
...@@ -10,16 +10,19 @@ step1: ...@@ -10,16 +10,19 @@ step1:
$x = $x + 1 $x = $x + 1
sleep 1000 sleep 1000
if $x == 10 then if $x == 10 then
print ----> dnode not ready! print ---> dnode not ready!
return -1 return -1
endi endi
sql show dnodes sql show dnodes
print ----> $data00 $data01 $data02 $data03 $data04 $data05 print ---> $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
if $data(1)[4] != ready then
goto step1
endi
print =============== step2: create show database print =============== step2: create db
sql create database d1 vgroups 1 buffer 3 sql create database d1 vgroups 1 buffer 3
sql show databases sql show databases
sql use d1 sql use d1
...@@ -32,7 +35,7 @@ if $rows != 1 then ...@@ -32,7 +35,7 @@ if $rows != 1 then
return -1 return -1
endi endi
print =============== step4: create show table print =============== step3: create show table
sql create table ct1 using stb tags(1000) sql create table ct1 using stb tags(1000)
sql show tables sql show tables
if $rows != 1 then if $rows != 1 then
...@@ -40,8 +43,28 @@ if $rows != 1 then ...@@ -40,8 +43,28 @@ if $rows != 1 then
endi endi
print =============== step5: insert data print =============== step5: insert data
sql insert into ct1 values(now+0s, 10, 2.0, 3.0)
sql insert into ct1 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
print =============== step6: select data print =============== step6: select data
#sql select * from ct1
#sql select * from stb
_OVER: _OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check
print ----> start to check if there are ERRORS in vagrind log file for each dnode
system_content sh/checkValgrind.sh -n dnode1
print cmd return result ----> [ $system_content ]
if $system_content <= 0 then
return 0
endi
$null=
if $system_content == $null then
return 0
endi
return -1
...@@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131 ...@@ -4,7 +4,7 @@ system sh/cfg.sh -n dnode1 -c debugflag -v 131
system sh/exec.sh -n dnode1 -s start -v system sh/exec.sh -n dnode1 -s start -v
sql connect sql connect
print =============== step1: show dnodes print =============== step1: create drop show dnodes
$x = 0 $x = 0
step1: step1:
$x = $x + 1 $x = $x + 1
...@@ -22,75 +22,35 @@ if $data(1)[4] != ready then ...@@ -22,75 +22,35 @@ if $data(1)[4] != ready then
goto step1 goto step1
endi endi
print =============== step2: create alter drop show user print =============== step2: create db
sql create user u1 pass 'taosdata' sql create database d1 vgroups 1 buffer 3
sql show users
sql alter user u1 sysinfo 1
sql alter user u1 enable 1
sql alter user u1 pass 'taosdata'
sql drop user u1
sql_error alter user u2 sysinfo 0
print =============== step3: create drop dnode
sql create dnode $hostname port 7200
sql drop dnode 2
sql alter dnode 1 'debugflag 131'
print =============== step4:
print =============== run show xxxx
sql show dnodes
if $rows != 1 then
return -1
endi
sql show mnodes
if $rows != 1 then
return -1
endi
sql show databases sql show databases
if $rows != 2 then sql use d1
return -1 sql show vgroups
endi
sql show users
if $rows != 1 then
return -1
endi
print =============== run select * from information_schema.xxxx
sql select * from information_schema.`dnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.`mnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.user_users print =============== step3: create show stable
sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned)
sql show stables
if $rows != 1 then if $rows != 1 then
return -1 return -1
endi endi
sql show variables; print =============== step3: create show table
if $rows != 4 then sql create table ct1 using stb tags(1000)
return -1 #sql show tables
endi #if $rows != 1 then
# return -1
#endi
sql show dnode 1 variables; print =============== step5: insert data
if $rows <= 0 then sql insert into ct1 values(now+0s, 10, 2.0, 3.0)
return -1 sql insert into ct1 values(now+1s, 11, 2.1, 3.1)(now+2s, -12, -2.2, -3.2)(now+3s, -13, -2.3, -3.3)
endi
sql show local variables; print =============== step6: select data
if $rows <= 0 then sql select * from ct1
return -1 #sql select * from stb
endi
print =============== stop _OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check print =============== check
......
...@@ -36,6 +36,60 @@ sql create dnode $hostname port 7200 ...@@ -36,6 +36,60 @@ sql create dnode $hostname port 7200
sql drop dnode 2 sql drop dnode 2
sql alter dnode 1 'debugflag 131' sql alter dnode 1 'debugflag 131'
print =============== step4:
print =============== run show xxxx
sql show dnodes
if $rows != 1 then
return -1
endi
sql show mnodes
if $rows != 1 then
return -1
endi
sql show databases
if $rows != 2 then
return -1
endi
sql show users
if $rows != 1 then
return -1
endi
print =============== run select * from information_schema.xxxx
sql select * from information_schema.`dnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.`mnodes`
if $rows != 1 then
return -1
endi
sql select * from information_schema.user_users
if $rows != 1 then
return -1
endi
sql show variables;
if $rows != 4 then
return -1
endi
sql show dnode 1 variables;
if $rows <= 0 then
return -1
endi
sql show local variables;
if $rows <= 0 then
return -1
endi
print =============== stop print =============== stop
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册