From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4080045C304 for ; Tue, 1 Dec 2020 02:56:20 +0300 (MSK) From: Vladislav Shpilevoy Date: Tue, 1 Dec 2020 00:56:08 +0100 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 00/10] Raft module, part 3 - fake network and libev for Raft and SWIM List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org The patchset is a third part of Raft relocation to a new module for the sake of unit testing. This part extracts fake network and libev libraries from SWIM unit tests to a new library fakesys, which will be used by Raft. The patchset only moves the existing code. For the actual Raft tests it is likely I will add some new Raft-specific code, and probably will generalize something from swim_test_utils.h/.c. Branch: http://github.com/tarantool/tarantool/tree/gerold103/gh-5303-p3-fakesys Issue: https://github.com/tarantool/tarantool/issues/5303 Vladislav Shpilevoy (10): test: stop using swim_transport.addr as in-param test: factor out swim from libc emulation funcs test: rename fake libc network methods to fakenet test: move fake network code to fakenet.c/.h files test: factor out swim from fakenet.c/.h files fakesys: introduce fake system library test: rename fake libev methods to fakeev test: move fake libev code to fakeev.c/.h files test: factor out swim from fakeev.h/.c files fakesys: move fakeev to fakesys library src/lib/CMakeLists.txt | 1 + src/lib/fakesys/CMakeLists.txt | 8 + src/lib/fakesys/fakeev.c | 350 ++++++++++++ .../lib/fakesys/fakeev.h | 45 +- src/lib/fakesys/fakenet.c | 502 ++++++++++++++++++ .../lib/fakesys/fakenet.h | 81 ++- test/unit/CMakeLists.txt | 6 +- test/unit/swim.c | 8 +- test/unit/swim_errinj.c | 8 +- test/unit/swim_test_ev.c | 319 +---------- test/unit/swim_test_transport.c | 438 +-------------- test/unit/swim_test_utils.c | 30 +- test/unit/swim_test_utils.h | 6 +- 13 files changed, 1003 insertions(+), 799 deletions(-) create mode 100644 src/lib/fakesys/CMakeLists.txt create mode 100644 src/lib/fakesys/fakeev.c rename test/unit/swim_test_ev.h => src/lib/fakesys/fakeev.h (77%) create mode 100644 src/lib/fakesys/fakenet.c rename test/unit/swim_test_transport.h => src/lib/fakesys/fakenet.h (59%) -- 2.24.3 (Apple Git-128)