summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog32
-rw-r--r--doc/RpushCommand.html4
-rw-r--r--redis.c6
-rw-r--r--test-redis.tcl2
-rw-r--r--tests/support/server.tcl55
-rw-r--r--tests/test_helper.tcl1
6 files changed, 91 insertions, 9 deletions
diff --git a/Changelog b/Changelog
index 0ddf1c703..46422bceb 100644
--- a/Changelog
+++ b/Changelog
@@ -1,7 +1,38 @@
+2010-05-21 redis version is now 1.3.14 (aka 2.0.0 RC1) (antirez)
+2010-05-21 html doc updated (antirez)
+2010-05-21 by default test with valgrind does not show full leak info (antirez)
+2010-05-21 minor fix for the skiplist code, resulting in a false positive with valgrind, and in general into a useless small allocation (antirez)
+2010-05-21 Merge branch 'master' of git@github.com:antirez/redis (antirez)
+2010-05-21 tests suite initial support for valgrind, fixed the old test suite until the new one is able to target a specific host/port (antirez)
+2010-05-20 Don't exit with error in tests temp file cleanup if there are no files to clean (antirez)
+2010-05-20 fix memory leak on 32-bit builds (Pieter Noordhuis)
+2010-05-20 Merge branch 'master' of github.com:antirez/redis (antirez)
+2010-05-20 Fix for DEBUG DIGEST (antirez)
+2010-05-20 Merge branch 'test_vm' of git://github.com/pietern/redis (antirez)
+2010-05-20 code to enable running tests with the vm enabled (Pieter Noordhuis)
+2010-05-20 minor change to shutdown (antirez)
+2010-05-20 shutdown on SIGTERM (antirez)
+2010-05-20 Merge http://github.com/ngmoco/redis (antirez)
+2010-05-20 fix compile error on solaris (Pieter Noordhuis)
+2010-05-20 added regression for zipmap bug (antirez)
+2010-05-20 fix lookup of keys with length larger than ZIPMAP_BIGLEN (Pieter Noordhuis)
+2010-05-19 TODO updated (antirez)
+2010-05-19 initial tests for AOF (and small changes to server.tcl to support these) (Pieter Noordhuis)
+2010-05-19 Merge branch 'master' into integration (Pieter Noordhuis)
+2010-05-19 Fix for 'CONFIG SET appendonly no' (antirez)
+2010-05-19 It's now possible to turn off and on the AOF via CONFIG (antirez)
+2010-05-18 git hash 00000000 in reelase.h when git is not found enabled again after some shell scripting fix that is now compatible with most shells (antirez)
+2010-05-18 build fixed when simpler shells are used to create release.h (antirez)
+2010-05-18 use git diff when generating release.h to check for dirty status (antirez)
+2010-05-18 Solaris fixes (antirez)
+2010-05-18 html doc rebuild (antirez)
+2010-05-18 buliding of release.h moved into an external script. Avoided recompialtion of redis.c if git sha1 is the same as the previous one (antirez)
+2010-05-17 create release.h in make process and add this information to INFO listing (Pieter Noordhuis)
2010-05-16 Redis version is now 1.3.12 (antirez)
2010-05-16 redis version is now 1.3.11 (antirez)
2010-05-16 random refactoring and speedups (antirez)
2010-05-16 faster INCR with very little efforts... (antirez)
+2010-05-15 print warnings in redis log when a test raises an exception (very likely to be caused by something like a failed assertion) (Pieter Noordhuis)
2010-05-15 Merge branch 'redis-cli-fix' of http://github.com/tizoc/redis (antirez)
2010-05-15 added pid info to the check memory leaks test, so that those tests don't appear to be duplicated (antirez)
2010-05-15 Merge branch 'integration' of git://github.com/pietern/redis (antirez)
@@ -26,6 +57,7 @@
2010-05-14 Don't rely on cliReadReply being able to return on shutdown (Bruno Deferrari)
2010-05-14 If command is a shutdown, ignore errors on reply (Bruno Deferrari)
2010-05-14 DEBUG DIGEST implemented, in order to improve the ability to test persistence and replication consistency (antirez)
+2010-05-13 Add SIGTERM shutdown handling. (Ashley Martens)
2010-05-13 makefile deps updated (antirez)
2010-05-13 conflicts resolved (antirez)
2010-05-13 feed SETEX as SET and EXPIREAT to AOF (Pieter Noordhuis)
diff --git a/doc/RpushCommand.html b/doc/RpushCommand.html
index 18376bc16..d7fe7de5a 100644
--- a/doc/RpushCommand.html
+++ b/doc/RpushCommand.html
@@ -28,8 +28,8 @@
<div class="narrow">
&iuml;&raquo;&iquest;#sidebar <a href="ListCommandsSidebar.html">ListCommandsSidebar</a><h3><a name="RPUSH _key_ _string_">RPUSH _key_ _string_</a></h3>
<h3><a name="LPUSH _key_ _string_">LPUSH _key_ _string_</a></h3>
-<i>Time complexity: O(1)</i><blockquote>Add the <i>string</i> value to the head (RPUSH) or tail (LPUSH) of the liststored at <i>key</i>. If the key does not exist an empty list is created just beforethe append operation. If the key exists but is not a List an erroris returned.</blockquote>
-<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Status code reply</a>
+<i>Time complexity: O(1)</i><blockquote>Add the <i>string</i> value to the head (LPUSH) or tail (RPUSH) of the liststored at <i>key</i>. If the key does not exist an empty list is created just beforethe append operation. If the key exists but is not a List an erroris returned.</blockquote>
+<h2><a name="Return value">Return value</a></h2><a href="ReplyTypes.html">Integer reply</a>, specifically, the number of elements inside the list after the push operation.
</div>
diff --git a/redis.c b/redis.c
index 76682d827..dc8d84ff8 100644
--- a/redis.c
+++ b/redis.c
@@ -27,7 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#define REDIS_VERSION "1.3.13"
+#define REDIS_VERSION "1.3.14"
#include "fmacros.h"
#include "config.h"
@@ -5412,8 +5412,10 @@ static zskiplistNode *zslCreateNode(int level, double score, robj *obj) {
zskiplistNode *zn = zmalloc(sizeof(*zn));
zn->forward = zmalloc(sizeof(zskiplistNode*) * level);
- if (level > 0)
+ if (level > 1)
zn->span = zmalloc(sizeof(unsigned int) * (level - 1));
+ else
+ zn->span = NULL;
zn->score = score;
zn->obj = obj;
return zn;
diff --git a/test-redis.tcl b/test-redis.tcl
index 3b5900f96..0484c61e9 100644
--- a/test-redis.tcl
+++ b/test-redis.tcl
@@ -4,7 +4,7 @@
# more information.
set tcl_precision 17
-source redis.tcl
+source tests/support/redis.tcl
set ::passed 0
set ::failed 0
diff --git a/tests/support/server.tcl b/tests/support/server.tcl
index 18728f912..9bec2bc7f 100644
--- a/tests/support/server.tcl
+++ b/tests/support/server.tcl
@@ -7,6 +7,20 @@ proc error_and_quit {config_file error} {
exit 1
}
+proc check_valgrind_errors stderr {
+ set fd [open $stderr]
+ set buf [read $fd]
+ close $fd
+
+ if {![regexp -- {ERROR SUMMARY: 0 errors} $buf] ||
+ ![regexp -- {definitely lost: 0 bytes} $buf]} {
+ puts "*** VALGRIND ERRORS ***"
+ puts $buf
+ puts "--- press enter to continue ---"
+ gets stdin
+ }
+}
+
proc kill_server config {
# nevermind if its already dead
if {![is_alive $config]} { return }
@@ -29,6 +43,11 @@ proc kill_server config {
catch {exec kill $pid}
after 10
}
+
+ # Check valgrind errors if needed
+ if {$::valgrind} {
+ check_valgrind_errors [dict get $config stderr]
+ }
}
proc is_alive config {
@@ -40,6 +59,25 @@ proc is_alive config {
}
}
+proc ping_server {host port} {
+ set retval 0
+ if {[catch {
+ set fd [socket $::host $::port]
+ fconfigure $fd -translation binary
+ puts $fd "PING\r\n"
+ flush $fd
+ set reply [gets $fd]
+ if {[string range $reply 0 4] eq {+PONG} ||
+ [string range $reply 0 3] eq {-ERR}} {
+ set retval 1
+ }
+ close $fd
+ } e]} {
+ puts "Can't PING server at $host:$port... $e"
+ }
+ return $retval
+}
+
set ::global_overrides {}
proc start_server {filename overrides {code undefined}} {
set data [split [exec cat "tests/assets/$filename"] "\n"]
@@ -77,16 +115,25 @@ proc start_server {filename overrides {code undefined}} {
set stdout [format "%s/%s" [dict get $config "dir"] "stdout"]
set stderr [format "%s/%s" [dict get $config "dir"] "stderr"]
- exec ./redis-server $config_file > $stdout 2> $stderr &
- after 500
+
+ if {$::valgrind} {
+ exec valgrind ./redis-server $config_file > $stdout 2> $stderr &
+ after 2000
+ } else {
+ exec ./redis-server $config_file > $stdout 2> $stderr &
+ after 500
+ }
# check that the server actually started
- if {[file size $stderr] > 0} {
+ if {$code ne "undefined" && ![ping_server $::host $::port]} {
error_and_quit $config_file [exec cat $stderr]
}
# find out the pid
- regexp {^\[(\d+)\]} [exec head -n1 $stdout] _ pid
+ while {![info exists pid]} {
+ regexp {^\[(\d+)\]} [exec head -n1 $stdout] _ pid
+ after 100
+ }
# setup properties to be able to initialize a client object
set host $::host
diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl
index a40602f39..1b6d161a5 100644
--- a/tests/test_helper.tcl
+++ b/tests/test_helper.tcl
@@ -12,6 +12,7 @@ source tests/support/util.tcl
set ::host 127.0.0.1
set ::port 16379
set ::traceleaks 0
+set ::valgrind 0
proc execute_tests name {
set cur $::testnum