From c80e9416950ac3dff7429a951a1603a3aa15c178 Mon Sep 17 00:00:00 2001 From: Kirill Yukhin <kyukhin@tarantool.org> Date: Thu, 29 Aug 2019 02:09:21 +0300 Subject: [PATCH] Add missing test for _say patch It turned out that patch d0e38d5 wasn't accompanied w/ a test. Add proper check. --- test/box/misc.result | 14 ++++++++++++++ test/box/misc.test.lua | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/test/box/misc.result b/test/box/misc.result index 9e93d8fbf1..204c2671bf 100644 --- a/test/box/misc.result +++ b/test/box/misc.result @@ -1312,3 +1312,17 @@ format[1].is_nullable = true tuple_format = box.internal.new_tuple_format(format) --- ... +-- +-- Test that calling _say using FFI w/ null filepointer doesn't +-- segfault +-- +box.cfg{} +--- +... +local ffi = require'ffi' ffi.C._say(ffi.C.S_WARN, nil, 0, nil, "%s", "test log") +--- +... +test_run:grep_log('default', 'test log') +--- +- test log +... diff --git a/test/box/misc.test.lua b/test/box/misc.test.lua index a777777741..cc223b2eff 100644 --- a/test/box/misc.test.lua +++ b/test/box/misc.test.lua @@ -375,3 +375,11 @@ tuple_format = box.internal.new_tuple_format(box.space._space:format()) -- Check is_nullable option fo field format[1].is_nullable = true tuple_format = box.internal.new_tuple_format(format) + +-- +-- Test that calling _say using FFI w/ null filepointer doesn't +-- segfault +-- +box.cfg{} +local ffi = require'ffi' ffi.C._say(ffi.C.S_WARN, nil, 0, nil, "%s", "test log") +test_run:grep_log('default', 'test log') -- GitLab