From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id C10A138708CD for ; Tue, 17 Aug 2021 19:23:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C10A138708CD Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-Pt3HRcOuNKyMakN3Rv6EkA-1; Tue, 17 Aug 2021 15:23:45 -0400 X-MC-Unique: Pt3HRcOuNKyMakN3Rv6EkA-1 Received: by mail-wm1-f69.google.com with SMTP id m13-20020a7bcf2d000000b002e6cd9941a9so1281922wmg.1 for ; Tue, 17 Aug 2021 12:23:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sJZ3wAJx87yJMttxDxmqjdvGZT0PQI20RD8AMCRYF00=; b=cUSlJvhScuOZRUWr55lisB2X6vsY2q9pV4XZqTtgxSR1m/0l05kPNrjjOooqGKBTod J8C8XM9fu4rP9oBYOXAScKhISQJT77KGHOxGBYGEs5LqMUS1RE5gPrUdzWfkqqHFvzqq KtG5lF6s4g0OiBetBtcKGPpjatUM7PBUpiMHR2PM8oTqrUG+AK8IQ1ONr3xS1wg9cCqM D/Rt3OgKS/LeQP+C6WqX2tyaW9GIB6t19X1Eyqpdg+NqH1kjwo3es18nBe20BPthI51j qJLNk71UmFVAofB1Vo4Q1y3GTd5wkzq+4jsZqQlkBGC8V+Bb/Nb15CaKtz21ToV/WpPN OZUg== X-Gm-Message-State: AOAM532jhgdj5Kd9Q51yzp9FAFm9Jq1B6IUsmb7Ktj+1lcApPGEEZfr1 dmP47YIXiGCveyWaTHIKojqaQVumrRMjoi4c1VX0A3MCnpohdROVkxxVtJfXLDFDTBnDfhIuZ67 0lTINxQ/DGhHrOHnkkEEDwC6JvtVCY2s= X-Received: by 2002:adf:e8cc:: with SMTP id k12mr6215594wrn.13.1629228223928; Tue, 17 Aug 2021 12:23:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXrHGDtLfblI0VSkb0lqYW8DA6NhcqOYzEj/9w4wZlRPufX3xImXGz4MZzVfRNbOEXCtx58up1BInFwcbUt/Q= X-Received: by 2002:adf:e8cc:: with SMTP id k12mr6215578wrn.13.1629228223754; Tue, 17 Aug 2021 12:23:43 -0700 (PDT) MIME-Version: 1.0 References: <2031740.irdbgypaU6@minbar> <87wnoj289z.fsf@euler.schwinge.homeip.net> In-Reply-To: <87wnoj289z.fsf@euler.schwinge.homeip.net> From: Jonathan Wakely Date: Tue, 17 Aug 2021 20:23:32 +0100 Message-ID: Subject: Re: [PATCH] Avoid illegal argument to verbose in dg-test callback To: Thomas Schwinge Cc: Matthias Kretz , gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2021 19:23:48 -0000 On Tue, 17 Aug 2021 at 20:15, Thomas Schwinge wrote: > > Hi! > > On 2020-04-16T15:21:44+0200, Matthias Kretz wrote: > > If extra_tool_flags starts with a dash, an error like 'ERROR: verbose: > > illegal argument: -march=native -O2 -std=c++17' is printed. This is > > easily fixed by inserting a double dash before the variable. > > > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp > > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp > > @@ -408,7 +408,7 @@ proc libstdc++-dg-test { prog do_what extra_tool_flags } { > > set options "" > > if { $extra_tool_flags != "" } { > > verbose -log "extra_tool_flags are:" > > - verbose -log $extra_tool_flags > > + verbose -log -- $extra_tool_flags > > I'm confirming the original problem, but on one system, it's not > resolved by this change, because instead we get: > > extra_tool_flags are: > ERROR: tcl error sourcing [...]/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp. > ERROR: usage: send [args] string > while executing > "send_log "$message\n"" > (procedure "verbose" line 48) > invoked from within > "verbose -log -- $extra_tool_flags" > (procedure "libstdc++-dg-test" line 45) > invoked from within > "${tool}-dg-test $prog [lindex ${dg-do-what} 0] "$tool_flags ${dg-extra-tool-flags}"" > (procedure "saved-dg-test" line 115) > invoked from within > [...] > > That's Ubuntu's dejagnu 1.5-3ubuntu1 being so old that it doesn't include > DejaGnu commit 57c22601afe43d2c2b8819df4f2ecacb034516fd "Protect from leading > dash in message". (I suppose that's what'd make this work, but have not > verified.) > > Thus, as obvious, pushed "libstdc++: Avoid illegal argument to verbose in > dg-test callback, continued" to master branch in commit > 60b94d8bd2280837e980a53cf81bdf902d726e61, and cherry-picked into > releases/gcc-11 branch in commit > 112bbc8d1d81c1b6375ea3cfb083cdeb0a06ea3a, and into releases/gcc-10 branch > in commit 6e64bbec7dead374628abe525b6f56e20f9507c3, see attached. Thanks. This makes the logs "denser", as there isn't the extra line break between each test. I think I can live with it ;-) but if anybody objects we can add a \n into that string.