Commit Graph

53 Commits

Author SHA1 Message Date
antirez
73305861f5 Test engine: experimental change to avoid busy port problems. 2020-02-24 10:46:23 +01:00
antirez
e78c4e813c Test engine: detect timeout when checking for Redis startup. 2020-02-21 18:55:56 +01:00
antirez
c6954de3ea Test engine: better tracking of what workers are doing. 2020-02-21 17:08:45 +01:00
Yossi Gottlieb
b087dd1db6 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
maya-rv
227965221a
Fix typo 2018-09-04 13:32:02 +03:00
Oran Agra
751eea24c4 test suite infra improvements and fix
* fail the test (exit code) in case of timeout.
* add --wait-server to allow attaching a debugger
* add --dont-clean to keep log files when tests are done
2018-06-26 20:23:55 +03:00
antirez
8444b46d20 Fix test "server is up" detection after logging changes. 2016-12-19 16:49:58 +01:00
antirez
36be34bb87 Test: support for stack logging for OSX malloc/leaks. 2015-10-01 13:02:25 +02:00
antirez
386804246f Test: be more patient waiting for servers to exit.
This should likely fix a false positive when running with the --valgrind
option.
2015-03-31 23:43:38 +02:00
Matt Stancliff
491d57abaa Add --track-origins=yes to valgrind 2015-01-21 15:48:19 +01:00
antirez
fe0d371995 Test: wait for actual startup in start_server.
start_server now uses return value from Tcl exec to get the server pid,
however this introduces errors that depend from timing: a lot of the
testing code base assumed the server to be actually up and running when
server_start returns.

So the old code that waits to see the pid in the log file was restored.
2014-11-28 11:49:26 +01:00
antirez
bd3a51615c Test: try to cleanup still running Redis instances on exit.
It's hard to run the Redis test continuously if it leaks processes on
exceptions / errors.
2014-11-28 11:38:17 +01:00
Matt Stancliff
1cedebb799 Remove trailing spaces from tests 2014-09-29 06:49:08 -04:00
Matt Stancliff
6c16ecaaaa Fix test framework to detect proper server PID
Previously the PID format was:
[PID] Timestamp

But it recently changed to:
PID:X Timestamp

The tcl testing framework was grabbing the PID from \[\d+\], but
that's not valid anymore.

Now we grab the pid from "PID: <PID>" in the part of Redis startup
output to the right of the ASCII logo.
2014-05-23 13:54:29 -04:00
antirez
088b9eadc4 Test: handle new osx 'leaks' error.
Sometimes the process is still there but no longer in a state that can
be checked (after being killed). This used to happen after a call to
SHUTDOWN NOSAVE in the scripting unit, causing a false positive.
2014-05-07 16:12:32 +02:00
antirez
9e0b9f12b2 Test: do not complain when "leaks" can't run because process died. 2014-03-25 09:33:37 +01:00
antirez
a1dca2efab Test: code to test server availability refactored.
Some inline test moved into server_is_up procedure.
Also find_available_port was moved into util since it is going
to be used for the Sentinel test as well.
2014-02-17 16:44:57 +01:00
antirez
dc24a6b132 Return a specific NOAUTH error if authentication is required. 2013-02-12 16:25:41 +01:00
antirez
a18ca73681 Test: fixed osx "leaks" support in test.
Due to changes in recent releases of osx leaks utility, the osx leak
detection no longer worked. Now it is fixed in a way that should be
backward compatible.
2012-12-03 12:06:38 +01:00
YAMAMOTO Takashi
164d57c60d fix a typo in a comment 2012-10-24 17:47:56 +09:00
Michael Schlenker
875944a23f Replace unnecessary calls to echo and cat
Tcl's exec can send data to stdout itself, no need to call cat/echo for
that usually.
2012-04-17 22:20:54 +02:00
Premysl Hruby
9184f8fd00 in kill_server send the signal once, then wait for up to 5sec before sending lethal SIGKILL 2012-04-03 14:20:52 +02:00
antirez
0fefb5bbeb Redis test: regexp to check if valgrind reported errors modified. Now we no longer look at the total count because this includes "possibly lost" bytes that are not interesting for Redis (tons of false positives because of how sds.c works). 2012-03-28 10:55:17 +02:00
antirez
74f10793c8 When running the test in valgrind mode, pass the right flags to show memory leaks stack traces but only including the "definitely lost" items. 2012-03-24 12:07:14 +01:00
antirez
b1d08d4540 Redis test: wait more time for the server to start if it is running using valgrind. 2011-12-07 17:51:21 +01:00
antirez
846bcd9abe Redis test: handle inability to start the server in a better way. 2011-12-07 11:47:38 +01:00
antirez
24bfb570ee Redis test ports selection made more robust. This prevents the test from hanging if an already bound port is selected but the TCP server listening to it does not cause a protocol error with a Redis client PING. Also base port moved away from the range near to the Redis Cluster gossip ports. 2011-10-04 10:05:21 +02:00
antirez
4c378d7f6c new test engine valgrind support 2011-07-11 13:41:06 +02:00
antirez
5ab1461f98 The test now gives some more time for Redis to start before of exiting with an error, since starting with valgrind can take a significant amount of time. 2011-07-09 19:23:46 +02:00
antirez
cabe03eb75 more valgrind friendly test 2011-07-06 15:22:00 +02:00
antirez
72dff2c084 test fixed after ascii art banner modified the output of a running server 2011-04-15 16:35:54 +02:00
antirez
5e1d2d30f7 initial fix of the test suite to run both in in-memory and diskstore mode 2011-01-09 16:49:52 +01:00
antirez
5d46e370b7 diskstore more fixes 2011-01-03 17:18:37 +01:00
antirez
d6107fd6f1 Merge remote branch 'pietern/testverbosity' 2010-12-10 17:24:03 +01:00
Pieter Noordhuis
6f8a32d5c7 Be less verbose in testing; improve error handling 2010-12-10 16:13:21 +01:00
antirez
4b918769a1 command line option in test suite to activate valgrind mode 2010-12-10 15:40:48 +01:00
Pieter Noordhuis
941c9fa285 Return OK on QUIT 2010-10-13 11:25:40 +02:00
antirez
08f55b786b faster server starting in Redis tests 2010-08-31 11:17:06 +02:00
Pieter Noordhuis
a53ebb4c8e Don't abort test suite when the server block has a return value 2010-08-21 10:54:31 +02:00
antirez
e2641e09cc redis.c split into many different C files.
networking related stuff moved into networking.c

moved more code

more work on layout of source code

SDS instantaneuos memory saving. By Pieter and Salvatore at VMware ;)

cleanly compiling again after the first split, now splitting it in more C files

moving more things around... work in progress

split replication code

splitting more

Sets split

Hash split

replication split

even more splitting

more splitting

minor change
2010-07-01 14:38:51 +02:00
antirez
7d04fc7563 allow running the test suite against an external Redis instance, without auto spawning 2010-06-14 10:19:45 +02:00
Pieter Noordhuis
5a9fcb87ca tag memory leak check on kill server as "leaks" 2010-06-03 00:27:09 +02:00
Pieter Noordhuis
f6fa411d6c make sure the config it returned when called without code 2010-06-03 00:25:32 +02:00
Pieter Noordhuis
6e0e5bedd9 basic support to tag tests 2010-06-02 22:53:22 +02:00
Pieter Noordhuis
9e5d2e8bd6 changed how server.tcl accepts options to support more directives without requiring more arguments to the proc 2010-06-02 22:23:52 +02:00
Pieter Noordhuis
436f18b618 catch exceptions in the server proc, to be able to kill the entire chain of running servers 2010-06-02 21:53:10 +02:00
antirez
c22b2ec863 by default test with valgrind does not show full leak info 2010-05-21 13:58:04 +02:00
antirez
c4669d257f tests suite initial support for valgrind, fixed the old test suite until the new one is able to target a specific host/port 2010-05-21 12:00:13 +02:00
Pieter Noordhuis
f166bb1d50 code to enable running tests with the vm enabled 2010-05-20 13:58:58 +02:00
Pieter Noordhuis
53cbf66caf initial tests for AOF (and small changes to server.tcl to support these) 2010-05-19 14:54:20 +02:00