From b29ba872c97980f69973c6c748e4252299be1197 Mon Sep 17 00:00:00 2001
From: Konstantin Osipov <kostja@tarantool.org>
Date: Thu, 29 Aug 2013 13:23:36 +0400
Subject: [PATCH] Fix ./test-run --valgrind. Remove extra nesting of
 multi-return.

---
 test/big/lua.result          |  6 +++---
 test/big/lua.test.lua        |  2 +-
 test/big/sql.result          | 19 +++++++++----------
 test/big/sql.test.py         |  6 +++---
 test/lib/tarantool_server.py |  6 ++----
 5 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/test/big/lua.result b/test/big/lua.result
index 6d8bfca1f6..9fbd465d21 100644
--- a/test/big/lua.result
+++ b/test/big/lua.result
@@ -230,10 +230,10 @@ num = box.unpack('l', tuple[0])
 num2 = box.unpack('l', tuple2[0])
 ---
 ...
-{num, num2}
+num, num2
 ---
-- - 125
-  - 125
+- 125
+- 125
 ...
 type(num) == 'cdata'
 ---
diff --git a/test/big/lua.test.lua b/test/big/lua.test.lua
index 79e6f9241e..66cc4d67ac 100644
--- a/test/big/lua.test.lua
+++ b/test/big/lua.test.lua
@@ -86,7 +86,7 @@ tuple = space:select(0, 125)
 tuple2 = space:select(0, 125LL)
 num = box.unpack('l', tuple[0])
 num2 = box.unpack('l', tuple2[0])
-{num, num2}
+num, num2
 type(num) == 'cdata'
 type(num2) == 'cdata'
 num == tonumber64('125')
diff --git a/test/big/sql.result b/test/big/sql.result
index ccd2eadc2b..cf826ca72a 100644
--- a/test/big/sql.result
+++ b/test/big/sql.result
@@ -94,11 +94,11 @@ insert into t0 values ('key2', 'part1', 'part2_a')
 Insert OK, 1 row affected
 insert into t0 values ('key3', 'part1', 'part2_b')
 Insert OK, 1 row affected
-return { box.space[0]:select(1) }
+box.space[0]:select(1)
 ---
-- - [830039403, 'part1', 'part2']
-  - [846816619, 'part1', 'part2_a']
-  - [863593835, 'part1', 'part2_b']
+- [830039403, 'part1', 'part2']
+- [846816619, 'part1', 'part2_a']
+- [863593835, 'part1', 'part2_b']
 ...
 select * from t0 where k0='key1'
 Found 1 tuple:
@@ -224,9 +224,8 @@ delete from t0 where k0='31234567'
 Delete OK, 1 row affected
 delete from t0 where k0='41234567'
 Delete OK, 1 row affected
-{ box.space[0]:select(0) }
+box.space[0]:select(0)
 ---
-- {}
 ...
 box.space[0]:truncate()
 ---
@@ -381,11 +380,11 @@ insert into t0 values(2, 'Bilimbi')
 Insert OK, 1 row affected
 insert into t0 values(3, 'Creature ')
 Insert OK, 1 row affected
-{ box.space[0]:select(1) }
+box.space[0]:select(1)
 ---
-- - [1, 'Aardvark ']
-  - [2, 'Bilimbi']
-  - [3, 'Creature ']
+- [1, 'Aardvark ']
+- [2, 'Bilimbi']
+- [3, 'Creature ']
 ...
 box.space[0].index[0].idx:min()
 ---
diff --git a/test/big/sql.test.py b/test/big/sql.test.py
index 08fe77d55c..fbc91a1b26 100644
--- a/test/big/sql.test.py
+++ b/test/big/sql.test.py
@@ -63,7 +63,7 @@ sql("insert into t0 values ('key1', 'part1', 'part2')")
 sql("replace into t0 values ('key1', 'part1', 'part2')")
 sql("insert into t0 values ('key2', 'part1', 'part2_a')")
 sql("insert into t0 values ('key3', 'part1', 'part2_b')")
-admin("return { box.space[0]:select(1) }")
+admin("box.space[0]:select(1)")
 sql("select * from t0 where k0='key1'")
 sql("select * from t0 where k0='key2'")
 sql("select * from t0 where k0='key3'")
@@ -106,7 +106,7 @@ sql("delete from t0 where k0='11234567'")
 sql("delete from t0 where k0='21234567'")
 sql("delete from t0 where k0='31234567'")
 sql("delete from t0 where k0='41234567'")
-admin("{ box.space[0]:select(0) }")
+admin("box.space[0]:select(0)")
 admin("box.space[0]:truncate()")
 
 admin("box.replace(box.schema.INDEX_ID, 0, 0, 'primary', 'hash', 1, 1, 0, 'num')")
@@ -192,7 +192,7 @@ sql("delete from t0 where k0=15")
 sql("insert into t0 values(1, 'Aardvark ')")
 sql("insert into t0 values(2, 'Bilimbi')")
 sql("insert into t0 values(3, 'Creature ')")
-admin("{ box.space[0]:select(1) }")
+admin("box.space[0]:select(1)")
 admin("box.space[0].index[0].idx:min()")
 admin("box.space[0].index[0].idx:max()")
 admin("box.space[0].index[1].idx:min()")
diff --git a/test/lib/tarantool_server.py b/test/lib/tarantool_server.py
index f1cfc5b3a6..7164165067 100644
--- a/test/lib/tarantool_server.py
+++ b/test/lib/tarantool_server.py
@@ -343,12 +343,10 @@ class TarantoolServer(Server):
             os.kill(pid, signal.SIGTERM)
         #self.process.kill(signal.SIGTERM)
         if self.gdb or self.valgrind:
-            time = 0
-            while time < (1<<30) :
+            while True:
                 if self.process.poll() != None:
                     break
-                time += 1
-                sleep(1)
+                time.sleep(1)
         else:
             self.process.wait()
 
-- 
GitLab