Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Alexander Turenko <alexander.turenko@tarantool.org>
Subject: [tarantool-patches] [PATCH 1/4] test: allow to run replication/misc multiple times
Date: Wed, 10 Apr 2019 16:28:42 +0300	[thread overview]
Message-ID: <cbfb16c22011b57ef2a3912825c63a94f5770130.1554902241.git.alexander.turenko@tarantool.org> (raw)
In-Reply-To: <cover.1554902241.git.alexander.turenko@tarantool.org>

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

  reply	other threads:[~2019-04-10 13:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 13:28 [tarantool-patches] [PATCH 0/4] *** test: replication/ fixes for parallel run *** Alexander Turenko
2019-04-10 13:28 ` Alexander Turenko [this message]
2019-04-10 13:28 ` [tarantool-patches] [PATCH 2/4] test: increase timeouts in replication/misc Alexander Turenko
2019-04-10 13:28 ` [tarantool-patches] [PATCH 3/4] test: increase timeouts in replication/errinj Alexander Turenko
2019-04-10 13:28 ` [tarantool-patches] [PATCH 4/4] test: wait for xlog/snap/log file changes Alexander Turenko
2019-04-10 13:43 ` [tarantool-patches] Re: [PATCH 0/4] *** test: replication/ fixes for parallel run *** Alexander Turenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbfb16c22011b57ef2a3912825c63a94f5770130.1554902241.git.alexander.turenko@tarantool.org \
    --to=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH 1/4] test: allow to run replication/misc multiple times' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox