Skip to content

Commit

Permalink
test: fix fix-mips64-spare-side-exit-patching
Browse files Browse the repository at this point in the history
The aforementioned test is flaky when run under Tarantool due to not
enough room for all traces. The flushing of all traces at the start and
collecting them solves the issue.

The same issue may occur for the
<gh-6098-fix-side-exit-patching-on-arm64.test.lua>, so it is adjusted as
well.

Reviewed-by: Sergey Bronnikov <[email protected]>
Signed-off-by: Sergey Kaplun <[email protected]>
  • Loading branch information
Buristan committed Mar 3, 2025
1 parent dd0db0c commit 42cd8d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ local MAXTRACE = 2000;

test:plan(1)

-- Flush all possible traces and collect them to be sure that
-- we have enough space.
jit.flush()
collectgarbage()

local function find_last_trace()
local candidate = misc.getmetrics().jit_trace_num
for traceno = candidate, MAXTRACE do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ local frontend = require('utils').frontend

test:plan(1)

-- Flush all possible traces and collect them to be sure that
-- we have enough space.
jit.flush()
collectgarbage()

-- The function to be tested for side exit patching:
-- * At the beginning of the test case, the <if> branch is
-- recorded as a root trace.
Expand Down

0 comments on commit 42cd8d6

Please sign in to comment.