box/socket.test is broken (again!)

Bug #1192951 reported by Roman Tsisyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Fix Released
Low
Roman Tsisyk

Bug Description

git describe
1.5.0-225-gb461d9e

box/socket.test [ fail ]
Test failed! Result content mismatch:
--- box/socket.result Thu Jun 20 16:03:34 2013
+++ ../test/box/socket.reject Thu Jun 20 16:14:07 2013
@@ -142,32 +142,32 @@
 ...
 lua type(status)
 ---
- - string
+ - nil
 ...
 lua type(error_code)
 ---
- - number
+ - nil
 ...
 lua type(error_str)
 ---
- - string
+ - nil
 ...
 lua status
 ---
- - timeout
+ - nil
 ...
 lua error_code
 ---
- - 110
+ - nil
 ...
 lua error_str
 ---
- - Connection timed out
-...
-lua s:error()
----
- - 110
- - Connection timed out
+ - nil
+...
+lua s:error()
+---
+ - 0
+ - Success
 ...
 connected
 lua s:send('ping')

Revision history for this message
Roman Tsisyk (rtsisyk) wrote :

also from Gentoo:
box/socket.test [ fail ]
Test failed! Result content mismatch:
--- box/socket.result Mon Apr 8 10:26:04 2013
+++ /var/tmp/portage/dev-db/tarantool-1.4.9/work/tarantool-1.4.9/test/box/socket.reject Fri Jun 28 14:52:57 2013
@@ -54,13 +54,13 @@
 ---
  - nil
  - error
- - 111
- - Connection refused
-...
-lua s:error()
----
- - 111
- - Connection refused
+ - 9
+ - Bad file descriptor
+...
+lua s:error()
+---
+ - 9
+ - Bad file descriptor
 ...
 lua s:connect('127.0.0.1', '30303', 0.01)
 ---
@@ -142,32 +142,32 @@
 ...
 lua type(status)
 ---
- - string
+ - nil
 ...
 lua type(error_code)
 ---
- - number
+ - nil
 ...
 lua type(error_str)
 ---
- - string
+ - nil
 ...
 lua status
 ---
- - timeout
+ - nil
 ...
 lua error_code
 ---
- - 110
+ - nil
 ...
 lua error_str
 ---
- - Connection timed out
-...
-lua s:error()
----
- - 110
- - Connection timed out
+ - nil
+...
+lua s:error()
+---
+ - 0
+ - Success
 ...
 connected
 lua s:send('ping')

Fatal error: Failed to run test box/socket.test: wrong test output. Execution aborted.
make[3]: *** [test/CMakeFiles/test] Error 255
make[3]: Leaving directory `/var/tmp/portage/dev-db/tarantool-1.4.9/work/tarantool-1.4.9'
make[2]: *** [test/CMakeFiles/test.dir/all] Error 2
make[2]: Leaving directory `/var/tmp/portage/dev-db/tarantool-1.4.9/work/tarantool-1.4.9'
make[1]: *** [test/CMakeFiles/test.dir/rule] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-db/tarantool-1.4.9/work/tarantool-1.4.9'
make: *** [test] Error 2

Revision history for this message
Roman Tsisyk (rtsisyk) wrote :

There is actually two different problems:
1.
-------------
exec admin "lua n, status, error_code, error_str = s:send(string.rep('=', 200000), 0.0000001)"
exec admin "lua type(n)"
exec admin "lua type(status)"
exec admin "lua type(error_code)"
exec admin "lua type(error_str)"
exec admin "lua status"
-------------
This test tries to send 200000 char within 0.0000001 sec time limit and check that 'timedout' error happens on the socket.

On modern Linux such small packets usually send without blocking on loopback interface.
=> Increase packet size
2.
-------------
exec admin "lua s:connect('::1', '30303')"
# connection refused
exec admin "lua s:error()"
-------------
This test checks IPv6 connection.
If IPv6 is disabled (rmmod ipv6 or net.ipv6.conf.all.disable_ipv6=1) then this test will fail.
=> Remove this check from socket.test

Changed in tarantool:
assignee: nobody → Roman Tsisyk (rtsisyk)
importance: Undecided → Low
milestone: none → 1.5.1
status: New → In Progress
Kostja Osipov (kostja)
Changed in tarantool:
milestone: 1.5.1 → 1.5.2
Roman Tsisyk (rtsisyk)
Changed in tarantool:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.