diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2008-02-04 19:39:43 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 2008-02-04 19:39:43 +0000 |
commit | f8d39b8dcd3cec1893ff9edd216eddff08f9b752 (patch) | |
tree | 32a540afb484b4bb471a60ea2a52be3ad76282f6 /testsuites/psxtests/psxmsgq01 | |
parent | 6d4940d5086306ebfdc26f27558b1e5859c324b2 (diff) |
2008-02-04 Jennifer Averett <jennifer.averett@OARcorp.com>
* 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.
Diffstat (limited to 'testsuites/psxtests/psxmsgq01')
-rw-r--r-- | testsuites/psxtests/psxmsgq01/Makefile.am | 4 | ||||
-rw-r--r-- | testsuites/psxtests/psxmsgq01/init.c | 15 |
2 files changed, 6 insertions, 13 deletions
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 <time.h> #include <tmacros.h> #include <signal.h> /* 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; |