* [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04
@ 2023-03-23 13:47 Tom de Vries
2023-03-24 14:17 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2023-03-23 13:47 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I
needed to change ".*/" into "(.*/)?" in:
...
gdb_test "info variable everywhere" \
"File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
...
However, due to that fact that I got this output:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M
8: const int gnu_obj_4::everywhere;^M
...
I decided to make the matching somewhat stricter, to make sure that the two
matched lines were subsequent.
The commit turned out to be more strict than intended, and caused a regression
on Ubuntu 20.04, where the output was instead:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
...
At that point I realized I'm looking at a bug (filed as PR symtab/30265),
which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu
20.04 for readnow, but not for native.
Before my commit, the test-case passed whether the bug manifested or not.
After my commit, the test-case only passed when the bug manifested.
Fix the test-case regression by reverting to the situation before the commit:
pass whether the bug manifests or not. We could add an xfail for the PR, but
I'm expecting a fix soon, so that doesn't look worth the effort.
Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with
native and readnow.
Reported-By: Simon Marchi <simon.marchi@efficios.com>
---
gdb/testsuite/gdb.cp/m-static.exp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 419d772e28e..37d3289a751 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -186,8 +186,7 @@ if { $non_dwarf } { setup_xfail *-*-* }
gdb_test "info variable everywhere" \
[multi_line \
"File (.*/)?m-static\[.\]h:" \
- "$decimal:\tconst int gnu_obj_4::everywhere;" \
- ".*"]
+ "$decimal:\tconst int gnu_obj_4::everywhere;.*"]
# Perhaps at some point test4 should also include a test for a static
# const int that was initialized in the header file. But I'm not sure
base-commit: 5834f36d93cabf1a8bcc7dd7654141aed3d296bc
--
2.35.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04
2023-03-23 13:47 [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04 Tom de Vries
@ 2023-03-24 14:17 ` Simon Marchi
2023-03-24 14:49 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2023-03-24 14:17 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 3/23/23 09:47, Tom de Vries wrote:
> In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I
> needed to change ".*/" into "(.*/)?" in:
> ...
> gdb_test "info variable everywhere" \
> "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
> ...
>
> However, due to that fact that I got this output:
> ...
> (gdb) info variable everywhere^M
> All variables matching regular expression "everywhere":^M
> ^M
> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
> 8: const int gnu_obj_4::everywhere;^M
> ^M
> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M
> 8: const int gnu_obj_4::everywhere;^M
> ...
> I decided to make the matching somewhat stricter, to make sure that the two
> matched lines were subsequent.
>
> The commit turned out to be more strict than intended, and caused a regression
> on Ubuntu 20.04, where the output was instead:
> ...
> (gdb) info variable everywhere^M
> All variables matching regular expression "everywhere":^M
> ^M
> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
> 8: const int gnu_obj_4::everywhere;^M
> ...
>
> At that point I realized I'm looking at a bug (filed as PR symtab/30265),
> which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu
> 20.04 for readnow, but not for native.
>
> Before my commit, the test-case passed whether the bug manifested or not.
>
> After my commit, the test-case only passed when the bug manifested.
>
> Fix the test-case regression by reverting to the situation before the commit:
> pass whether the bug manifests or not. We could add an xfail for the PR, but
> I'm expecting a fix soon, so that doesn't look worth the effort.
>
> Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with
> native and readnow.
>
> Reported-By: Simon Marchi <simon.marchi@efficios.com>
For those wondering, this is already pushed :)
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04
2023-03-24 14:17 ` Simon Marchi
@ 2023-03-24 14:49 ` Tom de Vries
0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2023-03-24 14:49 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 3/24/23 15:17, Simon Marchi wrote:
> On 3/23/23 09:47, Tom de Vries wrote:
>> In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I
>> needed to change ".*/" into "(.*/)?" in:
>> ...
>> gdb_test "info variable everywhere" \
>> "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
>> ...
>>
>> However, due to that fact that I got this output:
>> ...
>> (gdb) info variable everywhere^M
>> All variables matching regular expression "everywhere":^M
>> ^M
>> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
>> 8: const int gnu_obj_4::everywhere;^M
>> ^M
>> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M
>> 8: const int gnu_obj_4::everywhere;^M
>> ...
>> I decided to make the matching somewhat stricter, to make sure that the two
>> matched lines were subsequent.
>>
>> The commit turned out to be more strict than intended, and caused a regression
>> on Ubuntu 20.04, where the output was instead:
>> ...
>> (gdb) info variable everywhere^M
>> All variables matching regular expression "everywhere":^M
>> ^M
>> File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
>> 8: const int gnu_obj_4::everywhere;^M
>> ...
>>
>> At that point I realized I'm looking at a bug (filed as PR symtab/30265),
>> which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu
>> 20.04 for readnow, but not for native.
>>
>> Before my commit, the test-case passed whether the bug manifested or not.
>>
>> After my commit, the test-case only passed when the bug manifested.
>>
>> Fix the test-case regression by reverting to the situation before the commit:
>> pass whether the bug manifests or not. We could add an xfail for the PR, but
>> I'm expecting a fix soon, so that doesn't look worth the effort.
>>
>> Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with
>> native and readnow.
>>
>> Reported-By: Simon Marchi <simon.marchi@efficios.com>
>
> For those wondering, this is already pushed :)
Hi Simon,
sorry, forgot to mention that here, thanks for the note.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-24 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 13:47 [PATCH] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on Ubuntu 20.04 Tom de Vries
2023-03-24 14:17 ` Simon Marchi
2023-03-24 14:49 ` 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).