From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F337829F82 for ; Wed, 10 Apr 2019 09:28:55 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZjNWLY-NGmXc for ; Wed, 10 Apr 2019 09:28:55 -0400 (EDT) Received: from smtp62.i.mail.ru (smtp62.i.mail.ru [217.69.128.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id AEE8929F39 for ; Wed, 10 Apr 2019 09:28:55 -0400 (EDT) From: Alexander Turenko Subject: [tarantool-patches] [PATCH 1/4] test: allow to run replication/misc multiple times Date: Wed, 10 Apr 2019 16:28:42 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Alexander Turenko It allows to run `./test-run.py -j 1 replication/misc <...> replication/misc` that can be useful when debugging a flaky problem. This ability was broken after after 7474c14e ('test: enable cleaning of a test environment'), because test-run starts to clean package.loaded between runs and so each time the test is run it calls ffi.cdef() under require('rlimit'). This ffi.cdef() call defines a structure, so a second and following attempts to call the ffi.cdef() will give a Lua error. This commit does not change anything in regular testing, because each test runs once (if other is not stated in a configuration list). --- test/replication/lua/rlimit.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/replication/lua/rlimit.lua b/test/replication/lua/rlimit.lua index 46026aea5..de9f86a35 100644 --- a/test/replication/lua/rlimit.lua +++ b/test/replication/lua/rlimit.lua @@ -1,6 +1,6 @@ ffi = require('ffi') -ffi.cdef([[ +pcall(ffi.cdef, [[ typedef long rlim_t; struct rlimit { rlim_t rlim_cur; /* Soft limit */ -- 2.20.1