diff options
author | Eric Blake <eblake@redhat.com> | 2013-03-11 15:40:32 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2013-03-11 15:40:32 -0600 |
commit | a8d9f4635238f845bb76269a54fbb2c55255d365 (patch) | |
tree | 4fa4812ca43cfc9d9eaed017e7d480298d080cba /tests/test-passfd.c | |
parent | 6169015de81eaa4f8148d29abcd640b4f4ab1b56 (diff) | |
download | gnulib-a8d9f4635238f845bb76269a54fbb2c55255d365.tar.gz |
tests: make it easier to bypass alarm time in debugger
While auditing alarm usage, I noticed that test-regex had a nice
idiom that made it easier to disable an alarm under glibc. Use
it elsewhere, so future copy-and-paste will preserve the idiom.
* tests/test-file-has-acl.c (main): Allow gdb to override alarm.
* tests/test-memmem.c (main): Likewise.
* tests/test-passfd.c (main): Likewise.
* tests/test-ptsname.c (main): Likewise.
* tests/test-ptsname_r.c (main): Likewise.
* tests/test-strcasestr.c (main): Likewise.
* tests/test-strstr.c (main): Likewise.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests/test-passfd.c')
-rw-r--r-- | tests/test-passfd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-passfd.c b/tests/test-passfd.c index c11a82859f..6389e154ee 100644 --- a/tests/test-passfd.c +++ b/tests/test-passfd.c @@ -45,8 +45,9 @@ main () # if HAVE_DECL_ALARM /* Avoid hanging on failure. */ + int alarm_value = 5; signal (SIGALRM, SIG_DFL); - alarm (5); + alarm (alarm_value); # endif fdnull = open ("/dev/null", O_RDWR); |