Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simon.marchi@polymtl.ca>,
	Simon Marchi <simark@simark.ca>,
	gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [committed][gdb/testsuite] Fix FAIL in gdb.base/list-missing-source.exp
Date: Sat, 27 Nov 2021 07:12:41 +0100	[thread overview]
Message-ID: <c0cff6cc-fce8-801c-2eab-21efa147c34d@suse.de> (raw)
In-Reply-To: <6b55cdda-832d-1db3-8291-17f2c004434a@polymtl.ca>

[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]

[ was: Re: [PATCH] [gdb/testsuite] Add gdb.base/include-main.exp ]
On 11/27/21 1:59 AM, Simon Marchi wrote:
> On 2021-11-26 13:47, Simon Marchi wrote:
>>>> I'm not a fan of having a file with the generic name "main.c" there.
>>>
>>> Could you explain why not?
>>>
>>> I don't understand why we'd need to duplicate a file that can easily be
>>> reused.  It even helps one to recognize quickly (once you known the
>>> contents of the file) that the test-case that is being investigated does
>>> not require a specific executable, just based on the fact it uses "main.c".
>>
>> I usually don't like multiple test cases re-using the same source file,
>> that makes it more complicated to modify it (must make sure to not
>> change the behavior of the the other tests).  But the case of an empty
>> program is simple enough, and your reasoning makes sense, so I'm ok with
>> that.
>>
>> Simon
>>
> 
> I'm seeing these 2 failures starting from this commit:
> 
> FAIL: gdb.base/list-missing-source.exp: list
> FAIL: gdb.base/list-missing-source.exp: info source

Thanks for letting me know, fixed in commit below.

- Tom



[-- Attachment #2: 0001-gdb-testsuite-Fix-FAIL-in-gdb.base-list-missing-source.exp.patch --]
[-- Type: text/x-patch, Size: 1093 bytes --]

[gdb/testsuite] Fix FAIL in gdb.base/list-missing-source.exp

In commit f8080fb7a44 "[gdb/testsuite] Add gdb.base/include-main.exp" a
file gdb.base/main.c was added, which caused the following regression:
...
(gdb) list^M
<gdb.base/main.c>
(gdb) FAIL: gdb.base/list-missing-source.exp: list
...

The problem is that the test-case does not expect to find a file main.c, but
now it finds gdb.base/main.c.

Fix this by using the more specific file name list-missing-source.c.

Tested on x86_64-linux.

---
 gdb/testsuite/gdb.base/list-missing-source.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp
index d6677fc0a5e..260ba4dcb7d 100644
--- a/gdb/testsuite/gdb.base/list-missing-source.exp
+++ b/gdb/testsuite/gdb.base/list-missing-source.exp
@@ -19,7 +19,7 @@
 standard_testfile
 
 # Create a source file in the output directory.
-set srcfile [standard_output_file main.c]
+set srcfile [standard_output_file list-missing-source.c]
 set fd [open "$srcfile" w]
 puts $fd {
 int

  reply	other threads:[~2021-11-27  6:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-26  9:48 [PATCH] [gdb/testsuite] Add gdb.base/include-main.exp Tom de Vries via Gdb-patches
2021-11-26 16:20 ` Simon Marchi
2021-11-26 17:11   ` Tom de Vries via Gdb-patches
2021-11-26 18:47     ` Simon Marchi
2021-11-27  0:59       ` Simon Marchi via Gdb-patches
2021-11-27  6:12         ` Tom de Vries via Gdb-patches [this message]
2021-11-30 20:39 ` Tom Tromey
2021-12-01  1:10   ` Tom Tromey
2021-12-01 14:58     ` Tom de Vries via Gdb-patches
2021-12-01 17:27       ` Tom Tromey
2021-12-02 12:59         ` Tom de Vries via Gdb-patches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0cff6cc-fce8-801c-2eab-21efa147c34d@suse.de \
    --to=gdb-patches@sourceware.org \
    --cc=simark@simark.ca \
    --cc=simon.marchi@polymtl.ca \
    --cc=tdevries@suse.de \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox