From patchwork Wed Jan 27 20:42:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kretz X-Patchwork-Id: 1432362 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DQwY162yVz9sS8 for ; Thu, 28 Jan 2021 07:43:17 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F2DF398BC2A; Wed, 27 Jan 2021 20:42:38 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from lxmtout1.gsi.de (lxmtout1.gsi.de [140.181.3.111]) by sourceware.org (Postfix) with ESMTPS id D2A87398BC20; Wed, 27 Jan 2021 20:42:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D2A87398BC20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gsi.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=M.Kretz@gsi.de Received: from localhost (localhost [127.0.0.1]) by lxmtout1.gsi.de (Postfix) with ESMTP id 0580B2050D05; Wed, 27 Jan 2021 21:42:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lxmtout1.gsi.de Received: from lxmtout1.gsi.de ([127.0.0.1]) by localhost (lxmtout1.gsi.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XCSpCSD9g-BR; Wed, 27 Jan 2021 21:42:34 +0100 (CET) Received: from srvex3.campus.gsi.de (srvex3.campus.gsi.de [10.10.4.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by lxmtout1.gsi.de (Postfix) with ESMTPS id E26452050D00; Wed, 27 Jan 2021 21:42:34 +0100 (CET) Received: from excalibur.localnet (140.181.3.12) by srvex3.campus.gsi.de (10.10.4.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Wed, 27 Jan 2021 21:42:34 +0100 From: Matthias Kretz To: , Subject: [PATCH 11/16] Abort test after 1000 lines of output Date: Wed, 27 Jan 2021 21:42:34 +0100 Message-ID: <5748025.5r07IH9sy9@excalibur> Organization: GSI Helmholtzzentrum =?utf-8?q?f=C3=BCr?= Schwerionenforschung In-Reply-To: <4667217.5jz8CO7rxU@excalibur> References: <4667217.5jz8CO7rxU@excalibur> MIME-Version: 1.0 X-Originating-IP: [140.181.3.12] X-ClientProxiedBy: srvex4.Campus.gsi.de (10.10.4.36) To srvex3.campus.gsi.de (10.10.4.16) X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, BODY_8BITS, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" From: Matthias Kretz Handle overly large output by aborting the log and thus the test. This is a similar condition to a timeout. libstdc++-v3/ChangeLog: * testsuite/experimental/simd/driver.sh: When handling the pipe to log (and on verbose to stdout) count the lines. If it exceeds 1000 log the issue and exit 125, which is then handled as a failure. --- .../testsuite/experimental/simd/driver.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++- v3/testsuite/experimental/simd/driver.sh index 314c6a16f86..719e4db8e68 100755 --- a/libstdc++-v3/testsuite/experimental/simd/driver.sh +++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh @@ -258,7 +258,11 @@ BEGIN { count = 0 } /^###exitstatus### [0-9]+$/ { exit \$2 } { print >> \"$log\" - if (count >= 1000) next + if (count >= 1000) { + print \"Aborting: too much output\" >> \"$log\" + print \"Aborting: too much output\" + exit 125 + } ++count if (length(\$0) > $maxcol) { i = 1 @@ -282,8 +286,17 @@ END { close(\"$log\") } " else awk " +BEGIN { count = 0 } /^###exitstatus### [0-9]+$/ { exit \$2 } -{ print >> \"$log\" } +{ + print >> \"$log\" + if (count >= 1000) { + print \"Aborting: too much output\" >> \"$log\" + print \"Aborting: too much output\" + exit 125 + } + ++count +} END { close(\"$log\") } " fi