From 3e14516d8602f77427f593d3f9bfcfa328fc9757 Mon Sep 17 00:00:00 2001 From: Madelyn Olson Date: Mon, 2 Sep 2024 11:01:59 -0700 Subject: [PATCH] Initialize all the fields for the test kvstore (#982) Follow up to https://github.com/valkey-io/valkey/pull/966, which didn't update the kvstore tests. I'm not actually entirely clear why it fixes it, but the consistency prevents the crash very reliably so will merge it now and maybe see if Zhao has a better explanation. --------- Signed-off-by: Madelyn Olson --- src/unit/test_kvstore.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/unit/test_kvstore.c b/src/unit/test_kvstore.c index abf620a4f..b3eff7d13 100644 --- a/src/unit/test_kvstore.c +++ b/src/unit/test_kvstore.c @@ -10,7 +10,15 @@ void freeTestCallback(dict *d, void *val) { zfree(val); } -dictType KvstoreDictTestType = {hashTestCallback, NULL, NULL, freeTestCallback, NULL, NULL}; +dictType KvstoreDictTestType = {hashTestCallback, + NULL, + NULL, + freeTestCallback, + NULL, + NULL, + kvstoreDictRehashingStarted, + kvstoreDictRehashingCompleted, + kvstoreDictMetadataSize}; char *stringFromInt(int value) { char buf[32];