public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" @ 2022-11-10 10:57 vries at gcc dot gnu.org 2022-11-10 12:53 ` [Bug testsuite/29772] " vries at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: vries at gcc dot gnu.org @ 2022-11-10 10:57 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29772 Bug ID: 29772 Summary: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" Product: gdb Version: HEAD Status: NEW Severity: normal Priority: P2 Component: testsuite Assignee: unassigned at sourceware dot org Reporter: vries at gcc dot gnu.org Target Milestone: --- I noticed here ( https://sourceware.org/gdb/wiki/GDBTestcaseCookbook ): ... Do not use "tail parentheses" on test messages When you write a test, do not put text between parentheses preceded by a space at the end of the text message. For example, this is incorrect: gdb_test "some_test" "expected output" "I am a test message (123)" ... I then noticed that when checking for duplicates, we do detect: ... FAIL: gdb.testsuite/duplicate.exp: foo FAIL: gdb.testsuite/duplicate.exp: foo ... but not: ... FAIL: gdb.testsuite/duplicate.exp: foo FAIL: gdb.testsuite/duplicate.exp: foo (timeout) ... I wrote a patch to fix this: ... diff --git a/gdb/testsuite/lib/check-test-names.exp b/gdb/testsuite/lib/check-test -names.exp index 752981c7888..fac93259464 100644 --- a/gdb/testsuite/lib/check-test-names.exp +++ b/gdb/testsuite/lib/check-test-names.exp @@ -64,6 +64,9 @@ namespace eval ::CheckTestNames { proc _check_duplicates { message } { variable all_test_names + # Remove the "extra information" part. + set message [regsub { \(.*\)$} $message ""] + # Initialise a count, or increment the count for this test name. if {![info exists all_test_names($message)]} { set all_test_names($message) 0 ... I ran into 6453 duplicates in 134 test-cases: ... $ grep DUPLICATE: gdb.sum | wc -l 6453 $ grep DUPLICATE: gdb.sum | awk '{print $2}' | sort -u | wc -l 134 ... For instance: ... DUPLICATE: gdb.arch/amd64-osabi.exp: arch=i386:x86-64: print sizeof (long double) DUPLICATE: gdb.arch/amd64-osabi.exp: arch=i386:x64-32: print sizeof (long double) DUPLICATE: gdb.arch/amd64-osabi.exp: arch=i386: print sizeof (long double) ... It may be worthwhile to override all pass / fail procs to do some automated test name substitution: ... -PASS: gdb.arch/amd64-osabi.exp: arch=i386:x86-64: print sizeof (long double) +PASS: gdb.arch/amd64-osabi.exp: arch=i386:x86-64: print sizeof _(long double)_ ... and create extra versions fail_with_info to do: ... -fail "$testname (timeout)" +fail_with_info $testname "timeout" ... -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/29772] [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" 2022-11-10 10:57 [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" vries at gcc dot gnu.org @ 2022-11-10 12:53 ` vries at gcc dot gnu.org 2022-12-06 18:45 ` pedro at palves dot net ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: vries at gcc dot gnu.org @ 2022-11-10 12:53 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29772 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 14449 --> https://sourceware.org/bugzilla/attachment.cgi?id=14449&action=edit tentative patch, fixes one test-case -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/29772] [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" 2022-11-10 10:57 [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" vries at gcc dot gnu.org 2022-11-10 12:53 ` [Bug testsuite/29772] " vries at gcc dot gnu.org @ 2022-12-06 18:45 ` pedro at palves dot net 2023-01-22 17:58 ` tromey at sourceware dot org 2023-01-22 21:53 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: pedro at palves dot net @ 2022-12-06 18:45 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29772 Pedro Alves <pedro at palves dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro at palves dot net --- Comment #2 from Pedro Alves <pedro at palves dot net> --- For tests like: print sizeof (long double) or in general any "print func (type...)" test, we can just remove the space before parens: print sizeof(long double) print func(type) The advantage is that the testcase name is still valid syntax. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/29772] [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" 2022-11-10 10:57 [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" vries at gcc dot gnu.org 2022-11-10 12:53 ` [Bug testsuite/29772] " vries at gcc dot gnu.org 2022-12-06 18:45 ` pedro at palves dot net @ 2023-01-22 17:58 ` tromey at sourceware dot org 2023-01-22 21:53 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2023-01-22 17:58 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29772 Tom Tromey <tromey at sourceware dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot org --- Comment #3 from Tom Tromey <tromey at sourceware dot org> --- I tried this and ugh... I wonder if it would be simpler to change the suffix for auxiliary information. Really it would be nicer if this were a dejagnu feature, like fail -reason Text testname ... but meanwhile what if we made it something unlikely to appear in real syntax, like fail "testname <<<timeout>>>" -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug testsuite/29772] [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" 2022-11-10 10:57 [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" vries at gcc dot gnu.org ` (2 preceding siblings ...) 2023-01-22 17:58 ` tromey at sourceware dot org @ 2023-01-22 21:53 ` tromey at sourceware dot org 3 siblings, 0 replies; 5+ messages in thread From: tromey at sourceware dot org @ 2023-01-22 21:53 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=29772 --- Comment #4 from Tom Tromey <tromey at sourceware dot org> --- I fixed the buglets here in gdb.rust, but the process seems a bit daunting for the entire test suite. I didn't look at how hard it would be to change the suffix. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-01-22 21:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-11-10 10:57 [Bug testsuite/29772] New: [gdb/testsuite] Detect duplicates for "FAIL: foo" and "FAIL: foo (timeout)" vries at gcc dot gnu.org 2022-11-10 12:53 ` [Bug testsuite/29772] " vries at gcc dot gnu.org 2022-12-06 18:45 ` pedro at palves dot net 2023-01-22 17:58 ` tromey at sourceware dot org 2023-01-22 21:53 ` tromey at sourceware dot org
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).