public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
@ 2021-10-25  9:03 Natarajan, Kavitha
  2021-10-25 18:27 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Natarajan, Kavitha @ 2021-10-25  9:03 UTC (permalink / raw)
  To: gdb-patches; +Cc: George, Jini Susan

[AMD Official Use Only]

Hi all,

Please review the changes to fix the gdb.base/langs.exp test failure when absolute path of the file name is printed.

Problem description:
gdb.base/langs.exp test fails due to mismatch in actual output against the
expected output when absolute path is printed instead of only the file name.

Fix:
Fixed gdb.base/langs.exp to accept absolute path as well.

---
gdb/testsuite/gdb.base/langs.exp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index 631401a8eab..0dc9181a4e5 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -64,20 +64,20 @@ if [runto csub] then {

     if { !$isfixed } { set lang c\\+\\+; set ext cxx }
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
-    gdb_test "up" ".* in (foo|$foo_func).* at langs2\\.$ext.*return csub \\(.*<file://(.*>" \
+    gdb_test "up" ".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*<file://(.*>" \
        "up to foo in langs.exp"
     gdb_test "show language" "currently $lang.*" \
        "show language at foo in langs.exp"

     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
-    gdb_test "up" ".* in cppsub_ .* at langs2\\.$ext.*return foo \\(.*<file://(.*>" \
+    gdb_test "up" ".* in cppsub_ .* at .*langs2\\.$ext.*return foo \\(.*<file://(.*>" \
        "up to cppsub_ in langs.exp"
     gdb_test "show language" "currently $lang.*" \
        "show language at cppsub_ in langs.exp"

     if { !$isfixed } { set lang fortran }
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
-    gdb_test "up" ".* in fsub.* at langs1\\.f.*" \
+    gdb_test "up" ".* in fsub.* at .*langs1\\.f.*" \
        "up to fsub in langs.exp"
     gdb_test "show language" "currently $lang.*" \
        "show language at fsub in langs.exp"
--

Regards,
Kavitha

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
  2021-10-25  9:03 [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp Natarajan, Kavitha
@ 2021-10-25 18:27 ` Tom Tromey
  2021-10-25 18:42   ` Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Tromey @ 2021-10-25 18:27 UTC (permalink / raw)
  To: Natarajan, Kavitha via Gdb-patches; +Cc: Natarajan, Kavitha, George, Jini Susan

>>>>> ">" == Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org> writes:

>> Problem description:
>> gdb.base/langs.exp test fails due to mismatch in actual output against the
>> expected output when absolute path is printed instead of only the file name.

>> Fix:
>> Fixed gdb.base/langs.exp to accept absolute path as well.

Thank you, this is OK.

Tom

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
  2021-10-25 18:27 ` Tom Tromey
@ 2021-10-25 18:42   ` Tom de Vries
  2021-10-28  7:23     ` Natarajan, Kavitha
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2021-10-25 18:42 UTC (permalink / raw)
  To: Tom Tromey, Natarajan, Kavitha via Gdb-patches
  Cc: George, Jini Susan, Natarajan, Kavitha

On 10/25/21 8:27 PM, Tom Tromey wrote:
>>>>>> ">" == Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
>>> Problem description:
>>> gdb.base/langs.exp test fails due to mismatch in actual output against the
>>> expected output when absolute path is printed instead of only the file name.
> 

Does it always fail in your build & test configuration?

If not, is this clang vs gcc ? Or perhaps Dwarf 4 vs Dwarf 5 ?

Is there a symlink involved somewhere?

Why does gdb print the absolute instead of relative path?

Thanks,
- Tom

>>> Fix:
>>> Fixed gdb.base/langs.exp to accept absolute path as well.
> 
> Thank you, this is OK.
> 
> Tom
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
  2021-10-25 18:42   ` Tom de Vries
@ 2021-10-28  7:23     ` Natarajan, Kavitha
  2021-10-28  7:35       ` Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Natarajan, Kavitha @ 2021-10-28  7:23 UTC (permalink / raw)
  To: Tom de Vries, Tom Tromey, Natarajan,  Kavitha via Gdb-patches
  Cc: George, Jini Susan

[AMD Official Use Only]

Hi Tom,

Thanks for the prompt. The difference is with dwarf-5 only. Probably, should look for a fix in the source 
rather than in the test script.

Regards,
Kavitha

-----Original Message-----
From: Tom de Vries <tdevries@suse.de> 
Sent: Tuesday, October 26, 2021 12:12 AM
To: Tom Tromey <tom@tromey.com>; Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org>
Cc: George, Jini Susan <JiniSusan.George@amd.com>; Natarajan, Kavitha <Kavitha.Natarajan@amd.com>
Subject: Re: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp

[CAUTION: External Email]

On 10/25/21 8:27 PM, Tom Tromey wrote:
>>>>>> ">" == Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org> writes:
>
>>> Problem description:
>>> gdb.base/langs.exp test fails due to mismatch in actual output 
>>> against the expected output when absolute path is printed instead of only the file name.
>

Does it always fail in your build & test configuration?

If not, is this clang vs gcc ? Or perhaps Dwarf 4 vs Dwarf 5 ?

Is there a symlink involved somewhere?

Why does gdb print the absolute instead of relative path?

Thanks,
- Tom

>>> Fix:
>>> Fixed gdb.base/langs.exp to accept absolute path as well.
>
> Thank you, this is OK.
>
> Tom
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
  2021-10-28  7:23     ` Natarajan, Kavitha
@ 2021-10-28  7:35       ` Tom de Vries
  0 siblings, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2021-10-28  7:35 UTC (permalink / raw)
  To: Natarajan, Kavitha, Tom Tromey, Natarajan, Kavitha via Gdb-patches
  Cc: George, Jini Susan

On 10/28/21 9:23 AM, Natarajan, Kavitha wrote:
> [AMD Official Use Only]
> 
> Hi Tom,
> 
> Thanks for the prompt. The difference is with dwarf-5 only.

I see, thanks for investigating that.

> Probably, should look for a fix in the source 
> rather than in the test script.
> 

FWIW, I've posted an RFC on this issue a while ago:
https://sourceware.org/pipermail/gdb-patches/2021-July/181031.html .

I think I remember some commits in binutils that looked related, and
I've been wanting to try out the test-case with a trunk binutils build,
but haven't found the time yet.

Thanks,
- Tom

> Regards,
> Kavitha
> 
> -----Original Message-----
> From: Tom de Vries <tdevries@suse.de> 
> Sent: Tuesday, October 26, 2021 12:12 AM
> To: Tom Tromey <tom@tromey.com>; Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org>
> Cc: George, Jini Susan <JiniSusan.George@amd.com>; Natarajan, Kavitha <Kavitha.Natarajan@amd.com>
> Subject: Re: [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp
> 
> [CAUTION: External Email]
> 
> On 10/25/21 8:27 PM, Tom Tromey wrote:
>>>>>>> ">" == Natarajan, Kavitha via Gdb-patches <gdb-patches@sourceware.org> writes:
>>
>>>> Problem description:
>>>> gdb.base/langs.exp test fails due to mismatch in actual output 
>>>> against the expected output when absolute path is printed instead of only the file name.
>>
> 
> Does it always fail in your build & test configuration?
> 
> If not, is this clang vs gcc ? Or perhaps Dwarf 4 vs Dwarf 5 ?
> 
> Is there a symlink involved somewhere?
> 
> Why does gdb print the absolute instead of relative path?
> 
> Thanks,
> - Tom
> 
>>>> Fix:
>>>> Fixed gdb.base/langs.exp to accept absolute path as well.
>>
>> Thank you, this is OK.
>>
>> Tom
>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-28  7:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  9:03 [PATCH] [gdb/testsuite] Fix expected output in gdb.base/langs.exp Natarajan, Kavitha
2021-10-25 18:27 ` Tom Tromey
2021-10-25 18:42   ` Tom de Vries
2021-10-28  7:23     ` Natarajan, Kavitha
2021-10-28  7:35       ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).