From patchwork Tue Dec 12 14:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 81965 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DA657385B537 for ; Tue, 12 Dec 2023 14:05:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id F3DB838582A5 for ; Tue, 12 Dec 2023 14:04:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F3DB838582A5 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F3DB838582A5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::631 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702389899; cv=none; b=ozrza1VOHxUuyq8lSxe88z5STzGYpapfjzAB9YvpilhYWe9j1SPu+l+/eELxjDnLaJNCw+nUSWT5h277a2obsXRBfrUka+zrpmk/AN7+ZQdPbS8D/4VMe0ujLmIxG6Kkdnptdqeg5ZzGXCeNMcTLh+foK41Yt7xeJB58XpXOrYU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702389899; c=relaxed/simple; bh=CMv+dKKg2IRGeTygNfflu/gAHtLxYEjOcy0h+Cnp0R8=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=suyftobnkPgnYry1LSZcLSGjxkKsSWU+dQXSElZO5ExwYtXG6I/4DK44qDl+4rXtZTdFJNEmK+b/QfyPPJSkijm0B/AkK6b7QuAE9Upskrx2z264a8k/UCr0sVN/m6QisQLhXvnmFbAqNh9Zad4aSocni3+zLpNAoQ1LRAai6mM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1e83adfe72so534018966b.1 for ; Tue, 12 Dec 2023 06:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1702389893; x=1702994693; darn=gcc.gnu.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=K+HKdcw4mRzR/uiXQOWOED/itAtrxWNWbpacHoSvjZs=; b=S9GdzLr3XtEln+mlcka4Ax+uqE/9SPU8OF5XMKb5GJ+RpZJLYcAlrJrl9Rv0GKNeOQ ZRil8l2lMgbhMYtUpOicjjgDPUl2J0Jtjqdm+qTnpm36ocqOABNBshwb8bbMcxSKVYLQ qc2eI6XNatq0NFKIHZi6v/nxbqcFJUpULFT4posxwvQVbV/L41BqVRoGo0oLj9e1RQow vn9BrvKJhu18XSTJV66iRZ6Yla0P9p2r/uOt+1Oeyvom+tR0seYT5yfOJCH3pGnIhzf2 0bd2oQ+b18mUop8PROES8+81lIfoIbURCQwfaGvsWeQTXV6l17SmvENaMVBnll7Gh/dx BRzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702389893; x=1702994693; h=mime-version:user-agent:references:message-id:in-reply-to:subject :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K+HKdcw4mRzR/uiXQOWOED/itAtrxWNWbpacHoSvjZs=; b=uCh22yiZm0HG+1XHnyURBX2nMg6dSWcfIRCfoDJsKFewDmKnaZltuQmngr8uqzV8+M yvbCNkXEo7lfmmS4SXVx3/LPwZxX3b6DN3y8tjnkPwWDUBZfI5s2hN/ILe8V9NtiFv0g /RdORU4mgBDMrYwwPmyDbKlKoe+KX0NWpLvpCh/OPRYrKO+R/6fU+XbkeqV1uos0s4yH vwOKTDCVd5QOZcv9u0VYIrMT3El75S2TqFY4h8sBiUj52zeiADMuFgCB/UPBQXsjaPmk ngk7KxqKnR+5riPsasnu+LDo+N7FWDvqw+i0gvXvih3duRJna91ITtiBDA2++OcgZnrB KoCg== X-Gm-Message-State: AOJu0Ywn+fthELb9astyK7ajccUTORylN/ri/Mb8KGlhIErCMjF6EnIr veXGdcQ0YWxyxxlhpmwGizCF1g== X-Google-Smtp-Source: AGHT+IE5TuhkbFGVJYcf7Qy4PvxYCxafT4Ib0S5j152qomtFJ+hFzCSz8LoS295qCptudtTbH9Uefg== X-Received: by 2002:a17:906:51d0:b0:a18:5490:2dda with SMTP id v16-20020a17090651d000b00a1854902ddamr4019992ejk.8.1702389893703; Tue, 12 Dec 2023 06:04:53 -0800 (PST) Received: from tpp.orcam.me.uk (tpp.orcam.me.uk. [81.187.245.177]) by smtp.gmail.com with ESMTPSA id ll9-20020a170907190900b00a1da2f7c1d8sm6307887ejc.77.2023.12.12.06.04.52 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2023 06:04:52 -0800 (PST) Date: Tue, 12 Dec 2023 14:04:51 +0000 (GMT) From: "Maciej W. Rozycki" To: dejagnu@gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH GCC 1/1] testsuite: Support test execution timeout factor as a keyword In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Add support for the `dg-test-timeout-factor' keyword letting a test case scale the wait timeout used for code execution, analogously to `dg-timeout-factor' used for code compilation. This is useful for particularly slow test cases for which increasing the wait timeout globally would be excessive. gcc/testsuite/ * lib/timeout-dg.exp (dg-test-timeout-factor): New procedure. --- gcc/testsuite/lib/timeout-dg.exp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) gcc-test-test-timeout-factor.diff Index: gcc/gcc/testsuite/lib/timeout-dg.exp =================================================================== --- gcc.orig/gcc/testsuite/lib/timeout-dg.exp +++ gcc/gcc/testsuite/lib/timeout-dg.exp @@ -47,3 +47,20 @@ proc dg-timeout-factor { args } { set timeout_factor [lindex $args 0] } } + +# +# dg-test-timeout-factor -- Scale the test execution timeout limit +# + +proc dg-test-timeout-factor { args } { + global test_timeout_factor + + set args [lreplace $args 0 0] + if { [llength $args] > 1 } { + if { [dg-process-target [lindex $args 1]] == "S" } { + set test_timeout_factor [lindex $args 0] + } + } else { + set test_timeout_factor [lindex $args 0] + } +}