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 4C69E6EC40; Thu, 23 Sep 2021 16:57:39 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4C69E6EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1632405459; bh=ZHkcqGB//L46/vQhA/AxoO6AiMcfX8pcRGYMcoetpJQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=jX3ymwFfDNd2oaYZ57Wpvsw1X3FagoxBA5E9uynKp/A4eZlMFVIyrE72jmGwiDqbi L3puEMauEGhFFuKe9yvpxTK90DTz6UhFjCKhNLwHoJoM6rYP9+x6iJdVQi+Li6/tVJ nVPtx/iSbYK5PXGeSe84q69a04Z+cdJAt4t7Og5A= Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 82D326EC44 for ; Thu, 23 Sep 2021 16:55:59 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 82D326EC44 Received: by mail-lf1-f44.google.com with SMTP id p29so26609564lfa.11 for ; Thu, 23 Sep 2021 06:55:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=htGkGYOGqmC81wYwT53L92ESGCjgCaW82CweW44WoAg=; b=Q6maRk8yZKRCScQW6X7wpouoakrRqAHlBhhf2Wmop/DMfcZh7QmFmHzl+wbXL9gshY 6NDxVyGAsUdqcnyejQ4FPAGjU6s2+46L3R760HzBzS+r/6HFBC395Y2KA+84ZiMi4agT le68LH985+06ru31Hm34PTjxG4fo5BbssfS7c4BIfbpgokpS4dKWoGtfIuMyES35MQwx 7nEwXZLhGgheoN4A1UX6qDC4eZT+NsQMXNJ1SnkAkd36YY/WDYdVuVrva21dimIFxiGn v9V/oyQ8zVUW+cLdyYwTw/tRFLhOMIBiYfJYJVTavHUHlstuKD48fW+OjhVh2czUC50L 3/dQ== X-Gm-Message-State: AOAM5310X9aFVKrKSNEeOTPq21wzEa2MbU4ILXueG0pyTSXZCucZOwny 1V7lT6r9HKXoXbNRU6KeQBI27zk2AUPFbKvl X-Google-Smtp-Source: ABdhPJyDn5+ynxeL8SK5eDUjhubzAYYtxiZe7s+t848lL8wRzPPheuWUfm7mHtm0e7LX933Nwobw/w== X-Received: by 2002:a05:6512:3c8c:: with SMTP id h12mr4359591lfv.640.1632405357908; Thu, 23 Sep 2021 06:55:57 -0700 (PDT) Received: from localhost.localdomain ([93.175.11.199]) by smtp.gmail.com with ESMTPSA id a18sm596996ljd.4.2021.09.23.06.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Sep 2021 06:55:57 -0700 (PDT) X-Google-Original-From: Maxim Kokryashkin To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, skaplun@tarantool.org Date: Thu, 23 Sep 2021 16:55:28 +0300 Message-Id: <88475d13d1209681b6f811e4028f311f2df0308e.1632404890.git.m.kokryashkin@tarantool.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH luajit 4/4] test: add test for gh-6163 min/max 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: Maxim Kokryashkin via Tarantool-patches Reply-To: Maxim Kokryashkin Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" math.min()/math.max() could produce different results when compiled. The issue is fixed in vanilla LuaJIT and was backported in 210d511. This patch adds test case for the mentioned issue. Closes tarantool/tarantool#6163 --- .../gh-6163-jit-min-max.test.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/tarantool-tests/gh-6163-jit-min-max.test.lua diff --git a/test/tarantool-tests/gh-6163-jit-min-max.test.lua b/test/tarantool-tests/gh-6163-jit-min-max.test.lua new file mode 100644 index 00000000..0e68a2e5 --- /dev/null +++ b/test/tarantool-tests/gh-6163-jit-min-max.test.lua @@ -0,0 +1,18 @@ +local tap = require('tap') + +local test = tap.test("gh-6163-jit-min-max") +test:plan(2) +-- +-- gh-6163: math.min/math.max success with no args +-- +local pcall = pcall + +jit.opt.start(0, 'hotloop=1') + +local r, msg = pcall(function() math.min() end) +test:ok(false == r) +r, msg = pcall(function() math.min() end) +test:ok(false == r) + +os.exit(test:check() and 0 or 1) + -- 2.33.0