diff options
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; |