* [review] [gdb/testsuite] Add note to 'Race detection' entry in README
2020-02-03 10:17 [review] [gdb/testsuite] Add note to 'Race detection' entry in README Tom de Vries (Code Review)
@ 2020-02-04 5:36 ` Simon Marchi (Code Review)
2020-02-04 10:10 ` Tom de Vries (Code Review)
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi (Code Review) @ 2020-02-04 5:36 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/762
......................................................................
Patch Set 1:
Out of curiosity, do you have an example of this? Surely, you must have experienced a concrete case of this happening :)
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
Gerrit-Change-Number: 762
Gerrit-PatchSet: 1
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Tue, 04 Feb 2020 05:36:52 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 6+ messages in thread* [review] [gdb/testsuite] Add note to 'Race detection' entry in README
2020-02-03 10:17 [review] [gdb/testsuite] Add note to 'Race detection' entry in README Tom de Vries (Code Review)
2020-02-04 5:36 ` Simon Marchi (Code Review)
@ 2020-02-04 10:10 ` Tom de Vries (Code Review)
2020-02-04 14:25 ` Simon Marchi (Code Review)
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Tom de Vries (Code Review) @ 2020-02-04 10:10 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
Tom de Vries has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/762
......................................................................
Patch Set 1:
> Patch Set 1:
>
> Out of curiosity, do you have an example of this? Surely, you must have experienced a concrete case of this happening :)
I ran into this while working on https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/133 , where I would try to match:
...
[Inferior 1 exited ... ]^M
(gdb) [Inferior 2 exited ... ]^M
...
An easier way to reproduce this is:
...
$ cat gdb/testsuite/gdb.base/check-read1.c
#include <stdio.h>
int
main (void)
{
printf ("hello\n");
return 0;
}
...
and:
...
$ cat gdb/testsuite/gdb.base/check-read1.exp
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
if ![runto_main] then {
fail "can't run to main"
return 0
}
gdb_test "continue &"
...
Where with make check we have:
...
Running src/gdb/testsuite/gdb.base/check-read1.exp ...
FAIL: gdb.base/check-read1.exp: continue & (timeout)
=== gdb Summary ===
# of unexpected failures 1
...
but with make check-read1 we have:
...
Running src/gdb/testsuite/gdb.base/check-read1.exp ...
=== gdb Summary ===
# of expected passes 1
...
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
Gerrit-Change-Number: 762
Gerrit-PatchSet: 1
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-CC: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Comment-Date: Tue, 04 Feb 2020 10:10:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 6+ messages in thread* [review] [gdb/testsuite] Add note to 'Race detection' entry in README
2020-02-03 10:17 [review] [gdb/testsuite] Add note to 'Race detection' entry in README Tom de Vries (Code Review)
2020-02-04 5:36 ` Simon Marchi (Code Review)
2020-02-04 10:10 ` Tom de Vries (Code Review)
@ 2020-02-04 14:25 ` Simon Marchi (Code Review)
2020-02-04 16:37 ` [pushed] " Sourceware to Gerrit sync (Code Review)
2020-02-04 16:37 ` Sourceware to Gerrit sync (Code Review)
4 siblings, 0 replies; 6+ messages in thread
From: Simon Marchi (Code Review) @ 2020-02-04 14:25 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
Simon Marchi has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/762
......................................................................
Patch Set 1: Code-Review+2
Ok, thanks. It's not the usual case that GDB prints things after the prompt, but I think it's good to mention it anyway.
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
Gerrit-Change-Number: 762
Gerrit-PatchSet: 1
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-Comment-Date: Tue, 04 Feb 2020 14:25:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
^ permalink raw reply [flat|nested] 6+ messages in thread
* [pushed] [gdb/testsuite] Add note to 'Race detection' entry in README
2020-02-03 10:17 [review] [gdb/testsuite] Add note to 'Race detection' entry in README Tom de Vries (Code Review)
` (2 preceding siblings ...)
2020-02-04 14:25 ` Simon Marchi (Code Review)
@ 2020-02-04 16:37 ` Sourceware to Gerrit sync (Code Review)
2020-02-04 16:37 ` Sourceware to Gerrit sync (Code Review)
4 siblings, 0 replies; 6+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2020-02-04 16:37 UTC (permalink / raw)
To: Tom de Vries, Simon Marchi, gdb-patches
The original change was created by Tom de Vries.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/762
......................................................................
[gdb/testsuite] Add note to 'Race detection' entry in README
Add note to 'Race detection' entry in README about the possibility that
check-read1 makes failing tests pass.
gdb/testsuite/ChangeLog:
2020-02-04 Tom de Vries <tdevries@suse.de>
* README (Race detection): Add note.
Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
---
M gdb/testsuite/ChangeLog
M gdb/testsuite/README
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8fcf67b..cd496e7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2020-02-04 Tom de Vries <tdevries@suse.de>
+ * README (Race detection): Add note.
+
+2020-02-04 Tom de Vries <tdevries@suse.de>
+
* lib/gdb.exp (inferior_exited_re): Use "\[^\n\r\]*" instead of ".*".
2020-02-04 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index 4795df1..3e42526 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -352,6 +352,13 @@
make -j10 check-read1 TESTS="*/paginate-*.exp"
make -j10 check READ1="1"
+Note: While the intention is to detect races and make otherwise passing tests
+fail, it can also have the effect of making otherwise failing tests pass.
+This happens f.i. if the test is trying to match a gdb prompt using an end of
+input marker "${gdb_prompt} $" and there is output after the gdb prompt. This
+may either pass or fail in normal operation, but using check-read1 will ensure
+that it passes.
+
Testsuite Configuration
***********************
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
Gerrit-Change-Number: 762
Gerrit-PatchSet: 2
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-MessageType: newpatchset
^ permalink raw reply [flat|nested] 6+ messages in thread* [pushed] [gdb/testsuite] Add note to 'Race detection' entry in README
2020-02-03 10:17 [review] [gdb/testsuite] Add note to 'Race detection' entry in README Tom de Vries (Code Review)
` (3 preceding siblings ...)
2020-02-04 16:37 ` [pushed] " Sourceware to Gerrit sync (Code Review)
@ 2020-02-04 16:37 ` Sourceware to Gerrit sync (Code Review)
4 siblings, 0 replies; 6+ messages in thread
From: Sourceware to Gerrit sync (Code Review) @ 2020-02-04 16:37 UTC (permalink / raw)
To: Tom de Vries, gdb-patches; +Cc: Simon Marchi
Sourceware to Gerrit sync has submitted this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/762
......................................................................
[gdb/testsuite] Add note to 'Race detection' entry in README
Add note to 'Race detection' entry in README about the possibility that
check-read1 makes failing tests pass.
gdb/testsuite/ChangeLog:
2020-02-04 Tom de Vries <tdevries@suse.de>
* README (Race detection): Add note.
Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
---
M gdb/testsuite/ChangeLog
M gdb/testsuite/README
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8fcf67b..cd496e7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2020-02-04 Tom de Vries <tdevries@suse.de>
+ * README (Race detection): Add note.
+
+2020-02-04 Tom de Vries <tdevries@suse.de>
+
* lib/gdb.exp (inferior_exited_re): Use "\[^\n\r\]*" instead of ".*".
2020-02-04 Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/README b/gdb/testsuite/README
index 4795df1..3e42526 100644
--- a/gdb/testsuite/README
+++ b/gdb/testsuite/README
@@ -352,6 +352,13 @@
make -j10 check-read1 TESTS="*/paginate-*.exp"
make -j10 check READ1="1"
+Note: While the intention is to detect races and make otherwise passing tests
+fail, it can also have the effect of making otherwise failing tests pass.
+This happens f.i. if the test is trying to match a gdb prompt using an end of
+input marker "${gdb_prompt} $" and there is output after the gdb prompt. This
+may either pass or fail in normal operation, but using check-read1 will ensure
+that it passes.
+
Testsuite Configuration
***********************
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I12ef2f0ec35abc5a0221585bf30e5f4f0616aa7c
Gerrit-Change-Number: 762
Gerrit-PatchSet: 2
Gerrit-Owner: Tom de Vries <tdevries@suse.de>
Gerrit-Reviewer: Simon Marchi <simon.marchi@polymtl.ca>
Gerrit-Reviewer: Tom de Vries <tdevries@suse.de>
Gerrit-MessageType: merged
^ permalink raw reply [flat|nested] 6+ messages in thread