<HTML><BODY><div class="cl-pgy8y9lsje"><div>Hi, Sergey!</div><div> </div><div>Thanks for the patch! LGTM<br><br> </div><div data-signature-widget="container"><div data-signature-widget="content"><div>--<br>Best regards,</div><div>Evgeniy Temirgaleev</div></div></div><br><div class="mail-quote-collapse"><blockquote style="border-left:1px solid #0857A6;margin:10px;padding:0 0 0 10px"><span>From: Sergey Kaplun <<a href="mailto:skaplun@tarantool.org">skaplun@tarantool.org</a>><br>To: Sergey Bronnikov <<a href="mailto:sergeyb@tarantool.org">sergeyb@tarantool.org</a>>, Evgeniy Temirgaleev <<a href="mailto:e.temirgaleev@tarantool.org">e.temirgaleev@tarantool.org</a>><br>Cc: tarantool-patches@dev.tarantool.org, Sergey Kaplun <<a href="mailto:skaplun@tarantool.org">skaplun@tarantool.org</a>><br>Date: Thursday, July 2, 2026 10:21 PM +03:00</span><br> <div><div id=""><div class="cl-g4il1duzul"><div class="js-helper_mr_css_attr js-readmsg-msg_mr_css_attr"><div id="style_17830201061306317836_mr_css_attr"><div id="style_17830201061306317836_BODY_mr_css_attr">`os.time()` uses `mktime()` to specify time by the given table.<br>`mktime()` produces the call to `tzset()` to determine the system's<br>timezone. If the TZ variable does not appear in the environment, the<br>system timezone is used. The system timezone is configured by copying,<br>or linking, a file in the tzfile(5) format to /etc/localtime. So, if<br>this file is omitted (like in RED OS), the errno is set to a non-zero<br>value. This leads to the nil returned by the `os.time()` for -1 time<br>value.<br><br>This patch skips the test if this file is missed to be sure that we<br>don't obtain any false positive failures due to system<br>misconfigurations.<br>---<br><br>Branch: <a href="https://github.com/tarantool/luajit/tree/skaplun/fix-os-time-test-redos">https://github.com/tarantool/luajit/tree/skaplun/fix-os-time-test-redos</a><br>Failed workflow: <a href="https://github.com/tarantool/tarantool/actions/runs/28585213455/job/84775371860?pr=12886#step:5:20692">https://github.com/tarantool/tarantool/actions/runs/28585213455/job/84775371860?pr=12886#step:5:20692</a><br><br>Tested inside the following Docker:<br><br>===================================================================<br>FROM registry.red-soft.ru/ubi8/ubi-minimal:latest<br><br>RUN dnf update -y && \<br>dnf install -y cmake vim make git curl gcc g++ gdb man && \<br>dnf clean all<br>===================================================================<br><br>| docker build . --tag redos<br>| docker run --network=host -ti redos bash<br><br>Then clone LuaJIT and proceed as usual.<br><br>With the patch the test skipped:<br>| 1..0 # SKIP Unconfigured timezone rules<br><br>Changes in v2:<br><br>* Skip patch not for RED OS but for all distributions with unconfigured<br>timezones (i.e. missing '/etc/localtime').<br><br>.../lj-1470-os-time-epoch-minus-1s.test.lua | 20 ++++++++++++++++++-<br>1 file changed, 19 insertions(+), 1 deletion(-)<br><br>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<br>index dfe1ee11..48c6c3a3 100644<br>--- a/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua<br>+++ b/test/tarantool-tests/lj-1470-os-time-epoch-minus-1s.test.lua<br>@@ -1,9 +1,27 @@<br>local tap = require('tap')<br><br>+local function unconfigured_timezone()<br>+ -- `os.time()` uses `mktime()` to specify time by the given<br>+ -- table. `mktime()` produces the call to `tzset()` to determine<br>+ -- the system's timezone.<br>+ -- If the TZ variable does not appear in the environment, the<br>+ -- system timezone is used. The system timezone is configured by<br>+ -- copying, or linking, a file in the tzfile(5) format to<br>+ -- /etc/localtime. So, if this file is omitted, the errno is<br>+ -- set to a non-zero value. This leads to the nil returned by<br>+ -- the `os.time()` for -1 time value. Let's skip the test if<br>+ -- this file is missed to be sure that we don't obtain any false<br>+ -- positive failures due to system misconfigurations.<br>+ local f = io.open('/etc/localtime', 'r')<br>+ return not f<br>+end<br>+<br>-- The test file demonstrates os.time() fail to return -1 time<br>-- value.<br>-- See also: <a href="https://github.com/LuaJIT/LuaJIT/issues/1470">https://github.com/LuaJIT/LuaJIT/issues/1470</a>.<br>-local test = tap.test('lj-1470-os-time-epoch-minus-1s')<br>+local test = tap.test('lj-1470-os-time-epoch-minus-1s'):skipcond({<br>+ ['Unconfigured timezone rules'] = unconfigured_timezone(),<br>+})<br><br>test:plan(1)<br><br>--<br>2.54.0</div></div></div></div></div></div></blockquote></div></div></BODY></HTML>