summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-26 16:05:45 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-05-02 07:11:03 +0200
commitb422aa3f4a8ecb27bc76c3c5f29d34e007564315 (patch)
tree3306e82c8ea3b7d6247d94f8fc04d1953725fe8d /testsuites/psxtests
parentDrop executable permissions on .[ch] files (diff)
downloadrtems-b422aa3f4a8ecb27bc76c3c5f29d34e007564315.tar.bz2
tests: Remove configure feature checks
Update #3409.
Diffstat (limited to 'testsuites/psxtests')
-rw-r--r--testsuites/psxtests/configure.ac72
-rw-r--r--testsuites/psxtests/psx07/init.c12
-rw-r--r--testsuites/psxtests/psxenosys/init.c10
-rw-r--r--testsuites/psxtests/psxgetattrnp01/init.c21
-rw-r--r--testsuites/psxtests/psxgetrusage01/init.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c2
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c2
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c2
-rw-r--r--testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c2
-rw-r--r--testsuites/psxtests/psximfs02/init.c4
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c5
-rw-r--r--testsuites/psxtests/psxstack02/init.c6
-rw-r--r--testsuites/psxtests/psxtime/test.c4
13 files changed, 3 insertions, 143 deletions
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index d48c2ac122..cdd6ee7e4e 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -36,78 +36,6 @@ AM_CONDITIONAL([HAS_CPLUSPLUS],[test x"$HAS_CPLUSPLUS" = x"yes"])
RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
-# FIXME: IEEE Std 1003.1-2008 mandates sys/mman.h,
-# but newlib doesn't have sys/mman.h
-AC_CHECK_HEADERS([sys/mman.h])
-
-# FIXME: newlib should supply declaration of pthread_rwlock_unlock()
-AC_CHECK_DECLS([pthread_rwlock_unlock],[],[],[[#include <pthread.h>]])
-
-# FIXME: newlib should supply declaration of pthread_atfork()
-AC_CHECK_DECLS([pthread_atfork],[],[],[[#include <pthread.h>]])
-
-# Added to pthreads after initial revision. May not be in toolset
-AC_CHECK_DECLS([pthread_attr_getstack],[],[],[[#include <pthread.h>]])
-
-# Added to pthreads after initial revision. May not be in toolset
-AC_CHECK_DECLS([pthread_attr_setstack],[],[],[[#include <pthread.h>]])
-
-# Added to pthreads after initial revision. May not be in toolset
-AC_CHECK_DECLS([pthread_attr_getguardsize],[],[],[[#include <pthread.h>]])
-
-# Added to pthreads after initial revision. May not be in toolset
-AC_CHECK_DECLS([pthread_attr_setguardsize],[],[],[[#include <pthread.h>]])
-
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_DECLS([pthread_attr_setaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_DECLS([pthread_attr_getaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_DECLS([pthread_setaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_DECLS([pthread_getaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
-# Added to newlib pthreads for RTEMS SMP (np), may not be present
-AC_CHECK_DECLS([pthread_getattr_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
-# Mandated by POSIX, not declared in some versions of newlib.
-AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
-
-# Mandated by POSIX, not declared in some versions of newlib.
-AC_CHECK_DECLS([getrusage],,,[#include sys/resource.h])
-
-# FIXME: adjtime is a non-standardized BSD/Linux extension
-# RTEMS should not rely on adjtime
-AC_CHECK_DECLS([adjtime],[],[],[[#include <sys/time.h>]])
-
-# FIXME: IEEE Std 1003.1-2008 mandates mprotect in sys/mman.h,
-# RTEMS provides a stub, despite newlib doesn't have sys/mman.h
-AC_CHECK_DECLS([mprotect],[],[],[[#include <sys/mman.h>]])
-
-# FIXME: IEEE Std 1003.1-2008 mandates seteuid in unistd.h
-# RTEMS provides it, despite newlib doesn't declare it.
-AC_CHECK_DECLS([seteuid],[],[],[#include <unistd.h>])
-
-# FIXME: We should get rid of this. It's a cludge.
-AC_CHECK_SIZEOF([off_t])
-AC_CHECK_SIZEOF([blksize_t])
-AC_CHECK_SIZEOF([blkcnt_t])
-AC_CHECK_SIZEOF([time_t])
-AC_CHECK_SIZEOF([mode_t])
-
# BSP Test configuration
RTEMS_TEST_CHECK([psx01])
RTEMS_TEST_CHECK([psx02])
diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c
index be5208b32f..2c370a9869 100644
--- a/testsuites/psxtests/psx07/init.c
+++ b/testsuites/psxtests/psx07/init.c
@@ -56,9 +56,7 @@ void *POSIX_Init(
int inheritsched;
int schedpolicy;
size_t stacksize;
-#if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE
size_t guardsize;
-#endif
void *stackaddr;
int detachstate;
struct sched_param schedparam;
@@ -122,12 +120,10 @@ void *POSIX_Init(
status = pthread_attr_init( &attr );
posix_service_failed( status, "pthread_attr_init");
-#if HAVE_DECL_PTHREAD_ATTR_SETSTACKADDR
attr.stacksize = rtems_configuration_get_work_space_size() * 10;
puts( "Init - pthread_create - EAGAIN (stacksize too large)" );
status = pthread_create( &Task_id, &attr, Task_1, NULL );
fatal_directive_check_status_only( status, EAGAIN, "stacksize too large" );
-#endif
status = pthread_attr_init( &attr );
posix_service_failed( status, "pthread_attr_init");
@@ -364,7 +360,6 @@ void *POSIX_Init(
/* exercise get and set stack (as pair) */
empty_line();
-#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
puts( "Init - pthread_attr_setstack- EINVAL (NULL attr)" );
status = pthread_attr_setstack( NULL, &stackaddr, 1024 );
fatal_directive_check_status_only( status, EINVAL, "NULL attr" );
@@ -380,9 +375,7 @@ void *POSIX_Init(
puts( "Init - pthread_attr_setstack- SUCCESSFUL (big stack)" );
status = pthread_attr_setstack( &attr, stackaddr, STACK_MINIMUM_SIZE * 2 );
posix_service_failed( status, "OK");
-#endif
-#if HAVE_DECL_PTHREAD_ATTR_GETSTACK
puts( "Init - pthread_attr_getstack- EINVAL (NULL attr)" );
status = pthread_attr_getstack( NULL, &stackaddr, &stacksize );
fatal_directive_check_status_only( status, EINVAL, "NULL attr" );
@@ -402,12 +395,10 @@ void *POSIX_Init(
puts( "Init - pthread_attr_getstack- SUCCESSFUL" );
status = pthread_attr_getstack( &attr, &stackaddr, &stacksize );
posix_service_failed( status, "pthread_attr_getstack");
-#endif
/* exercise get and set detach state */
empty_line();
-#if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE
puts( "Init - pthread_attr_setguardsize - EINVAL (NULL attr)" );
status = pthread_attr_setguardsize( NULL, 0 );
fatal_directive_check_status_only( status, EINVAL, "NULL attr" );
@@ -423,9 +414,7 @@ void *POSIX_Init(
puts( "Init - pthread_attr_setguardsize - SUCCESSFUL (high guardsize)" );
status = pthread_attr_setguardsize( &attr, STACK_MINIMUM_SIZE * 2 );
posix_service_failed( status, "");
-#endif
-#if HAVE_DECL_PTHREAD_ATTR_GETGUARDSIZE
puts( "Init - pthread_attr_getguardsize - EINVAL (NULL attr)" );
status = pthread_attr_getguardsize( NULL, &guardsize );
fatal_directive_check_status_only( status, EINVAL, "NULL attr" );
@@ -441,7 +430,6 @@ void *POSIX_Init(
puts( "Init - pthread_attr_getguardsize - SUCCESSFUL" );
status = pthread_attr_getguardsize( &attr, &guardsize );
posix_service_failed( status, "pthread_attr_getguardsize");
-#endif
/* exercise get and set detach state */
empty_line();
diff --git a/testsuites/psxtests/psxenosys/init.c b/testsuites/psxtests/psxenosys/init.c
index e0927446f9..00148eb50f 100644
--- a/testsuites/psxtests/psxenosys/init.c
+++ b/testsuites/psxtests/psxenosys/init.c
@@ -13,10 +13,7 @@
#include <sys/types.h>
#include <sys/wait.h>
-#if HAVE_SYS_MMAN_H
-/* POSIX mandates mprotect in sys/mman.h, but newlib doesn't have this */
#include <sys/mman.h>
-#endif
#include <pthread.h>
#define CONFIGURE_INIT
@@ -30,13 +27,6 @@
const char rtems_test_name[] = "PSXENOSYS";
-#if !HAVE_DECL_MPROTECT
-extern int mprotect(const void *addr, size_t len, int prot);
-#endif
-#if !HAVE_DECL_PTHREAD_ATFORK
-extern int pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void));
-#endif
-
void check_enosys(int status);
void check_enosys(int status)
diff --git a/testsuites/psxtests/psxgetattrnp01/init.c b/testsuites/psxtests/psxgetattrnp01/init.c
index 3c7c886e8d..986c650b56 100644
--- a/testsuites/psxtests/psxgetattrnp01/init.c
+++ b/testsuites/psxtests/psxgetattrnp01/init.c
@@ -23,9 +23,6 @@ const char rtems_test_name[] = "PSXGETATTRNP 1";
/* forward declarations to avoid warnings */
void *POSIX_Init(void *argument);
-#if HAVE_DECL_PTHREAD_GETATTR_NP
-
-
void *Thread_1(void *argument);
pthread_t Init_id;
@@ -65,10 +62,8 @@ static int attribute_compare(
if ( attr1->schedparam.sched_priority != attr2->schedparam.sched_priority )
return 1;
- #if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE
- if ( attr1->guardsize != attr2->guardsize )
- return 1;
- #endif
+ if ( attr1->guardsize != attr2->guardsize )
+ return 1;
#if defined(_POSIX_THREAD_CPUTIME)
if ( attr1->cputime_clock_allowed != attr2->cputime_clock_allowed )
@@ -270,19 +265,7 @@ void *POSIX_Init(
rtems_test_exit(0);
return NULL; /* just so the compiler thinks we returned something */
}
-#else
-void *POSIX_Init(
- void *ignored
-)
-{
- TEST_BEGIN();
- puts( " pthread_getattr_np NOT supported" );
- TEST_END();
- rtems_test_exit(0);
- return NULL; /* just so the compiler thinks we returned something */
-}
-#endif
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/psxtests/psxgetrusage01/init.c b/testsuites/psxtests/psxgetrusage01/init.c
index 8cf4946879..ee69c998f1 100644
--- a/testsuites/psxtests/psxgetrusage01/init.c
+++ b/testsuites/psxtests/psxgetrusage01/init.c
@@ -15,10 +15,6 @@
#include <sys/resource.h>
#include <errno.h>
-#if !HAVE_DECL_GETRUSAGE
-extern int getrusage(int who, struct rusage *usage);
-#endif
-
#include <tmacros.h>
#include "test_support.h"
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
index 3780747365..1380b3b9db 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getguardsize.c
@@ -14,7 +14,6 @@
#include "config.h"
#endif
-#if HAVE_DECL_PTHREAD_ATTR_GETGUARDSIZE
#include <pthread.h>
#ifndef _POSIX_THREADS
@@ -33,4 +32,3 @@ int test( void )
return result;
}
-#endif
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
index bbef6a8ce1..b0bfcdf237 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_getstack.c
@@ -14,7 +14,6 @@
#include "config.h"
#endif
-#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
#include <pthread.h>
#include <limits.h> /* only for PTHREAD_STACK_MIN */
@@ -39,4 +38,3 @@ int test( void )
return result;
}
-#endif
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
index ea9338a715..c4233f25c8 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setguardsize.c
@@ -14,7 +14,6 @@
#include "config.h"
#endif
-#if HAVE_DECL_PTHREAD_ATTR_SETGUARDSIZE
#include <pthread.h>
#include <limits.h> /* only for PTHREAD_STACK_MIN */
@@ -36,4 +35,3 @@ int test( void )
return result;
}
-#endif
diff --git a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
index a4de9c8f78..33d21237cd 100644
--- a/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
+++ b/testsuites/psxtests/psxhdrs/pthread/pthread_attr_setstack.c
@@ -14,7 +14,6 @@
#include "config.h"
#endif
-#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
#include <pthread.h>
#include <limits.h> /* only for PTHREAD_STACK_MIN */
@@ -42,4 +41,3 @@ int test( void )
return result;
}
-#endif
diff --git a/testsuites/psxtests/psximfs02/init.c b/testsuites/psxtests/psximfs02/init.c
index a527c7df4c..e5f51ce794 100644
--- a/testsuites/psxtests/psximfs02/init.c
+++ b/testsuites/psxtests/psximfs02/init.c
@@ -25,10 +25,6 @@
const char rtems_test_name[] = "PSXIMFS 2";
-#if !HAVE_DECL_SETEUID
-extern int seteuid(uid_t euid);
-#endif
-
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c
index 6c85c03893..341c5d8f28 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -32,11 +32,6 @@ void *ReadLockThread(void *arg);
void *WriteLockThread(void *arg);
int test_main(void);
-#if !HAVE_DECL_PTHREAD_RWLOCK_UNLOCK
-/* FIXME: Newlib should provide the decl. */
-extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);
-#endif
-
#define NUMBER_THREADS 2
pthread_t ThreadIds[NUMBER_THREADS];
pthread_rwlock_t RWLock;
diff --git a/testsuites/psxtests/psxstack02/init.c b/testsuites/psxtests/psxstack02/init.c
index 4fc1476812..2f7ba56e68 100644
--- a/testsuites/psxtests/psxstack02/init.c
+++ b/testsuites/psxtests/psxstack02/init.c
@@ -54,7 +54,6 @@ void *Test_Thread(void *arg)
void *POSIX_Init(void *argument)
{
-#if HAVE_DECL_PTHREAD_ATTR_SETSTACK
int sc;
pthread_t id;
pthread_attr_t attr;
@@ -83,10 +82,7 @@ void *POSIX_Init(void *argument)
delay_request.tv_nsec = 5 * 100000000;
sc = nanosleep( &delay_request, NULL );
rtems_test_assert( !sc );
-#else
- puts( "pthread_set_stack not supported - SKIPPING TEST CASE" );
-#endif
-
+
TEST_END();
rtems_test_exit(0);
diff --git a/testsuites/psxtests/psxtime/test.c b/testsuites/psxtests/psxtime/test.c
index 8331bef6b0..d9f5537152 100644
--- a/testsuites/psxtests/psxtime/test.c
+++ b/testsuites/psxtests/psxtime/test.c
@@ -33,10 +33,6 @@
const char rtems_test_name[] = "PSXTIME";
-#if !HAVE_DECL_ADJTIME
-extern int adjtime(const struct timeval *delta, struct timeval *olddelta);
-#endif
-
void test_adjtime(void);
void check_a_tod(
rtems_time_of_day *the_tod