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 54DDFDFE589; Fri, 6 Dec 2024 14:09:54 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 54DDFDFE589 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1733483394; bh=PNupGLXN5+14iJ2kF/IsJwEwJoSZvXlgqqtpSlVFMkE=; h=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=wJZnMyiNzQBHD5BfHhUPQUxvDnxeJTWfpNBaxYnzzMqTaqFfIW78++KrufbjbCglA exxgJafzB3Z0MoITgIK6OHL4o+nVAEoFWGbOMBlYnUHqeMaOftCako2Z0lgJIov3ft fOAQpXAyh+L/0faMmsEG5zGcG6CxwJ0OpwFpgOag= Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (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 25C10DFE589 for ; Fri, 6 Dec 2024 14:09:53 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 25C10DFE589 Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5d0d3dd3097so3153241a12.0 for ; Fri, 06 Dec 2024 03:09:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733483392; x=1734088192; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jiKq6HH1V9WA/m3MLGnSFy6WnUrdeJ3iPzaXzrN+PFA=; b=oyHwjZCPnnkBKN0aRdnxcvxay1zfRXIn5Eqw80NhE96kx+GUTyCQTp4ohX7E0hSNJD sI3oq8ldhiB2KZC4s9IYhbDiFsxKLqTU8EurNWsYrO2cblbHIKo9eqcsgcH17OVTuTjs 5USvG0n2lKco7QEaGWwQA0vjArSNt9g6CTyr8+ri7r21baG09QIP4TzXix2j81JhgO3i Goxyas5ERjkZ+pxZQMkylDtuhP5her7afR+bM9sOm2KuzVcwweviZlpO8MUmkdiRi0kM aWNxNGIxKvmhIAGUlRh/+UOkD8wzVjIDluLacmdwWPRGIWFUUbIZmtO8bEBvZqL2ZXGF 8v+g== X-Forwarded-Encrypted: i=1; AJvYcCWsSjoPwJOlDorNQRBQ3qOQgMYx/8XptBhZbI7wrifB82cS1Y2f/zviMFq9ExySxTerW1IfAf0YZVn2LNSiGHiYug==@dev.tarantool.org X-Gm-Message-State: AOJu0Yyg4BD0EP3xPEQ7yJ6Qkg4nMHu/a7torfpUMK15JmwPwUnxyRp8 uFSDBpTmg1GKQKHLHI7pm9uU6lmxBtWx2+sL3WmddrRA2vGsaGFNtjDWLoUB X-Gm-Gg: ASbGnctCLAPrmgo/ufCDpWL+O4gwh4U+jEpVg+0EFhbNor03CoWRV8nAycb0U4Ysen0 kGuXnleK/NXs9sZ105WpS4bAIvw/YXd3f2RiKtbQpXlT53REK2anqmOZIiy8rfZ0+wJ31Z9Lfnk 0xL26Nie4EJKrqKaY99RHxdMhvpZwdpQjdSR28MGiF+L1Jf6FOvg+lbJj2DvjjU3u5PS2vQriFd soq5ChsdzrzWNFpUK0mps/TvkerkiXzlSS1GGAu3mlUHw== X-Google-Smtp-Source: AGHT+IEHG3BjbRLhIYHffvW0VDQVWO5+cKTk41/86doAk7QfyCw74AfiPb6XZKV6LUeGbX0o5jGHpg== X-Received: by 2002:a05:6402:2749:b0:5d0:e90c:dd61 with SMTP id 4fb4d7f45d1cf-5d3be700a2fmr2576360a12.21.1733483391949; Fri, 06 Dec 2024 03:09:51 -0800 (PST) Received: from localhost ([5.181.62.98]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d149a25dfbsm2008389a12.15.2024.12.06.03.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2024 03:09:51 -0800 (PST) X-Google-Original-From: Sergey Bronnikov Date: Fri, 6 Dec 2024 14:09:50 +0300 To: Sergey Kaplun Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: X-Url: https://bronevichok.ru/ Subject: Re: [Tarantool-patches] [PATCH luajit 1/2] test: support number value of tag in LuaJIT-tests 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 Bronnikov via Tarantool-patches Reply-To: Sergey Bronnikov Cc: tarantool-patches@dev.tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi, Sergey, thanks for the patch! LGTM with minor comment below. On 16:42 Thu 05 Dec , Sergey Kaplun wrote: >The LuaJIT-tests suite lacks the ability to specify tags with custom >values. This patch adds the ability to specify number tags in the format >`+tag=number`. It is useful for version specification of system >libraries (like libc). Usually, for such janitorial patches we add a note like "Required by the following patch". >--- > test/LuaJIT-tests/test.lua | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/test/LuaJIT-tests/test.lua b/test/LuaJIT-tests/test.lua >index ab178331..2a535605 100644 >--- a/test/LuaJIT-tests/test.lua >+++ b/test/LuaJIT-tests/test.lua >@@ -161,7 +161,12 @@ local function parse_args(t) > error(arg .." does not expect an argument") > end > elseif arg:find"^[-+]" then >- opts.tags[arg:sub(2)] = (arg:sub(1, 1) == "+") >+ local tagval = arg:find"=" >+ if tagval then >+ opts.tags[arg:sub(2, tagval - 1)] = tonumber(arg:sub(tagval + 1)) I would also check a type here: --- a/test/LuaJIT-tests/test.lua +++ b/test/LuaJIT-tests/test.lua @@ -162,7 +162,7 @@ local function parse_args(t) end elseif arg:find"^[-+]" then local tagval = arg:find"=" - if tagval then + if tagval and type(tagval) == 'number' then opts.tags[arg:sub(2, tagval - 1)] = tonumber(arg:sub(tagval + 1)) else opts.tags[arg:sub(2)] = (arg:sub(1, 1) == "+") >+ else >+ opts.tags[arg:sub(2)] = (arg:sub(1, 1) == "+") >+ end > elseif arg:find"^%d+$" then > if not opts.numbers_to_run then > opts.numbers_to_run = {} >-- >2.47.0 > -- sergeyb@