Module api tests for RM_Call

Adding a test for coverage for RM_Call in a new "misc" unit
to be used for various short simple tests

also solves compilation warnings in redismodule.h and fork.c
This commit is contained in:
Oran Agra
2019-10-24 09:38:52 +03:00
parent c328c807e7
commit 0399b5a27e
7 changed files with 94 additions and 4 deletions

View File

@ -3067,7 +3067,10 @@ RedisModuleCallReply *RM_Call(RedisModuleCtx *ctx, const char *cmdname, const ch
/* We handle the above format error only when the client is setup so that
* we can free it normally. */
if (argv == NULL) goto cleanup;
if (argv == NULL) {
errno = EINVAL;
goto cleanup;
}
/* Call command filters */
moduleCallCommandFilters(c);

View File

@ -181,7 +181,7 @@ typedef struct RedisModuleEvent {
struct RedisModuleCtx;
typedef void (*RedisModuleEventCallback)(struct RedisModuleCtx *ctx, RedisModuleEvent eid, uint64_t subevent, void *data);
static RedisModuleEvent
static const RedisModuleEvent
RedisModuleEvent_ReplicationRoleChanged = {
REDISMODULE_EVENT_REPLICATION_ROLE_CHANGED,
1