From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 4BF216ECDE; Thu, 2 Jul 2026 22:21:47 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4BF216ECDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1783020107; bh=q9YS4fM4z9L+Q0W1LmZdmpQwOeZFzR4aeGmU6y9uMPs=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=x00PBRIQaztH1BKSI11j+pgWt//mcc2aAi/f5GmpvJpsMwNMRYoFCySMqsevhdvz/ vx6KnwPhLRNzPEOn+Uc27I++kSmicckFDjsQptlaylzp5OYGBPSKeGw4YHg36nsT02 f2bYYsnWLBSbJ8w767qJPJsAqlU3fLS8hViurTGo= Received: from send129.i.mail.ru (send129.i.mail.ru [89.221.237.224]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 9497A6ECDE for ; Thu, 2 Jul 2026 22:21:46 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 9497A6ECDE Received: by exim-smtp-9d444bb98-kc5vz with esmtpa (envelope-from ) id 1wfMyn-00000000GjR-23Xi; Thu, 02 Jul 2026 22:21:46 +0300 To: Sergey Bronnikov , Evgeniy Temirgaleev Date: Thu, 2 Jul 2026 22:21:03 +0300 Message-ID: <20260702192103.2399743-1-skaplun@tarantool.org> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailru-Src: smtp X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD9F229F520D5C18868B8AD096D449410EA3F481A2325D1D0B4182A05F538085040110761A0D11401D03DE06ABAFEAF670513767ADCB3BD82C0A74983DDEAFFE278DB27B0C6FE75BA93 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7DB84ED444C624799EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637AC83A81C8FD4AD23D82A6BABE6F325AC2E85FA5F3EDFCBAA7353EFBB553375665EC6F5188975CE83F7B269C3D635789D6D5481E235E30AE96CD9192C74EC7A45389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0B27420F9988F54058941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6E232F00D8D26902CA471835C12D1D977C4224003CC8364762BB6847A3DEAEFB0F43C7A68FF6260569E8FC8737B5C2249EC8D19AE6D49635B68655334FD4449CB9ECD01F8117BC8BEAAAE862A0553A39223F8577A6DFFEA7CB24F08513AFFAC7943847C11F186F3C59DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5277E32D97CFD803E5002B1117B3ED6966B67321F954AD275B2920F75BA9A967F823CB91A9FED034534781492E4B8EEAD5B606B10FC07407CC79554A2A72441328621D336A7BC284946AD531847A6065A535571D14F44ED41 X-C8649E89: 1C3962B70DF3F0AD73CAD6646DEDE1918E10F71CB4DF9F9677DD89D51EBB774225B6776AC983F447FC0B9F89525902EE6F57B2FD27647F25E66C117BDB76D65966A5A88376888DD7E4EABC73A6136FCF1F8E3BC5E1E94BFA196CC6F2BEADA15ECD948D5454212639B8341EE9D5BE9A0A456DF111F559999B217E77F9F23D850A49BBCA2E2A5213D5C7CEAA0681F5848F4C41F94D744909CECFA6C6B0C050A61A8CAF69B82BA93681CD72808BE417F3B9E0E7457915DAA85F X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu53w8ahmwBjZKM/YPHZyZHvz5uv+WouB9+ObcCpyrx6l7KImUglyhkEat/+ysWwi0gdhEs0JGjl6ggRWTy1haxBpVdbIX1nthFXMZebaIdHP2ghjoIc/363UZI6Kf1ptIMVQ2xbpK5Vic+VNnHZuixVZ8= X-DA7885C5: 2A5C0CC017F8B4C5F255D290C0D534F997EED3CAF9A4C84E4830477473733FF632C827917D0618155B1A4C17EAA7BC4BEF2421ABFA55128DAF83EF9164C44C7E X-Mailru-Sender: 689FA8AB762F7393520AF17B8A65FDE2BF7BC1BF27E2C34B240196F14CDCBE8C8C5DDB209D40A57FE49D44BB4BD9522A059A1ED8796F048DB274557F927329BE89D5A3BC2B10C37545BD1C3CC395C826B4A721A3011E896F X-Mras: Ok Subject: [Tarantool-patches] [PATCH v2 luajit] test: skip lj-1470 test for unconfigured timezones X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sergey Kaplun via Tarantool-patches Reply-To: Sergey Kaplun Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" `os.time()` uses `mktime()` to specify time by the given table. `mktime()` produces the call to `tzset()` to determine the system's timezone. If the TZ variable does not appear in the environment, the system timezone is used. The system timezone is configured by copying, or linking, a file in the tzfile(5) format to /etc/localtime. So, if this file is omitted (like in RED OS), the errno is set to a non-zero value. This leads to the nil returned by the `os.time()` for -1 time value. This patch skips the test if this file is missed to be sure that we don't obtain any false positive failures due to system misconfigurations. --- Branch: https://github.com/tarantool/luajit/tree/skaplun/fix-os-time-test-redos Failed workflow: https://github.com/tarantool/tarantool/actions/runs/28585213455/job/84775371860?pr=12886#step:5:20692 Tested inside the following Docker: =================================================================== FROM registry.red-soft.ru/ubi8/ubi-minimal:latest RUN dnf update -y && \ dnf install -y cmake vim make git curl gcc g++ gdb man && \ dnf clean all =================================================================== | docker build . --tag redos | docker run --network=host -ti redos bash Then clone LuaJIT and proceed as usual. With the patch the test skipped: | 1..0 # SKIP Unconfigured timezone rules Changes in v2: * Skip patch not for RED OS but for all distributions with unconfigured timezones (i.e. missing '/etc/localtime'). .../lj-1470-os-time-epoch-minus-1s.test.lua | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua b/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua index dfe1ee11..48c6c3a3 100644 --- a/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua +++ b/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua @@ -1,9 +1,27 @@ local tap = require('tap') +local function unconfigured_timezone() + -- `os.time()` uses `mktime()` to specify time by the given + -- table. `mktime()` produces the call to `tzset()` to determine + -- the system's timezone. + -- If the TZ variable does not appear in the environment, the + -- system timezone is used. The system timezone is configured by + -- copying, or linking, a file in the tzfile(5) format to + -- /etc/localtime. So, if this file is omitted, the errno is + -- set to a non-zero value. This leads to the nil returned by + -- the `os.time()` for -1 time value. Let's skip the test if + -- this file is missed to be sure that we don't obtain any false + -- positive failures due to system misconfigurations. + local f = io.open('/etc/localtime', 'r') + return not f +end + -- The test file demonstrates os.time() fail to return -1 time -- value. -- See also: https://github.com/LuaJIT/LuaJIT/issues/1470. -local test = tap.test('lj-1470-os-time-epoch-minus-1s') +local test = tap.test('lj-1470-os-time-epoch-minus-1s'):skipcond({ + ['Unconfigured timezone rules'] = unconfigured_timezone(), +}) test:plan(1) -- 2.54.0