binutils-gdb/gdb/testsuite
Pedro Alves 049109b007 tstatus.exp: use UNSUPPORTED for optional features that are not supported
The current tstatus.exp tests shows PASSes if either the target
support or not the optional tstatus bits:

 PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason
 PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason

The former (and any other similar case) should be UNSUPPORTED rather
than PASS.  That'd make it much easier to spot actually problems with
the test (e.g., the one Yao's previous patch addressed), along with
regressions and progressions.

The "not supported" paths in tstatus.exp explicitly check for output
you'd get if the feature wasn't supported, so real unexpected failures
will still be caught as FAILs.

So now e.g., where we wanted to check if tstatus reports the trace
stop reason, and if the target does support it, we get

 PASS: tstatus reports trace stop reason

if the target actually reports what we'd expect if the trace stop
reason isn't supported, we get:

 UNSUPPORTED: tstatus reports trace stop reason

and if the target reports something else unexpected, we get:

 FAIL: tstatus reports trace stop reason

That has the added bonus that the test string is always the same and
only the test results change (PASS/FAIL/UNSUPPORTED), which makes it
easier for testers see regressions, compared to the previous:

 -PASS: gdb.trace/tstatus.exp: tstatus reports trace stop reason
 +PASS: gdb.trace/tstatus.exp: tstatus does not report trace stop reason

which clearly easily goes by unnoticed, as evidenced by the existing
problem Yao's previous patch addressed.

Tested on x86_64 Fedora 17.

gdb/testsuite/
2013-03-06  Pedro Alves  <palves@redhat.com>

	* gdb.trace/tstatus.exp (run_trace_experiment): When the target
	doesn't support the tested optional feature, call "unsupported"
	with the same test message as the "pass" case, instead of calling
	"pass" with a different message.  Use the same text for the "fail"
	cases too.
2013-03-06 12:13:41 +00:00
..
boards * boards/dwarf4-gdb-index.exp: Use any existing CC_FOR_TARGET, 2013-01-17 20:17:15 +00:00
config Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.ada Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.arch Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.asm Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.base gdb/testsuite/ 2013-02-27 18:46:52 +00:00
gdb.cell Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.cp Fix ptype bug actually exercised in userdef.exp 2013-02-14 12:43:46 +00:00
gdb.disasm Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gdb.dwarf2 PR gdb/15102: 2013-02-18 21:04:28 +00:00
gdb.fortran Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.gdb gdb/ 2013-02-03 15:54:18 +00:00
gdb.go Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.hp Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.java Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.linespec gdb/ 2013-03-04 19:30:28 +00:00
gdb.mi Tweak intro comments to some MI test files. 2013-02-12 16:36:07 +00:00
gdb.modula2 Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.multi Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.objc Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.opencl Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.opt Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.pascal Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.python Add a new method 'disassemble' to gdb.Architecture class. 2013-02-21 01:46:57 +00:00
gdb.reverse Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.server From: Sanimir Agovic <sanimir.agovic@intel.com> 2013-02-12 15:03:12 +00:00
gdb.stabs Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
gdb.threads gdb/testsuite/ 2013-02-27 18:48:23 +00:00
gdb.trace tstatus.exp: use UNSUPPORTED for optional features that are not supported 2013-03-06 12:13:41 +00:00
gdb.xml Update years in copyright notice for the GDB files. 2013-01-01 06:41:43 +00:00
lib gdb/testsuite/ 2013-02-02 09:12:10 +00:00
aclocal.m4
ChangeLog tstatus.exp: use UNSUPPORTED for optional features that are not supported 2013-03-06 12:13:41 +00:00
configure Initial pass at Go language support. 2012-04-25 14:07:23 +00:00
configure.ac Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
dg-extract-results.sh Merge dg-extract-results.sh from gcc upstream (svn 195224). 2013-01-17 14:31:11 +00:00
Makefile.in Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
TODO