From patchwork Tue Dec 4 22:24:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 1007886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-491660-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Luh2Gwvx"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 438Zv45783z9sBZ for ; Wed, 5 Dec 2018 08:36:48 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=JRYKauBBOo8D DI/i0t9arqTCPCgFP6tajHsJMHfz2kF/x4lfnBRlQXKfthf2qSYtgK8gRDSf0/UJ +Re6FS6+8ekOE911YwOpKpBy0ts/4JGY5hLQp9iWpTahBpqiuD7z6ppL+zN1t8yM PO2Uczcuoub9ENme6lDawiMIaqSMbqM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=0t5mDwJvC2TuFTh75n Qv45QuMj4=; b=Luh2Gwvx3/1HhN4Zns4UNmKwIvLGasPJrXtV7bmE2O8z/mmfq1 +7fvtg3GaRVmEuVrTrfajByqKtE2FvJjtRsGEXNG69yabqq9v0jaY0vOYtBxHhfA ojDf7aN84tJ+u43rzBwTR01jEUx9xoUtob1jhdltLQEUoLq2NSsoAkl9c= Received: (qmail 57557 invoked by alias); 4 Dec 2018 21:36:41 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 57540 invoked by uid 89); 4 Dec 2018 21:36:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=executing, Hx-languages-length:1944, sites X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Dec 2018 21:36:39 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 963B1C06586F for ; Tue, 4 Dec 2018 21:36:38 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-11.phx2.redhat.com [10.3.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id A49725D785; Tue, 4 Dec 2018 21:36:37 +0000 (UTC) From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH] testsuite: turn down verbosity of "process-message" Date: Tue, 4 Dec 2018 17:24:19 -0500 Message-Id: <1543962259-31963-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes When debugging a failing test, I typically invoke DejaGnu at verbosity level 2 (via RUNTESTFLAGS="-v -v dg.exp=something"), so that DejaGnu prints the command line used to invoke the compiler; specifically these two sites: target.exp "Invoking the compiler as " remote.exp "Executing on $hostname" which are both verbosity level 2. Unfortunately I run into an O(n^2) issue with logging from process-message: verbose "process-message:\n${dg-messages}" 2 where, as each message each processed, it emits the state of dg-messages, containing the new message and all messages so far, leading to exponentially-increasing output at level 2 as more test messages are added. This patch papers over the problem by moving the problematic message to verbosity level 3. Successfully regrtested on x86_64-pc-linux-gnu. OK for trunk? gcc/testsuite/ChangeLog: * lib/gcc-dg.exp (process-message): Change verbosity level of "verbose" from 2 to 3. (dg-locus): Likewise. --- gcc/testsuite/lib/gcc-dg.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 305dd3c..054d884 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -1165,7 +1165,7 @@ proc process-message { msgproc msgprefix dgargs } { set newentry [lreplace $newentry 2 2 $expmsg] set dg-messages [lreplace ${dg-messages} end end $newentry] - verbose "process-message:\n${dg-messages}" 2 + verbose "process-message:\n${dg-messages}" 3 } # Look for messages that don't have standard prefixes. @@ -1199,7 +1199,7 @@ proc dg-locus { args } { set newentry [lreplace $newentry 2 2 $expmsg] set dg-messages [lreplace ${dg-messages} end end $newentry] - verbose "process-message:\n${dg-messages}" 2 + verbose "process-message:\n${dg-messages}" 3 } # Handle output from -fopt-info for MSG_OPTIMIZED_LOCATIONS: