612 Commits

Author SHA1 Message Date
antirez
55a899e67a Solaris fixes about tail usage and atomic vars.
Testing with Solaris C compiler (SunOS 5.11 11.2 sun4v sparc sun4v)
there were issues compiling due to atomicvar.h and running the
tests also failed because of "tail" usage not conform with Solaris
tail implementation. This commit fixes both the issues.
2017-02-22 13:08:21 +01:00
antirez
334f80df0c Test: fix conditional execution of HINCRBYFLOAT representation test. 2017-02-22 12:00:09 +01:00
antirez
dd144642d1 Geo: fuzzy test inconsistency report fixed to show all points.
We need to report all the points added into the set, not just the ones
matching the Tcl distance algo.
2016-12-20 12:22:11 +01:00
antirez
e4ee2ac1b7 Geo: improve fuzz test.
The test now uses more diverse radius sizes, especially sizes near or
greater the whole earth surface are used, that are known to trigger edge
cases. Moreover the PRNG seeding was probably resulting into the same
sequence tested over and over again, now seeding unsing the current unix
time in milliseconds.

Related to #3631.
2016-12-05 14:16:46 +01:00
antirez
14c11b2540 Test: WAIT tests added in wait.tcl unit. 2016-11-18 13:10:29 +01:00
antirez
9481b398e9 Test: regression test for #3564 added. 2016-10-31 15:46:58 +01:00
antirez
d64b08bb64 Fix SELECT test, broken cause change in error msg. 2016-10-14 15:48:11 +02:00
antirez
8107b61b0d RDB AOF preamble: test it in the aofrw unit. 2016-08-24 15:39:39 +02:00
antirez
23bdeec122 Multiple GEORADIUS bugs fixed.
By grepping the continuous integration errors log a number of GEORADIUS
tests failures were detected.

Fortunately when a GEORADIUS failure happens, the test suite logs enough
information in order to reproduce the problem: the PRNG seed,
coordinates and radius of the query.

By reproducing the issues, three different bugs were discovered and
fixed in this commit. This commit also improves the already good
reporting of the fuzzer and adds the failure vectors as regression
tests.

The issues found:

1. We need larger squares around the poles in order to cover the area
requested by the user. There were already checks in order to use a
smaller step (larger squares) but the limit set (+/- 67 degrees) is not
enough in certain edge cases, so 66 is used now.

2. Even near the equator, when the search area center is very near the
edge of the square, the north, south, west or ovest square may not be
able to fully cover the specified radius. Now a test is performed at the
edge of the initial guessed search area, and larger squares are used in
case the test fails.

3. Because of rounding errors between Redis and Tcl, sometimes the test
signaled false positives. This is now addressed.

Whenever possible the original code was improved a bit in other ways. A
debugging example stanza was added in order to make the next debugging
session simpler when the next bug is found.
2016-07-27 11:34:25 +02:00
antirez
bf51d7ed15 Regression test for issue #3333. 2016-07-06 11:50:20 +02:00
antirez
a0c8276e16 Test: new randomized stress tester for #3343 alike bugs. 2016-06-28 09:42:20 +02:00
antirez
bb0776971f Stress tester WIP. 2016-06-28 09:33:36 +02:00
antirez
224533b454 Regression test for issue #3343 exact min crash sequence.
Note: it was verified that it can crash the test suite without the patch
applied.
2016-06-28 09:27:14 +02:00
antirez
4e95d8c0a1 Test TOUCH and new TTL / TYPE behavior about object access time. 2016-06-15 17:15:51 +02:00
antirez
df28ab3fce Regression test for #3282. 2016-06-15 11:49:49 +02:00
Pierre Chapuis
08a8ae709b make RPUSHX and LPUSHX variadic 2016-06-05 16:50:24 +02:00
antirez
d31703f3a5 Now that SPOP can be called by scripts use BLPOP on 's' flag test. 2016-05-31 16:43:23 +02:00
antirez
3af352d4ba Test for BITFIELD regression #3221. 2016-05-18 14:53:30 +02:00
antirez
97e1c04f9c Scripting test: match new error message. 2016-05-06 09:12:56 +02:00
Oran Agra
7496636280 various cleanups and minor fixes 2016-04-25 16:49:57 +03:00
Damian Janowski
217f52ffe6 Fix ZINCRBY return value. 2016-04-18 00:35:54 -03:00
antirez
a37d517fc2 BITFIELD: overflow wrap behavior fuzz tester. 2016-03-02 17:22:42 +01:00
antirez
d9cd234b39 BITFIELD basic unit tests. 2016-03-02 16:31:02 +01:00
antirez
33b1f57f32 BITFIELD: overflow fuzzy testing. 2016-03-02 15:16:17 +01:00
antirez
fa4c5200a3 Fix typo in bitops.tcl comment. 2016-03-02 15:14:59 +01:00
James Rouzier
9ebde01b73 If the unit of a timeout is seconds treat it a float 2016-02-23 12:05:29 -05:00
antirez
3b3a959c85 GEOADD STORE/STOREDIST tests. 2016-02-18 14:42:42 +01:00
Salvatore Sanfilippo
80d79c718e Merge pull request #2726 from seppo0010/patch-2
Fix race condition in unit/introspection
2016-01-15 16:24:06 +01:00
antirez
9361687f30 Scripting: handle trailing comments.
This fix, provided by Paul Kulchenko (@pkulchenko), allows the Lua
scripting engine to evaluate statements with a trailing comment like the
following one:

    EVAL "print() --comment" 0

Lua can't parse the above if the string does not end with a newline, so
now a final newline is always added automatically. This does not change
the SHA1 of scripts since the SHA1 is computed on the body we pass to
EVAL, without the other code we add to register the function.

Close #2951.
2016-01-08 15:44:21 +01:00
antirez
b5967cf2ab MIGRATE: test more corner cases. 2015-12-11 14:27:08 +01:00
antirez
c72ee4c632 Test: pipelined MIGRATE tests added. 2015-12-11 13:41:58 +01:00
antirez
74f83badbf Test HINCRBYFLOAT rounding only in x86_64 and when valgrind is not in use.
64 bit double math is not enough to make the test passing, and rounding
to 1.2999999 instead of 1.23 is not an error in the implementation.
Valgrind and sometimes other archs are not able to work with 80 bit
doubles.
2015-11-28 09:28:37 +01:00
antirez
82c68fa048 Add regression test for HINCRBYFLOAT formatting change.
This test was kindly provided by Jan-Erik Rediger (@badboy here on
Github) that discovered the issue.

See issue #2846.
2015-11-04 17:02:34 +01:00
antirez
04278a276a Test: improve PFCOUNT with multiple keys testing.
An user raised a question about a given behavior of PFCOUNT. Added a
test to show the behavior (union) is correct when most of the items are
in common.
2015-11-03 19:03:17 +01:00
antirez
dbebe3b4cd Scripting: commands replication tests. 2015-10-30 12:06:09 +01:00
antirez
65ca281273 Scripting: execute tests with command replication as well. 2015-10-30 12:06:09 +01:00
antirez
eca9dc7b3d Scripting: test Redis provided Lua functions error reporting. 2015-10-30 12:06:09 +01:00
antirez
6a3e201234 Test: basic lazyfree unit test. 2015-10-09 09:47:17 +02:00
antirez
dc5b467b17 Regression test for GEORADIUS COUNT arity check. 2015-10-06 09:27:29 +02:00
antirez
2a014229f0 Test: fix false positive in HSTRLEN test.
HINCRBY* tests later used the value "tmp" that was sometimes generated
by the random key generation function. The result was ovewriting what
Tcl expected to be inside Redis with another value, causing the next
HSTRLEN test to fail.
2015-09-15 09:37:30 +02:00
antirez
3ba00aae8e GEORADIUS: Don't report duplicates when radius is huge.
Georadius works by computing the center + neighbors squares covering all
the area of the specified position and radius. Then a distance filter is
used to remove elements which are actually outside the range.

When a huge radius is used, like 5000 km or more, adjacent neighbors may
collide and be the same, leading to the reporting of the same element
multiple times. This only happens in the edge case of huge radius but is
not ideal.

A robust but slow solution would involve qsorting the range to remove
all the duplicates. However since the collisions are only in adjacent
boxes, for the way they are ordered in the code, it is much faster to
just check if the current box is the same as the previous one processed.

This commit adds a regression test for the bug.

Fixes #2767.
2015-09-14 23:10:50 +02:00
antirez
f2a7d445c6 Test: MOVE expire test improved.
Related to #2765.
2015-09-14 12:35:55 +02:00
antirez
13dff381b3 MOVE now can move TTL metadata as well.
MOVE was not able to move the TTL: when a key was moved into a different
database number, it became persistent like if PERSIST was used.

In some incredible way (I guess almost nobody uses Redis MOVE) this bug
remained unnoticed inside Redis internals for many years.
Finally Andy Grunwald discovered it and opened an issue.

This commit fixes the bug and adds a regression test.

Close #2765.
2015-09-14 12:30:00 +02:00
antirez
e8bee5c796 Test: print info on HSTRLEN test failure.
This additional info may provide more clues about the test randomly
failing from time to time. Probably the failure is due to some previous
test that overwrites the logical content in the Tcl variable, but this
will make the problem more obvious.
2015-09-07 11:14:52 +02:00
Sebastian Waisbrot
7be8687677 Fix race condition in unit/introspection
Make sure monitor is attached in one connection before issuing commands to be monitored in another one
2015-08-11 22:56:17 -07:00
antirez
a2482feaa5 GEOENCODE / GEODECODE commands removed.
Rationale:

1. The commands look like internals exposed without a real strong use
case.
2. Whatever there is an use case, the client would implement the
commands client side instead of paying RTT just to use a simple to
reimplement library.
3. They add complexity to an otherwise quite straightforward API.

So for now KILLED ;-)
2015-07-09 17:42:59 +02:00
antirez
f7922b6db7 Geo: GEODIST and tests. 2015-06-29 12:44:34 +02:00
antirez
ac7f59fac5 Geo: GEOPOS command and tests. 2015-06-29 10:47:07 +02:00
antirez
665099cb02 Geo: GEORADIUS COUNT tests. 2015-06-29 09:52:23 +02:00
antirez
e1db8275e9 Geo: GEOENCODE test fixed for new return value. 2015-06-29 09:46:58 +02:00