Skip to content

Commit

Permalink
RDB fuzz test cases
Browse files Browse the repository at this point in the history
Former-commit-id: 6df4d29
  • Loading branch information
JohnSully committed Sep 28, 2019
1 parent 2c6fdf0 commit 4bf3388
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 0 deletions.
13 changes: 13 additions & 0 deletions fuzz/rdb/dict.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
="repl-stream-db"
="repl-id"
="repl-offset"
="lua"
="redis-ver"
="ctime"
="used-mem"
="aof-preamble"
="redis-bits"
="mvcc-tstamp"
="keydb-subexpire-key"
="keydb-subexpire-when"

Binary file added fuzz/rdb/testcases/empty.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/expire.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/expireonload.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/integer.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/integer_shared.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/multidb.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/replica.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/set.rdb
Binary file not shown.
Binary file added fuzz/rdb/testcases/string.rdb
Binary file not shown.
4 changes: 4 additions & 0 deletions src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5243,6 +5243,10 @@ int main(int argc, char **argv) {
aeReleaseLock(); //Finally we can dump the lock
moduleReleaseGIL(true);

// If we're just fuzzing then we've already loaded the RDB so just quit successfully
if (strstr(argv[0],"keydb-fuzz-rdb") != NULL)
return EXIT_SUCCESS;

serverAssert(cserver.cthreads > 0 && cserver.cthreads <= MAX_EVENT_LOOPS);
pthread_t rgthread[MAX_EVENT_LOOPS];
for (int iel = 0; iel < cserver.cthreads; ++iel)
Expand Down

0 comments on commit 4bf3388

Please sign in to comment.