Message ID | 717de14c-8b25-6691-5c0a-0b779997b742@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 C27153858438 for <patchwork@sourceware.org>; Thu, 3 Nov 2022 14:31:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C27153858438 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667485866; bh=rNetlntybhmPyAzLRpWQkK0YInUeQdaMtTxdYSUtgCc=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=OyEv4L5Wf4XNjCvQjoY9Pcs+lJR6aTYu9z1uBXXSvsLOoC/fjZzG9v8amJlqvHS33 ta9llTssMs/BJvCamKnGxXnwqL7WHLY/9G/MeupgkgATD+6/NIDrn5nvQF37OU7P0F u6XECvlTmr4U3+snarQMq2QuCMzwAu0FjGWeCJl4= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B30D93858414 for <gdb-patches@sourceware.org>; Thu, 3 Nov 2022 14:30:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B30D93858414 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-260-nmzwdITEOrGl--OGm0ZrvQ-1; Thu, 03 Nov 2022 10:30:41 -0400 X-MC-Unique: nmzwdITEOrGl--OGm0ZrvQ-1 Received: by mail-wr1-f71.google.com with SMTP id u13-20020adfa18d000000b00236566b5b40so554231wru.9 for <gdb-patches@sourceware.org>; Thu, 03 Nov 2022 07:30:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rNetlntybhmPyAzLRpWQkK0YInUeQdaMtTxdYSUtgCc=; b=ukyn13AtGHGeyRLqgLyJqW5q3o0MaC0GLvHodsp3u3Ed5A5djhiHjXm019wIqmnqwj Stvm4zWtfErU8P6fU5REpEvdX0i0aEEBvIbnUl7iUYtgHCpKOMz9IVC+OxoWiTdGD1Xo /nss1dDrKFtxel70QjoIueYrMKEEag4roscaDTcuG3DoD2wfW8brxZK/R8y15+cUsZFw zFZKxDDk0hc+sJNQMF6b3fU6UVQDnz5sq7cPJy6rzBTMnRihFrxqER8NEYcDjd9TJO8Z wpz1JREQDaa9w2LvFLT4xN8llXJqwYbtIdLYxKrZ/nf5nRIvfl5x21oBoBCUJraKbDtz zo9A== X-Gm-Message-State: ACrzQf16ds5+a2WPUiy9vqEJFfk14SPptzxW3wXoCIBZigtkQ5RVBrwg HdHTYGg1Pn4rEe6kJCAhLdeFP6jLHUq1zJcbP2VoD/zDe2XhFECzcfh8h+pN9aYtv2LeR+mfFtK fyBQsnUf5LVBnLpO+HcJhOw== X-Received: by 2002:adf:eb51:0:b0:236:cfcc:76e4 with SMTP id u17-20020adfeb51000000b00236cfcc76e4mr13782077wrn.291.1667485839836; Thu, 03 Nov 2022 07:30:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6TGXdK15pqYF7gLb2hPsCSgD3FEdRE8huE7VVMfkaEIuA02Yd5b0JgniWlw7xTv6w63vt6NQ== X-Received: by 2002:adf:eb51:0:b0:236:cfcc:76e4 with SMTP id u17-20020adfeb51000000b00236cfcc76e4mr13782054wrn.291.1667485839540; Thu, 03 Nov 2022 07:30:39 -0700 (PDT) Received: from [10.202.9.92] (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id h19-20020a1ccc13000000b003b49ab8ff53sm122645wmb.8.2022.11.03.07.30.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 07:30:39 -0700 (PDT) Message-ID: <717de14c-8b25-6691-5c0a-0b779997b742@redhat.com> Date: Thu, 3 Nov 2022 15:30:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: [PATCHv2] gdb/testsuite: add KFAILs to gdb.reverse/step-reverse.exp To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org References: <1d743da0-278c-f800-10a0-d6aaa7995a92@simark.ca> <20221103090836.320197-1-blarsen@redhat.com> <c22bee29-0b92-a3c2-9241-45727d1bd6e2@simark.ca> In-Reply-To: <c22bee29-0b92-a3c2-9241-45727d1bd6e2@simark.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, BODY_8BITS, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP 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: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> From: Bruno Larsen via Gdb-patches <gdb-patches@sourceware.org> Reply-To: Bruno Larsen <blarsen@redhat.com> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
[PATCHv2] gdb/testsuite: add KFAILs to gdb.reverse/step-reverse.exp
|
|
Commit Message
Guinevere Larsen
Nov. 3, 2022, 2:30 p.m. UTC
On 03/11/2022 14:06, Simon Marchi wrote: > > On 11/3/22 05:08, Bruno Larsen wrote: >>> I don't know the reverse stuff well, but the explanation makes sense. >>> Do you plan on tackling this bug? If not, can you file a bug and add a >>> kfail? >> Sure, I do plan on tackling this at some point, but I don't know when >> that will be, so I filed the bug, and this is the patch to add the >> KFAILs, thoughts? >> >> --- >> >> Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug >> PR record/29745, where we can't skip one funcion forward if we're using >> native-gdbserver. This commit just adds kfails to the test. >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 >> --- >> gdb/testsuite/gdb.reverse/step-reverse.exp | 15 +++++++++++++++ >> 1 file changed, 15 insertions(+) >> >> diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp >> index c28e1f6db4f..37e80a7d337 100644 >> --- a/gdb/testsuite/gdb.reverse/step-reverse.exp >> +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp >> @@ -31,6 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { >> } >> >> runto_main >> +set using_gdbserver [target_is_gdbserver] >> >> if [supports_process_record] { >> # Activate process record/replay >> @@ -273,11 +274,25 @@ if { "$step_out" == 1 } { >> # Step forward over recursion again so we can test stepping over calls >> # inside the recursion itself. >> gdb_test_no_output "set exec-dir forward" "forward again to test recursion" >> +if {$using_gdbserver} { >> + # gdbserver doesn't record the change of return pointer, so we can't >> + # next forward over functions. >> + setup_kfail gdb/29745 *-*-* > There's one thing bugging me in your explanation: as far as I know, > gdbserver does any recording, with the built-in GDB recorder (i.e. not > btrace). So we probably shouldn't say "gdbserver doesn't record", as > it's not meant to record in the first place. That would mean the > problem is within GDB, when using the remote target. And the check for > the kfail should therefore use gdb_is_target_remote instead of > target_is_gdbserver. That makes sense. This is my first time working with gdbserver, so everything here is news to me. Updated version: --- Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug PR record/29745, where we can't skip one funcion forward if we're using native-gdbserver. This commit just adds kfails to the test. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 # Activate process record/replay @@ -273,11 +274,25 @@ if { "$step_out" == 1 } { # Step forward over recursion again so we can test stepping over calls # inside the recursion itself. gdb_test_no_output "set exec-dir forward" "forward again to test recursion" +if {$target_remote} { + # gdb doesn't record the change of return pointer for remote targets, + # so we can't next forward over functions. + setup_kfail gdb/29745 *-*-* +} gdb_test "next" "NEXT OVER THIS CALL.*" "reverse next over recursion again" gdb_test_no_output "set exec-dir reverse" "reverse again to test recursion" +if {$target_remote} { + # Because of the above mentioned KFAIL, the inferior is now out of sync + setup_kfail gdb/29745 *-*-* +} gdb_test "step" ".*EXIT RECURSIVE FUNCTION.*" "enter recursive function" set seen_recursive_call 0 +if {$target_remote} { + # Because of the above mentioned KFAIL, the inferior is now out of sync + # The fail state below will resync the inferior. + setup_kfail gdb/29745 *-*-* +} gdb_test_multiple "next" "step over recursion inside the recursion" { -re -wrap ".*RECURSIVE CALL.*" { incr seen_recursive_call
Comments
On 11/3/22 10:30, Bruno Larsen wrote: > On 03/11/2022 14:06, Simon Marchi wrote: >> >> On 11/3/22 05:08, Bruno Larsen wrote: >>>> I don't know the reverse stuff well, but the explanation makes sense. >>>> Do you plan on tackling this bug? If not, can you file a bug and add a >>>> kfail? >>> Sure, I do plan on tackling this at some point, but I don't know when >>> that will be, so I filed the bug, and this is the patch to add the >>> KFAILs, thoughts? >>> >>> --- >>> >>> Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug >>> PR record/29745, where we can't skip one funcion forward if we're using >>> native-gdbserver. This commit just adds kfails to the test. >>> >>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 >>> --- >>> gdb/testsuite/gdb.reverse/step-reverse.exp | 15 +++++++++++++++ >>> 1 file changed, 15 insertions(+) >>> >>> diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp >>> index c28e1f6db4f..37e80a7d337 100644 >>> --- a/gdb/testsuite/gdb.reverse/step-reverse.exp >>> +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp >>> @@ -31,6 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { >>> } >>> runto_main >>> +set using_gdbserver [target_is_gdbserver] >>> if [supports_process_record] { >>> # Activate process record/replay >>> @@ -273,11 +274,25 @@ if { "$step_out" == 1 } { >>> # Step forward over recursion again so we can test stepping over calls >>> # inside the recursion itself. >>> gdb_test_no_output "set exec-dir forward" "forward again to test recursion" >>> +if {$using_gdbserver} { >>> + # gdbserver doesn't record the change of return pointer, so we can't >>> + # next forward over functions. >>> + setup_kfail gdb/29745 *-*-* >> There's one thing bugging me in your explanation: as far as I know, >> gdbserver does any recording, with the built-in GDB recorder (i.e. not >> btrace). So we probably shouldn't say "gdbserver doesn't record", as >> it's not meant to record in the first place. That would mean the >> problem is within GDB, when using the remote target. And the check for >> the kfail should therefore use gdb_is_target_remote instead of >> target_is_gdbserver. > > That makes sense. This is my first time working with gdbserver, so everything here is news to me. Updated version: > > --- > > Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug > PR record/29745, where we can't skip one funcion forward if we're using > native-gdbserver. This commit just adds kfails to the test. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 Thanks: Approved-By: Simon Marchi <simon.marchi@efficios.com> Simon
On 03/11/2022 17:59, Simon Marchi wrote: > > On 11/3/22 10:30, Bruno Larsen wrote: >> On 03/11/2022 14:06, Simon Marchi wrote: >>> On 11/3/22 05:08, Bruno Larsen wrote: >>>>> I don't know the reverse stuff well, but the explanation makes sense. >>>>> Do you plan on tackling this bug? If not, can you file a bug and add a >>>>> kfail? >>>> Sure, I do plan on tackling this at some point, but I don't know when >>>> that will be, so I filed the bug, and this is the patch to add the >>>> KFAILs, thoughts? >>>> >>>> --- >>>> >>>> Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug >>>> PR record/29745, where we can't skip one funcion forward if we're using >>>> native-gdbserver. This commit just adds kfails to the test. >>>> >>>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 >>>> --- >>>> gdb/testsuite/gdb.reverse/step-reverse.exp | 15 +++++++++++++++ >>>> 1 file changed, 15 insertions(+) >>>> >>>> diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp >>>> index c28e1f6db4f..37e80a7d337 100644 >>>> --- a/gdb/testsuite/gdb.reverse/step-reverse.exp >>>> +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp >>>> @@ -31,6 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { >>>> } >>>> runto_main >>>> +set using_gdbserver [target_is_gdbserver] >>>> if [supports_process_record] { >>>> # Activate process record/replay >>>> @@ -273,11 +274,25 @@ if { "$step_out" == 1 } { >>>> # Step forward over recursion again so we can test stepping over calls >>>> # inside the recursion itself. >>>> gdb_test_no_output "set exec-dir forward" "forward again to test recursion" >>>> +if {$using_gdbserver} { >>>> + # gdbserver doesn't record the change of return pointer, so we can't >>>> + # next forward over functions. >>>> + setup_kfail gdb/29745 *-*-* >>> There's one thing bugging me in your explanation: as far as I know, >>> gdbserver does any recording, with the built-in GDB recorder (i.e. not >>> btrace). So we probably shouldn't say "gdbserver doesn't record", as >>> it's not meant to record in the first place. That would mean the >>> problem is within GDB, when using the remote target. And the check for >>> the kfail should therefore use gdb_is_target_remote instead of >>> target_is_gdbserver. >> That makes sense. This is my first time working with gdbserver, so everything here is news to me. Updated version: >> >> --- >> >> Recent changes to gdb.reverse/step-reverse.exp revealed the latent bug >> PR record/29745, where we can't skip one funcion forward if we're using >> native-gdbserver. This commit just adds kfails to the test. >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29745 > Thanks: > > Approved-By: Simon Marchi <simon.marchi@efficios.com> thanks, pushed! Cheers, Bruno > > Simon >
diff --git a/gdb/testsuite/gdb.reverse/step-reverse.exp b/gdb/testsuite/gdb.reverse/step-reverse.exp index c28e1f6db4f..d2975cffb5c 100644 --- a/gdb/testsuite/gdb.reverse/step-reverse.exp +++ b/gdb/testsuite/gdb.reverse/step-reverse.exp @@ -31,6 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { } runto_main +set target_remote [gdb_is_target_remote] if [supports_process_record] {