redis/tests
Meir Shpilraien (Spielrein) 9ae4f5c73d
Fix script kill to work also on scripts that use pcall (#8661)
pcall function runs another LUA function in protected mode, this means
that any error will be caught by this function and will not stop the LUA
execution. The script kill mechanism uses error to stop the running script.
Scripts that uses pcall can catch the error raise by the script kill mechanism,
this will cause a script like this to be unkillable:

local f = function()
        while 1 do
                redis.call('ping')
        end
end
while 1 do
        pcall(f)
end

The fix is, when we want to kill the script, we set the hook function to be invoked 
after each line. This will promise that the execution will get another
error before it is able to enter the pcall function again.
2021-03-17 18:52:11 +02:00
..
assets Sanitize dump payload: ziplist, listpack, zipmap, intset, stream 2020-12-06 14:54:34 +02:00
cluster Optimize CLUSTER SLOTS reply by reducing unneeded loops (#8541) 2021-03-11 22:40:35 -08:00
helpers revert an accidental test code change done as part of the tls project 2019-12-01 16:10:09 +02:00
integration Improve redis-cli non-binary safe string handling. (#8566) 2021-03-04 15:03:49 +02:00
modules Fix some memory leaks in propagagte.c (#8636) 2021-03-11 13:50:13 +02:00
sentinel Fix errors with sentinel leaked fds test. (#8482) 2021-02-11 15:25:01 +02:00
support When tests exit normally, some processes may still be alive (#8647) 2021-03-16 17:25:30 +02:00
tmp minor fixes to the new test suite, html doc updated 2010-05-14 18:48:33 +02:00
unit Fix script kill to work also on scripts that use pcall (#8661) 2021-03-17 18:52:11 +02:00
instances.tcl Allow stopped redis processes to be killed in tests (#8552) 2021-02-24 14:26:16 -08:00
test_helper.tcl Make port, tls-port and bind configurations modifiable (#8510) 2021-03-01 16:04:44 +02:00