aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-10-24 10:43:35 +0100
committerPedro Alves <palves@redhat.com>2017-10-24 10:54:12 +0100
commit779990d9f0a169215b3619a8a1cd120550320793 (patch)
tree92ceec63d59f84e7ad3aa16552b31a216e4315f6 /gdb/testsuite
parentad9b8f5d022f777f32cceab9856f47a5b6afcce1 (diff)
downloadgdb-779990d9f0a169215b3619a8a1cd120550320793.zip
gdb-779990d9f0a169215b3619a8a1cd120550320793.tar.gz
gdb-779990d9f0a169215b3619a8a1cd120550320793.tar.bz2
Fix unstable test names in gdb.threads/attach-into-signal.exp
Currently, if you diff testsuite/gdb.sum of two testsuite runs you'll often see spurious hunks like these: -PASS: gdb.threads/attach-into-signal.exp: nonthreaded: attempt 2: attach (pass 2), pending signal catch +PASS: gdb.threads/attach-into-signal.exp: nonthreaded: attempt 1: attach (pass 2), pending signal catch PASS: gdb.threads/attach-into-signal.exp: successfully compiled posix threads test case PASS: gdb.threads/attach-into-signal.exp: threaded: handle SIGALRM stop print pass -PASS: gdb.threads/attach-into-signal.exp: threaded: attempt 1: attach (pass 1), pending signal catch -PASS: gdb.threads/attach-into-signal.exp: threaded: attempt 1: attach (pass 2), pending signal catch +PASS: gdb.threads/attach-into-signal.exp: threaded: attempt 2: attach (pass 1), pending signal catch +PASS: gdb.threads/attach-into-signal.exp: threaded: attempt 4: attach (pass 2), pending signal catch Fix this by removing the "attempt $attempt" test prefix. The attempt number can be retrieved from gdb.log instead, since the testcase is already using "verbose -log" to that effect. (The 'with_test_prefix "stoppedtry $stoppedtry"' prefix is unnecessary too, because inside that block there are no pass/fail calls. In fact the block includes a comment saying: # No PASS message as we may be looping in multiple # attempts. but I'll drop that whole loop in the next patch instead.) After this commit we'll show: PASS: gdb.threads/attach-into-signal.exp: nonthreaded: handle SIGALRM stop print pass PASS: gdb.threads/attach-into-signal.exp: nonthreaded: attach (pass 1), pending signal catch PASS: gdb.threads/attach-into-signal.exp: nonthreaded: attach (pass 2), pending signal catch PASS: gdb.threads/attach-into-signal.exp: successfully compiled posix threads test case PASS: gdb.threads/attach-into-signal.exp: threaded: handle SIGALRM stop print pass PASS: gdb.threads/attach-into-signal.exp: threaded: attach (pass 1), pending signal catch PASS: gdb.threads/attach-into-signal.exp: threaded: attach (pass 2), pending signal catch (I've avoided reindenting to make the patch easier to maintain/read. I'll reindent the blocks after this is in.) gdb/testsuite/ChangeLog: 2017-10-24 Pedro Alves <palves@redhat.com> * gdb.threads/attach-into-signal.exp (corefunc): Remove "attach $attempt" test prefix.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.threads/attach-into-signal.exp2
2 files changed, 5 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index c0a1417..0038a0c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2017-10-24 Pedro Alves <palves@redhat.com>
+ * gdb.threads/attach-into-signal.exp (corefunc): Remove "attach
+ $attempt" and "stoppedtry $stoppedtry" test prefixes.
+
+2017-10-24 Pedro Alves <palves@redhat.com>
+
* lib/gdb-python.exp (get_python_valueof): Add 'test' optional
parameter and handle it. Don't output read value in test name.
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index cfb06cf..7502479 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -56,7 +56,6 @@ proc corefunc { threadtype executable } {
set attempt 1
set passes 1
while { $passes < 3 && $attempt <= $attempts } {
- with_test_prefix "attempt $attempt" {
set stoppedtry 0
while { $stoppedtry < 10 } {
with_test_prefix "stoppedtry $stoppedtry" {
@@ -128,7 +127,6 @@ proc corefunc { threadtype executable } {
}
gdb_test "detach" "Detaching from.*" ""
- }
}
if {$passes < 3} {