Commit Diff


commit - 0be3d626d12e4cf587d3cf70c5ea99407b806a37
commit + 118b238d8f47a69f0457fa74591b7c91cd086202
blob - /dev/null
blob + 6607948b321b205dceee34010b061cf6118f98c3 (mode 644)
--- /dev/null
+++ tests/tarantool_net_box_call.lua
@@ -0,0 +1,34 @@
+-- "One byte of death"
+-- https://github.com/tarantool/tarantool/issues/6781
+-- https://www.tarantool.io/en/doc/latest/reference/reference_lua/net_box/
+
+local luzer = require("luzer")
+local net_box = require("net.box")
+
+local function TestOneInput(buf)
+    os.execute("rm -f *.snap")
+    box.cfg{
+        listen = 3303,
+    }
+    local conn = net_box.connect("3303")
+	pcall(conn.call, conn, buf)
+end
+
+if arg[1] then
+    local fh = io.open(arg[1])
+    local testcase = fh:read("*all")
+    TestOneInput(testcase)
+    os.exit(0)
+end
+
+local script_path = debug.getinfo(1).source:match("@?(.*/)")
+
+local args = {
+    max_len = 4096,
+    corpus = script_path .. "tarantool-corpus/net_box_call",
+    print_pcs = 1,
+    artifact_prefix = "net_box_call_",
+    max_total_time = 60,
+    print_final_stats = 1,
+}
+luzer.Fuzz(TestOneInput, nil, args)