From: "Alexander V. Tikhonov" <avtikhon@tarantool.org> To: Kirill Yukhin <kyukhin@tarantool.org>, Alexander Turenko <alexander.turenko@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: [Tarantool-patches] [PATCH v2 2/3] Fix test box-tap/cfg.test.lua on openSuSE Date: Tue, 7 Jul 2020 16:20:57 +0300 [thread overview] Message-ID: <99ba534fc775257849ba5b3d9b6bdd5711c817cb.1594126705.git.avtikhon@tarantool.org> (raw) In-Reply-To: <cover.1594126705.git.avtikhon@tarantool.org> In-Reply-To: <cover.1594126705.git.avtikhon@tarantool.org> Found that test fails on its subtest checking: "gh-2872 bootstrap is aborted if vinyl_dir contains vylog files left from previous runs" Debugging src/box/xlog.c found that all checks were correct, but at function: src/box/vy_log.c:vy_log_bootstrap() the check on of the errno on ENOENT blocked the negative return from function: src/box/xlog.c:xdir_scan() Found that errno was already set to ENOENT before the xdir_scan() call. To fix the issue the errno must be clean before the call to xdir_scan, because we are interesting in it only from this function. The same issue fixed at function: src/box/vy_log.c:vy_log_begin_recovery() Closes #4594 Needed for #4562 --- src/box/vy_log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/box/vy_log.c b/src/box/vy_log.c index 311985c72..86599fd15 100644 --- a/src/box/vy_log.c +++ b/src/box/vy_log.c @@ -1014,6 +1014,7 @@ vy_log_rebootstrap(void) int vy_log_bootstrap(void) { + errno = 0; if (xdir_scan(&vy_log.dir) < 0 && errno != ENOENT) return -1; if (xdir_last_vclock(&vy_log.dir, &vy_log.last_checkpoint) >= 0) @@ -1036,6 +1037,7 @@ vy_log_begin_recovery(const struct vclock *vclock) * because vinyl might not be even in use. Complain only * on an attempt to write a vylog. */ + errno = 0; if (xdir_scan(&vy_log.dir) < 0 && errno != ENOENT) return NULL; -- 2.17.1
next prev parent reply other threads:[~2020-07-07 13:21 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-07 13:20 [Tarantool-patches] [PATCH v2 0/3] gitlab-ci: add openSuSE packages build jobs Alexander V. Tikhonov 2020-07-07 13:20 ` [Tarantool-patches] [PATCH v2 1/3] Bump luajit repository Alexander V. Tikhonov 2020-07-07 13:20 ` Alexander V. Tikhonov [this message] 2020-08-14 2:44 ` [Tarantool-patches] [PATCH v2 2/3] Fix test box-tap/cfg.test.lua on openSuSE Alexander Turenko 2020-08-14 12:42 ` Alexander V. Tikhonov 2020-07-07 13:20 ` [Tarantool-patches] [PATCH v2 3/3] gitlab-ci: add openSuSE packages build jobs Alexander V. Tikhonov
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=99ba534fc775257849ba5b3d9b6bdd5711c817cb.1594126705.git.avtikhon@tarantool.org \ --to=avtikhon@tarantool.org \ --cc=alexander.turenko@tarantool.org \ --cc=kyukhin@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH v2 2/3] Fix test box-tap/cfg.test.lua on openSuSE' \ /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