Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2284569ybb; Fri, 27 Mar 2020 02:37:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt1CMd4BUuBJb/Bljw2D9v7tmhl+PIMbUvj7Edo+ATjfFm8RL+SoR5Gj1UFhZ+RrHw8o7jL X-Received: by 2002:a9d:65ca:: with SMTP id z10mr9682667oth.86.1585301835236; Fri, 27 Mar 2020 02:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585301835; cv=none; d=google.com; s=arc-20160816; b=v8vp/V7Wtu/OIm/mISMAkL6d5W4gA5MWru1hOacgptZTO556m2vgdIizkPMY4WUJpQ H4juXBt56cj+GBsOnBj/v1SSQJtyuJox7/KU+qaEeFhx0C9erBFvczVmQUWJvRj5dRIc /aXxKQD/6T+md6CcbyQ7NoMeo1/YfE0vZyIoP7QcKz7YJh9OoEJa611nhtWvA8F88Sl/ mrdus3AGTA5++evHGFwZtJNp/pJ7F4rJ4k9Y+RfZysEwzngqf5oDTz3LVwkypv443jgF u6+GFVxIu9rgA0oRXzGHQ+SVtuevAE4/oDd4J2g0R0YNH8zcxdxGvxyNZ/zTvjOizVg6 coww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date; bh=ap78OtXZq7aQJZ6TMPBs7AlXvQ7dSNaiueS9qsI4mxo=; b=RHnn24B+EMhcOi7n9jTGdp8tS6/yMm2EeqhOBJKlm/mhTLT+17Ib1JY+xMTILfn3bX 9xXOK1r9XfHsxrfcWtJn3sHciFob2HQVOlj4OSCiFCD5mJsxpcRCMBqL77wGlXwh2VoQ Mox0WdEgDOFqouAB4AR+Rqovj7FiZoV3wlD0gjccnqtJWEyfBwEWQP3CElenEjfVADgq kyufGA4Yuu6MQnfUQPw/xunpBZTkP4Bcx/m3lZBLo6t8G/yFRLA2JF7NfG8m6Ixab4Ys J8MULh43CXL2DB3mIk5391n2MXdcqa2pO2IYJgt5w5yNP6YEovk7ZekBtngSqEE+m3Pn X9gQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e17si2189309oti.82.2020.03.27.02.37.02; Fri, 27 Mar 2020 02:37:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726901AbgC0JgY (ORCPT + 99 others); Fri, 27 Mar 2020 05:36:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:48436 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726168AbgC0JgY (ORCPT ); Fri, 27 Mar 2020 05:36:24 -0400 Received: from mail-wm1-f71.google.com ([209.85.128.71]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jHlPb-0008Iz-7T for linux-kernel@vger.kernel.org; Fri, 27 Mar 2020 09:36:23 +0000 Received: by mail-wm1-f71.google.com with SMTP id m4so4133113wmi.5 for ; Fri, 27 Mar 2020 02:36:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=ap78OtXZq7aQJZ6TMPBs7AlXvQ7dSNaiueS9qsI4mxo=; b=cHgCoYr/N4gnhFw3e64rnbeFZSsJIWWCVb6jr/fH1dWujN7OB2UN57D3dlof/PnT0X tebs8GMikXmIl1M1H8cVuJOUVaHsswXruS3U6ztzzy1aG92ljdYXdHs/4OVLqk3/G6oF d+5tKVyqAeebVif/bIaKi7Y1bwll/Q4E5sqkFV0Uqa2OMih7o3PSYhi4jITFpomkxqaS 4SLW9PFw/Z908wnFybI5mhBKOZa55ZIH0zhWBM9JC2okH16BYCdbMG9cBrYrNr4z5GV6 Bp00kbZc5C0UESOX6tShTzU4JRtUWbZLpsORkaMdmLLM0Igu0PV3T88I/60KeA6F8U6K JyWg== X-Gm-Message-State: ANhLgQ3Db77b7pjOXlY5lt2HV57hbjGyTTKeIyRUpMe8EL1DAkJmRsId EupnlsrYwwtxhasMQgom0R6SfQolgb6cfMGIIVEQVNtf62c56OOyMtz2ZDEeMDnEHINUbjWx9XA T2wOT5CpiKHREXTrJS9NtFHOVyeQ7715Vd8elVMoMZw== X-Received: by 2002:adf:f8c1:: with SMTP id f1mr3211177wrq.345.1585301782619; Fri, 27 Mar 2020 02:36:22 -0700 (PDT) X-Received: by 2002:adf:f8c1:: with SMTP id f1mr3211156wrq.345.1585301782361; Fri, 27 Mar 2020 02:36:22 -0700 (PDT) Received: from localhost (host87-23-dynamic.53-79-r.retail.telecomitalia.it. [79.53.23.87]) by smtp.gmail.com with ESMTPSA id c23sm7673665wrb.79.2020.03.27.02.36.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 02:36:21 -0700 (PDT) Date: Fri, 27 Mar 2020 10:36:20 +0100 From: Andrea Righi To: Shuah Khan Cc: Kees Cook , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] kselftest/runner: avoid using timeout when timeout is disabled Message-ID: <20200327093620.GB1223497@xps-13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Avoid using /usr/bin/timeout unnecessarily if timeout is set to 0 (disabled) in the "settings" file for a specific test. NOTE: without this change (and adding timeout=0 in the corresponding settings file - tools/testing/selftests/seccomp/settings) the seccomp_bpf selftest is always failing with a timeout event during the syscall_restart step. Signed-off-by: Andrea Righi --- tools/testing/selftests/kselftest/runner.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh index e84d901f8567..2cd3c8def0f6 100644 --- a/tools/testing/selftests/kselftest/runner.sh +++ b/tools/testing/selftests/kselftest/runner.sh @@ -32,7 +32,7 @@ tap_prefix() tap_timeout() { # Make sure tests will time out if utility is available. - if [ -x /usr/bin/timeout ] ; then + if [ -x /usr/bin/timeout ] && [ $kselftest_timeout -gt 0 ] ; then /usr/bin/timeout "$kselftest_timeout" "$1" else "$1" -- 2.25.1