From 10444e425e539ec12e42415756b0a874413ce94a Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 29 Dec 2013 22:19:45 +0000 Subject: tst-longjmp_chk: add comments and convert to test-skeleton Signed-off-by: Mike Frysinger --- debug/tst-longjmp_chk.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'debug') diff --git a/debug/tst-longjmp_chk.c b/debug/tst-longjmp_chk.c index 8892974cc7..dba1855f4a 100644 --- a/debug/tst-longjmp_chk.c +++ b/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 #include #include @@ -43,8 +45,8 @@ handler (int sig) } -int -main (void) +static int +do_test (void) { struct sigaction sa; sa.sa_handler = handler; @@ -84,3 +86,6 @@ main (void) puts ("second longjmp returned"); return 1; } + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" -- cgit 1.4.1