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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 41621385501C for ; Tue, 17 Aug 2021 15:56:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41621385501C Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-14-ZOWXafVaM5W5sK-krvdcZg-1; Tue, 17 Aug 2021 11:56:07 -0400 X-MC-Unique: ZOWXafVaM5W5sK-krvdcZg-1 Received: by mail-wr1-f69.google.com with SMTP id h24-20020adfa4d8000000b00156d9931072so1063533wrb.15 for ; Tue, 17 Aug 2021 08:56:07 -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=oWFKuliVU9ObQ2L6KtQqyv/j/GrwOBmPQizInjQsv3c=; b=Qndfl0oICUkEw65unuo6dHzgtnsN1CgmCuJNE0D9ed/RLkG1oeMKjlsAyQo9DuuDEZ 06MiQa7rSnYlO74T3yGQ+GbyD/UhyIml61+1U/KhHjkOYTzKdUBRW/TH4XNK0PCq3uul AujV3/qvkhOHG7v21YIqQ4wxqgbtggpUGCj/Csk0USzxhQxkiCw314ue0MwwUqzESjkT RvCFjaxpJLHet0YxVV5TYLBJvavoZOxqMmh+kwWmf+68ZhAw7FEHhxgjFN/IXEy4nYOt 2OESpHApO6RG7maWuiMR/mCr+efv/VYOC85Uvxp+qWLjRl5TluC99kPS0nKbWoGBk82n hfZA== X-Gm-Message-State: AOAM530zT3VaQ2f4aiwFugX4UAH2rxxfwuHFfrYwRV3jqemo/OM7vHDr XS0lCSx9gCBHgVo7cipSItmTAlUMS8ZLBPDfInEsnGNabBWARUDiEUZeqzztzNoAWNgMFRqJ4J0 DkSbKM0NrMBJ09wCnAEEKWttHDhhd+lk= X-Received: by 2002:a05:600c:3656:: with SMTP id y22mr4005979wmq.58.1629215766543; Tue, 17 Aug 2021 08:56:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAFfum8gVmLO+jFpzOf5rjVGyUFJD59UQxhXtj49j8KeWe2KKcPbN00Ao4GOqmaMj58Te8HOUK8PE0jrvkO7s= X-Received: by 2002:a05:600c:3656:: with SMTP id y22mr4005954wmq.58.1629215766264; Tue, 17 Aug 2021 08:56:06 -0700 (PDT) MIME-Version: 1.0 References: <20210809114708.11647-1-lmichel@kalray.eu> In-Reply-To: <20210809114708.11647-1-lmichel@kalray.eu> From: Jonathan Wakely Date: Tue, 17 Aug 2021 16:55:55 +0100 Message-ID: Subject: Re: [PATCH v2] libstdc++: Fix testsuite for skipping gdb tests on remote/non-native target To: Luc Michel Cc: "libstdc++" , Marc Poulhies , gcc Patches X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-13.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable 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 15:56:12 -0000 On Mon, 9 Aug 2021 at 12:47, Luc Michel wrote: > > This fixes an incorrect invocation of gdb on remote targets where > DejaGNU would try to run host's gdb in remote target simulator. > gdb-test skips the testing when target is remote or non native but the > gdb version check function does not. > > Co-authored-by: Marc Poulhies > Suggested-by: Jonathan Wakely > Signed-off-by: Luc Michel > --- > Hi > > Marc has now left Kalray so I'll carry on with this patch. I applied > Jonathan's suggestion. Let me know if things are OK. > > v2 changes: > * Put the check in gdb_version_check/gdb_version_check_xmethods > instead of gdb_batch_check [Jonathan] > > Thanks. Thanks for the updated patch, I've tested it and pushed it to trunk now. > Luc > --- > libstdc++-v3/testsuite/lib/gdb-test.exp | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp > index af20c85e5a0..f993355c2b4 100644 > --- a/libstdc++-v3/testsuite/lib/gdb-test.exp > +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp > @@ -278,18 +278,22 @@ proc gdb_batch_check {command pattern} { > # require gdb 7.3, but we don't want to test versions, so instead we > # check for the python "lookup_global_symbol" method, which is in 7.3 > # but not earlier versions. > # Return 1 if the version is ok, 0 otherwise. > proc gdb_version_check {} { > + if { ![isnative] || [is_remote target] } { return 0 } > + > return [gdb_batch_check "python print(gdb.lookup_global_symbol)" \ > ""] > } > > # Check for a version of gdb which supports xmethod tests. It is done > # in a manner similar to the check for a version of gdb which supports the > # pretty-printer tests below. > proc gdb_version_check_xmethods {} { > + if { ![isnative] || [is_remote target] } { return 0 } > + > return [gdb_batch_check \ > "python import gdb.xmethod; print(gdb.xmethod.XMethod)" \ > ""] > } > > -- > 2.17.1 >