From 49899866c89e9383a590e02d1846fb88e1729bc5 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 28 Jun 2016 09:26:28 +0200 Subject: [PATCH] Regression test for issue #3343 exact min crash sequence. Note: it was verified that it can crash the test suite without the patch applied. --- tests/unit/type/list-3.tcl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/unit/type/list-3.tcl b/tests/unit/type/list-3.tcl index ece6ea2d..744f7037 100644 --- a/tests/unit/type/list-3.tcl +++ b/tests/unit/type/list-3.tcl @@ -13,6 +13,22 @@ start_server { assert_equal [r lindex l 1] [lindex $mylist 1] } + test {Regression for quicklist #3343 bug} { + r del mylist + r lpush mylist 401 + r lpush mylist 392 + r rpush mylist [string repeat x 5105]"799" + r lset mylist -1 [string repeat x 1014]"702" + r lpop mylist + r lset mylist -1 [string repeat x 4149]"852" + r linsert mylist before 401 [string repeat x 9927]"12" + r lrange mylist 0 -1 + r ping ; # It's enough if the server is still alive + } {PONG} + + test {Stress tester for #3343-alike bugs} { + } + tags {slow} { test {ziplist implementation: value encoding and backlink} { if {$::accurate} {set iterations 100} else {set iterations 10}