20 Commits

Author SHA1 Message Date
Oran Agra
7d3cec9686 test infra - reduce disk space usage
this is important when running a test with --loop

(cherry picked from commit fc18f16260d15b3584d92f73cebafa3a552e2686)
2020-09-10 14:09:00 +03:00
Oran Agra
b4a6b4f28d fix new rdb test failing on timing issues (#7604)
apparenlty on github actions sometimes 500ms is not enough

(cherry picked from commit 191b1181023b0860ec60afde7a41bd4f03c55097)
2020-09-01 09:27:58 +03:00
Oran Agra
558a343b3c Stabilize bgsave test that sometimes fails with valgrind (#7559)
on ci.redis.io the test fails a lot, reporting that bgsave didn't end.
increaseing the timeout we wait for that bgsave to get aborted.
in addition to that, i also verify that it indeed got aborted by
checking that the save counter wasn't reset.

add another test to verify that a successful bgsave indeed resets the
change counter.

(cherry picked from commit 49d4aebce0a0b94cd2b302d276be95d1a1ce8610)
2020-09-01 09:27:58 +03:00
Oran Agra
298e93c360 tests/valgrind: don't use debug restart (#7404)
* tests/valgrind: don't use debug restart

DEBUG REATART causes two issues:
1. it uses execve which replaces the original process and valgrind doesn't
   have a chance to check for errors, so leaks go unreported.
2. valgrind report invalid calls to close() which we're unable to resolve.

So now the tests use restart_server mechanism in the tests, that terminates
the old server and starts a new one, new PID, but same stdout, stderr.

since the stderr can contain two or more valgrind report, it is not enough
to just check for the absence of leaks, we also need to check for some known
errors, we do both, and fail if we either find an error, or can't find a
report saying there are no leaks.

other changes:
- when killing a server that was already terminated we check for leaks too.
- adding DEBUG LEAK which was used to test it.
- adding --trace-children to valgrind, although no longer needed.
- since the stdout contains two or more runs, we need slightly different way
  of checking if the new process is up (explicitly looking for the new PID)
- move the code that handles --wait-server to happen earlier (before
  watching the startup message in the log), and serve the restarted server too.

* squashme - CR fixes

(cherry picked from commit 8d4f055e43ab554adfce617c971f10c4b6423484)
2020-07-20 21:08:26 +03:00
Oran Agra
a3dd04410d fix redis 6.0 not freeing closed connections during loading.
This bug was introduced by a recent change in which readQueryFromClient
is using freeClientAsync, and despite the fact that now
freeClientsInAsyncFreeQueue is in beforeSleep, that's not enough since
it's not called during loading in processEventsWhileBlocked.
furthermore, afterSleep was called in that case but beforeSleep wasn't.

This bug also caused slowness sine the level-triggered mode of epoll
kept signaling these connections as readable causing us to keep doing
connRead again and again for ll of these, which keep accumulating.

now both before and after sleep are called, but not all of their actions
are performed during loading, some are only reserved for the main loop.

fixes issue #7215
2020-05-14 11:29:43 +02:00
Oran Agra
2add4524c5 Fix lastbgsave_status, when new child signal handler get intended kill
And add a test for that.
2019-09-26 15:16:34 +03:00
Oran Agra
dcd3529acf minor fix in creating a stream NACK for rdb and defrag tests 2018-06-27 15:34:17 +03:00
Oran Agra
160802b06f add active defrag support for streams 2018-06-27 15:00:41 +03:00
antirez
93b97389fb Test RDB stream encoding saving/loading. 2018-06-19 16:29:15 +02:00
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
d403c08878 Fix test for new RDB checksum failure message. 2016-07-04 12:41:35 +02:00
antirez
dc69b7ab01 Fix RDB encoding test for new csvdump format. 2015-08-05 14:05:43 +02:00
antirez
d7d689e5cf Fix RDB corruption test after server behavior change. 2015-02-04 11:53:19 +01:00
antirez
de5e085f1f Test: fix RDB test checking file permissions.
When the test is executed using the root account, setting the permission
to 222 does not work as expected, as root can read files with 222
permission.

Now we skip the test if root is detected.

This fixes issue #1034 and the duplicated #1040 issue.

Thanks to Jan-Erik Rediger (@badboy on Github) for finding a way to reproduce the issue.
2013-04-23 14:16:50 +02:00
antirez
971d6b329d Test: split conceptually unrelated comments in RDB test. 2013-04-22 11:25:49 +02:00
antirez
dec5a0bde9 Test: make sure broken RDB checksum is detected. 2013-03-13 11:12:45 +01:00
antirez
d42f82488d Test: more RDB loading checks.
A test for issue #1001 is included.
2013-03-13 10:04:33 +01:00
antirez
7614cf793d Test: check that Redis starts empty without an RDB file. 2013-03-12 19:55:33 +01:00
antirez
4c955a5715 Contextualize comment. 2012-03-23 20:24:40 +01:00
antirez
251268cbe0 RDB load of different encodings test added. 2012-03-23 20:24:30 +01:00