valkey/tests/modules
meir@redislabs.com a89bf734a9 Fix RM_ScanKey module api not to return int encoded strings
The scan key module API provides the scan callback with the current
field name and value (if it exists). Those arguments are RedisModuleString*
which means it supposes to point to robj which is encoded as a string.
Using createStringObjectFromLongLong function might return robj that
points to an integer and so break a module that tries for example to
use RedisModule_StringPtrLen on the given field/value.

The PR introduces a fix that uses the createObject function and sdsfromlonglong function.
Using those function promise that the field and value pass to the to the
scan callback will be Strings.

The PR also changes the Scan test module to use RedisModule_StringPtrLen
to catch the issue. without this, the issue is hidden because
RedisModule_ReplyWithString knows to handle integer encoding of the
given robj (RedisModuleString).

The PR also introduces a new test to verify the issue is solved.
2020-06-14 11:20:15 +03:00
..
auth.c Fixed some documentation 2019-12-17 07:49:21 +00:00
blockonkeys.c Fix memory corruption in moduleHandleBlockedClients 2020-04-01 12:53:26 +03:00
commandfilter.c Make module tests pass with valgrind, and fix a leak in diskless load 2019-10-24 09:45:25 +03:00
datatype.c Improve RM_ModuleTypeReplaceValue() API. 2019-12-12 18:50:11 +02:00
fork.c fix race in module api test for fork 2020-02-23 16:48:37 +02:00
hooks.c Modules hooks: complete missing hooks for the initial set of hooks 2019-10-29 17:59:09 +02:00
infotest.c Add RM_ServerInfoGetFieldUnsigned 2019-11-04 08:50:29 +02:00
Makefile 32bit CI needs to build modules correctly 2020-05-27 18:19:30 +03:00
misc.c Fix memory leak in test_ld_conv 2020-02-06 18:36:21 +05:30
propagate.c Modify the propagate unit test to show more cases. 2020-03-31 12:04:06 +02:00
scan.c Fix RM_ScanKey module api not to return int encoded strings 2020-06-14 11:20:15 +03:00
testrdb.c fix crash in module short read test 2019-12-02 19:17:35 +02:00