From ff7ff62a0f1598e5db1ccd76b9efac49e0959689 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 5 May 2011 16:45:52 +0000 Subject: 2011-05-05 Joel Sherrill * psx04/task3.c, psxfile01/test.c, psxhdrs/Makefile.am, psxmsgq01/init.c, psxreaddir/test.c, psxsignal01/init.c, psxtimes01/init.c, psxualarm/init.c: Remove warnings. --- testsuites/psxtests/ChangeLog | 6 ++++++ testsuites/psxtests/psx04/task3.c | 3 ++- testsuites/psxtests/psxfile01/test.c | 4 +++- testsuites/psxtests/psxhdrs/Makefile.am | 1 + testsuites/psxtests/psxmsgq01/init.c | 1 + testsuites/psxtests/psxreaddir/test.c | 9 ++++++--- testsuites/psxtests/psxsignal01/init.c | 2 ++ testsuites/psxtests/psxtimes01/init.c | 3 ++- testsuites/psxtests/psxualarm/init.c | 7 ++++++- 9 files changed, 29 insertions(+), 7 deletions(-) (limited to 'testsuites') diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 3416607437..0d0e257dff 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,9 @@ +2011-05-05 Joel Sherrill + + * psx04/task3.c, psxfile01/test.c, psxhdrs/Makefile.am, + psxmsgq01/init.c, psxreaddir/test.c, psxsignal01/init.c, + psxtimes01/init.c, psxualarm/init.c: Remove warnings. + 2011-04-15 Sebastian Huber * psxstat/test.c: Fixed integer type. Check status codes. diff --git a/testsuites/psxtests/psx04/task3.c b/testsuites/psxtests/psx04/task3.c index af7b0091c4..1eb6b163a1 100644 --- a/testsuites/psxtests/psx04/task3.c +++ b/testsuites/psxtests/psx04/task3.c @@ -7,7 +7,7 @@ * * Output parameters: NONE * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -112,6 +112,7 @@ void *Task_3( printf( "Task_3: sleep so the Init task can reguest a signal\n" ); remaining = sleep( 1 ); rtems_test_assert( !status ); + rtems_test_assert( remaining == 0 ); /* end of task 3 */ printf( "Task_3: exit\n" ); diff --git a/testsuites/psxtests/psxfile01/test.c b/testsuites/psxtests/psxfile01/test.c index d24ba6eb5c..10200fd978 100644 --- a/testsuites/psxtests/psxfile01/test.c +++ b/testsuites/psxtests/psxfile01/test.c @@ -10,7 +10,7 @@ * /dev * /dev/XXX [where XXX includes at least console] * - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -162,6 +162,7 @@ int main( build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); rtems_status = rtems_clock_set( &time ); + directive_failed( rtems_status, "clock set" ); /* * Dump an empty file system @@ -656,6 +657,7 @@ since new path is not valid"); rtems_test_assert( status == -1); rtems_status = rtems_io_register_name( "/dev/console", 0, 0 ); + directive_failed( rtems_status, "io register" ); test_case_reopen_append(); diff --git a/testsuites/psxtests/psxhdrs/Makefile.am b/testsuites/psxtests/psxhdrs/Makefile.am index b385a0958d..66c484ff83 100644 --- a/testsuites/psxtests/psxhdrs/Makefile.am +++ b/testsuites/psxtests/psxhdrs/Makefile.am @@ -30,4 +30,5 @@ include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg include $(top_srcdir)/../automake/compile.am include $(top_srcdir)/../automake/leaf.am +AM_CPPFLAGS += -Wno-unused-but-set-variable include $(top_srcdir)/../automake/local.am diff --git a/testsuites/psxtests/psxmsgq01/init.c b/testsuites/psxtests/psxmsgq01/init.c index 3643bdc8ec..89572408c2 100644 --- a/testsuites/psxtests/psxmsgq01/init.c +++ b/testsuites/psxtests/psxmsgq01/init.c @@ -1205,6 +1205,7 @@ void verify_timedout_mq_timedsend( timeout.tv_nsec = tv1.tv_usec * 1000; status = mq_timedsend( Test_q[que].mq, msg, len , 0, &timeout ); + rtems_test_assert( status == 0 ); gettimeofday( &tv2, &tz2 ); tv3.tv_sec = tv2.tv_sec - tv1.tv_sec; diff --git a/testsuites/psxtests/psxreaddir/test.c b/testsuites/psxtests/psxreaddir/test.c index 25377fd08e..b0900cb3b7 100644 --- a/testsuites/psxtests/psxreaddir/test.c +++ b/testsuites/psxtests/psxreaddir/test.c @@ -15,7 +15,7 @@ * implementation of this appears to seek to the ((off/DIRENT_SIZE) + 1) * record where DIRENT_SIZE seems to be 12 bytes. * - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -79,8 +79,10 @@ void complete_printdir( char *path ) the_dir = opendir( path ); rtems_test_assert( the_dir ); + printdir( the_dir ); status = closedir( the_dir ); + rtems_test_assert( status ); } char *many_files[] = { @@ -145,13 +147,13 @@ char *dnames[] = { "END" }; -int select1 ( struct dirent *entry ) +int select1 ( const struct dirent *entry ) { printf("SCANDIR SELECT1 accepts nodename: %s\n", entry->d_name ); return 1; } -int select2 ( struct dirent *entry ) +int select2 ( const struct dirent *entry ) { if( strcmp( entry->d_name, "y") == 0 ) { printf("SCANDIR SELECT accepted nodename: %s\n", entry->d_name ); @@ -273,6 +275,7 @@ int main( directory_not = opendir( "/many" ); printdir ( directory_not ); d_not = readdir( directory_not ); + rtems_test_assert( d_not == 0 ); printf("open /b/myfile\n"); fd = open ("/b/my_file", O_CREAT, S_IRWXU); diff --git a/testsuites/psxtests/psxsignal01/init.c b/testsuites/psxtests/psxsignal01/init.c index 749274c316..b00832e0f4 100644 --- a/testsuites/psxtests/psxsignal01/init.c +++ b/testsuites/psxtests/psxsignal01/init.c @@ -77,7 +77,9 @@ rtems_timer_service_routine Signal_duringISR_TSR( ) { int status; + status = pthread_kill( pthread_self(), SIGUSR1 ); + rtems_test_assert( status == 0 ); } diff --git a/testsuites/psxtests/psxtimes01/init.c b/testsuites/psxtests/psxtimes01/init.c index ae52d0fb9a..a37756b1b0 100644 --- a/testsuites/psxtests/psxtimes01/init.c +++ b/testsuites/psxtests/psxtimes01/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2010. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -57,6 +57,7 @@ rtems_task Init( puts( "_times( &start_tm ) -- OK" ); now = _times( &start_tm ); rtems_test_assert( start != 0 ); + rtems_test_assert( now != 0 ); rtems_test_spin_for_ticks(5); diff --git a/testsuites/psxtests/psxualarm/init.c b/testsuites/psxtests/psxualarm/init.c index 840432a5f1..d172f4ab59 100644 --- a/testsuites/psxtests/psxualarm/init.c +++ b/testsuites/psxtests/psxualarm/init.c @@ -1,5 +1,5 @@ /* - * COPYRIGHT (c) 1989-2009. + * COPYRIGHT (c) 1989-2011. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -45,7 +45,9 @@ rtems_timer_service_routine Signal_duringISR_TSR( ) { int status; + status = kill( getpid(), SIGUSR1 ); + rtems_test_assert( status == 0 ); } @@ -79,7 +81,10 @@ void *POSIX_Init( puts( "Init: ualarm in 1 us" ); sleep(3); result = ualarm(1,0); + rtems_test_assert( result == 0 ); + status = sleep(10); + rtems_test_assert( status == 0 ); /* unblock Signal and see if it happened */ status = sigemptyset( &mask ); -- cgit v1.2.3