public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
@ 2022-01-13 16:10 Simon Marchi
  2022-01-14 19:45 ` Iain Buclaw
  2022-01-14 20:12 ` Tom Tromey
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Marchi @ 2022-01-13 16:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Iain Buclaw, Simon Marchi

Since commit ce2d3708bc8b ("Synchronize binutils libiberty sources with
gcc version."), I see this failure:

    demangle _D8demangle4testFnZv^M
    demangle.test(typeof(null))^M
    (gdb) FAIL: gdb.dlang/demangle.exp: _D8demangle4testFnZv

The commit imported the commit 0e32a5aa8bc9 ("libiberty: Add support for
D `typeof(*null)' types") from the gcc repository.  That commit includes
an update to libiberty/testsuite/d-demangle-expected, which updates a
test for the exact same mangled name:

     _D8demangle4testFnZv
    -demangle.test(none)
    +demangle.test(typeof(null))

I don't know anything about D, but give that the change was made by Iain
Buclaw, the D language maintainer, I trust him on that.

Fix our test by updating the expected output in the same way.

Note: it's not really useful to have all these D demangling tests in the
GDB testsuite, since there are demangling tests in libiberty.  We should
consider removing them, but we first need to make sure that everything
that is covered in gdb/testsuite/gdb.dlang/demangle.exp is also covered
in libiberty/testsuite/d-demangle-expected.

Change-Id: If2b290ea8367b8e1e0b90b20d4a6e0bee517952d
---
 gdb/testsuite/gdb.dlang/demangle.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dlang/demangle.exp b/gdb/testsuite/gdb.dlang/demangle.exp
index ebc2487fd1b..d45437c72cf 100644
--- a/gdb/testsuite/gdb.dlang/demangle.exp
+++ b/gdb/testsuite/gdb.dlang/demangle.exp
@@ -44,7 +44,7 @@ proc test_d_demangling {} {
     test_demangling "_D8demangle4testFkZv" "demangle.test(uint)"
     test_demangling "_D8demangle4testFlZv" "demangle.test(long)"
     test_demangling "_D8demangle4testFmZv" "demangle.test(ulong)"
-    test_demangling "_D8demangle4testFnZv" "demangle.test(none)"
+    test_demangling "_D8demangle4testFnZv" "demangle.test(typeof(null))"
     test_demangling "_D8demangle4testFoZv" "demangle.test(ifloat)"
     test_demangling "_D8demangle4testFpZv" "demangle.test(idouble)"
     test_demangling "_D8demangle4testFqZv" "demangle.test(cfloat)"
-- 
2.34.1


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

* Re: [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
  2022-01-13 16:10 [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv Simon Marchi
@ 2022-01-14 19:45 ` Iain Buclaw
  2022-01-14 20:09   ` Simon Marchi
  2022-01-14 20:12 ` Tom Tromey
  1 sibling, 1 reply; 4+ messages in thread
From: Iain Buclaw @ 2022-01-14 19:45 UTC (permalink / raw)
  To: gdb-patches, Simon Marchi

Excerpts from Simon Marchi's message of Januar 13, 2022 5:10 pm:
> Since commit ce2d3708bc8b ("Synchronize binutils libiberty sources with
> gcc version."), I see this failure:
> 
>     demangle _D8demangle4testFnZv^M
>     demangle.test(typeof(null))^M
>     (gdb) FAIL: gdb.dlang/demangle.exp: _D8demangle4testFnZv
> 
> The commit imported the commit 0e32a5aa8bc9 ("libiberty: Add support for
> D `typeof(*null)' types") from the gcc repository.  That commit includes
> an update to libiberty/testsuite/d-demangle-expected, which updates a
> test for the exact same mangled name:
> 
>      _D8demangle4testFnZv
>     -demangle.test(none)
>     +demangle.test(typeof(null))
> 
> I don't know anything about D, but give that the change was made by Iain
> Buclaw, the D language maintainer, I trust him on that.
> 
> Fix our test by updating the expected output in the same way.
> 
> Note: it's not really useful to have all these D demangling tests in the
> GDB testsuite, since there are demangling tests in libiberty.  We should
> consider removing them, but we first need to make sure that everything
> that is covered in gdb/testsuite/gdb.dlang/demangle.exp is also covered
> in libiberty/testsuite/d-demangle-expected.
> 

Hi Simon,

To memory, both gdb and libiberty D demangle tests started out as being
identical, but libiberty has been adding more to it as it's been
improved/updated to support the latest language features.  I see no
issues with removing it if it's becoming problematic to maintain both.

Iain.

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

* Re: [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
  2022-01-14 19:45 ` Iain Buclaw
@ 2022-01-14 20:09   ` Simon Marchi
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Marchi @ 2022-01-14 20:09 UTC (permalink / raw)
  To: gdb-patches, Iain Buclaw

On 2022-01-14 2:45 p.m., Iain Buclaw via Gdb-patches wrote:
> Excerpts from Simon Marchi's message of Januar 13, 2022 5:10 pm:
>> Since commit ce2d3708bc8b ("Synchronize binutils libiberty sources with
>> gcc version."), I see this failure:
>>
>>     demangle _D8demangle4testFnZv^M
>>     demangle.test(typeof(null))^M
>>     (gdb) FAIL: gdb.dlang/demangle.exp: _D8demangle4testFnZv
>>
>> The commit imported the commit 0e32a5aa8bc9 ("libiberty: Add support for
>> D `typeof(*null)' types") from the gcc repository.  That commit includes
>> an update to libiberty/testsuite/d-demangle-expected, which updates a
>> test for the exact same mangled name:
>>
>>      _D8demangle4testFnZv
>>     -demangle.test(none)
>>     +demangle.test(typeof(null))
>>
>> I don't know anything about D, but give that the change was made by Iain
>> Buclaw, the D language maintainer, I trust him on that.
>>
>> Fix our test by updating the expected output in the same way.
>>
>> Note: it's not really useful to have all these D demangling tests in the
>> GDB testsuite, since there are demangling tests in libiberty.  We should
>> consider removing them, but we first need to make sure that everything
>> that is covered in gdb/testsuite/gdb.dlang/demangle.exp is also covered
>> in libiberty/testsuite/d-demangle-expected.
>>
> 
> Hi Simon,
> 
> To memory, both gdb and libiberty D demangle tests started out as being
> identical, but libiberty has been adding more to it as it's been
> improved/updated to support the latest language features.  I see no
> issues with removing it if it's becoming problematic to maintain both.
> 
> Iain.
> 

Ok, thanks for the info.  It doesn't seem to break too often, so I am not
in a hurry to remove them, but we'll keep that in mind for the future.  I
pushed the patch in the mean time.

Thanks!

Simon

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

* Re: [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv
  2022-01-13 16:10 [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv Simon Marchi
  2022-01-14 19:45 ` Iain Buclaw
@ 2022-01-14 20:12 ` Tom Tromey
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2022-01-14 20:12 UTC (permalink / raw)
  To: Simon Marchi via Gdb-patches; +Cc: Simon Marchi

>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:

Simon> Note: it's not really useful to have all these D demangling tests in the
Simon> GDB testsuite, since there are demangling tests in libiberty.

Funny story, the libiberty demangler test suite actually started as a
copy of gdb's demangler tests, back in ancient times.

I wouldn't mind removing the gdb copies though.  I don't think they add
much value.  If need be I guess we could figure out a way to add unit
testing to libiberty and run that from gdb's selftests.

Tom

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

end of thread, other threads:[~2022-01-14 20:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13 16:10 [PATCH] gdb.dlang/demangle.exp: update expected output for _D8demangle4testFnZv Simon Marchi
2022-01-14 19:45 ` Iain Buclaw
2022-01-14 20:09   ` Simon Marchi
2022-01-14 20:12 ` Tom Tromey

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).