Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tst-longjmp_chk: add comments and convert to test-skeleton
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  • Loading branch information
Mike Frysinger committed Feb 8, 2014
1 parent 1e805e8 commit 10444e4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
@@ -1,3 +1,10 @@
2014-02-08 Mike Frysinger <vapier@gentoo.org>

* debug/tst-longjmp_chk.c: Add header comment and include
../test-skeleton.c.
(do_test): Mark static.
(TEST_FUNCTION): Define.

2014-02-08 Mike Frysinger <vapier@gentoo.org>

* sysdeps/unix/sysv/linux/bits/in.h (IP_NODEFRAG): Define.
Expand Down
9 changes: 7 additions & 2 deletions debug/tst-longjmp_chk.c
@@ -1,3 +1,5 @@
/* Basic test to make sure doing a longjmp to a jmpbuf with an invalid sp
is caught by the fortification code. */
#include <errno.h>
#include <fcntl.h>
#include <paths.h>
Expand Down Expand Up @@ -43,8 +45,8 @@ handler (int sig)
}


int
main (void)
static int
do_test (void)
{
struct sigaction sa;
sa.sa_handler = handler;
Expand Down Expand Up @@ -84,3 +86,6 @@ main (void)
puts ("second longjmp returned");
return 1;
}

#define TEST_FUNCTION do_test ()
#include "../test-skeleton.c"

0 comments on commit 10444e4

Please sign in to comment.