From f8d39b8dcd3cec1893ff9edd216eddff08f9b752 Mon Sep 17 00:00:00 2001 From: Jennifer Averett Date: Mon, 4 Feb 2008 19:39:43 +0000 Subject: 2008-02-04 Jennifer Averett * Makefile.am, configure.ac, psxmsgq01/Makefile.am, psxmsgq01/init.c: Added tests for failure path coverages. Consolidated methods used in multiple places into support routines. * psxkey01/Makefile.am, psxkey01/init.c, psxkey01/psxkey01.scn, psxkey01/system.h, psxkey01/task.c, psxmsgq02/Makefile.am, psxmsgq02/init.c, psxmsgq02/psxmsgq02.scn, psxmsgq02/system.h: New files. --- testsuites/psxtests/psxmsgq01/Makefile.am | 4 +++- testsuites/psxtests/psxmsgq01/init.c | 15 +++------------ 2 files changed, 6 insertions(+), 13 deletions(-) (limited to 'testsuites/psxtests/psxmsgq01') diff --git a/testsuites/psxtests/psxmsgq01/Makefile.am b/testsuites/psxtests/psxmsgq01/Makefile.am index ed0a004974..384c56a469 100644 --- a/testsuites/psxtests/psxmsgq01/Makefile.am +++ b/testsuites/psxtests/psxmsgq01/Makefile.am @@ -5,7 +5,9 @@ MANAGERS = all rtems_tests_PROGRAMS = psxmsgq01.exe -psxmsgq01_exe_SOURCES = init.c system.h ../include/pmacros.h +psxmsgq01_exe_SOURCES = init.c system.h ../include/pmacros.h \ + ../../support/src/test_support.c + dist_rtems_tests_DATA = psxmsgq01.scn diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c index 8922173018..f96494f588 100644 --- a/testsuites/psxtests/psxmsgq01/init.c +++ b/testsuites/psxtests/psxmsgq01/init.c @@ -16,6 +16,7 @@ #include #include #include /* signal facilities */ +#include "test_support.h" typedef struct { char msg[ 50 ]; @@ -100,25 +101,15 @@ void Validate_attributes( fatal_int_service_status((int)attr.mq_flags, oflag, "flag attribute" ); } -char Queue_Name[PATH_MAX + 2]; #define Get_Queue_Name( i ) Test_q[i].name - char *Build_Queue_Name( int i ) { - sprintf(Queue_Name,"mq%d", i+1 ); - return Queue_Name; -} -char *Get_Too_Long_Name() -{ - int i; + static char Queue_Name[PATH_MAX + 2]; - for ( i=0; i< PATH_MAX+1; i++ ) - Queue_Name[i] = 'N'; - Queue_Name[i] = '\0'; + sprintf(Queue_Name,"mq%d", i+1 ); return Queue_Name; } - void open_test_queues() { struct mq_attr attr; -- cgit v1.2.3