about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/errno-loc.c
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2017-06-22 17:53:37 -0400
committerZack Weinberg <zackw@panix.com>2017-06-22 17:53:37 -0400
commit6e5e73539b3fc122df96d653fab3c357a08071a4 (patch)
tree19bd2486f2e4250642824e27a80f52458444d7cd /sysdeps/mach/hurd/errno-loc.c
parent0a47d031e44f15236bcef8aeba80e737bd013c6f (diff)
downloadglibc-6e5e73539b3fc122df96d653fab3c357a08071a4.tar.gz
glibc-6e5e73539b3fc122df96d653fab3c357a08071a4.tar.xz
glibc-6e5e73539b3fc122df96d653fab3c357a08071a4.zip
Improve testing of GDB pretty-printers.
The C programs used to test GDB pretty-printers were being compiled
with -DMODULE_NAME=libc (!) which causes many problems, such as
failure to link if they refer to errno.  Now they are compiled with
-DMODULE_NAME=testsuite instead.

test_printers_common.py was testing for expected output in a clumsy
way which meant the pexpect timeout had to expire before it could
report a failure, even if the regexp was never going to match.  This
slows down debugging a test quite a bit.  Rewrote that logic so it
doesn't do that anymore.  Note that as a side effect, test() fails the
test by calling exit() rather than throwing an exception -- that could
change if people think it's a bad idea.

Add an 'unsupported_pattern' argument to test(); if the normal
'pattern' fails to match, but an 'unsupported_pattern' was supplied
and it matches, then the test fails as unsupported, not as a normal
failure.  This feature is used in part 2.

Tighten up the code to honor TIMEOUTFACTOR, and add another
environment variable TEST_PRINTERS_LOG; if this is set to a pathname,
all of the dialogue with the gdb subprocess will be logged to that
file.

	* Rules: Set MODULE_NAME=testsuite for everything in tests-printers.
	* scripts/test_printers_common.py (TIMEOUTFACTOR): Tighten up handling.
	(TEST_PRINTERS_LOG): New env variable; if set, pexpect will log all
	dialogue with the gdb subprocess to the file it names.
	(send_command): New function broken out of test.
	(test): Add 'unsupported_pattern' argument and improve
	handling of 'pattern' argument; match failures no longer have to
	wait for the timeout.
Diffstat (limited to 'sysdeps/mach/hurd/errno-loc.c')
0 files changed, 0 insertions, 0 deletions