[PATCH 1/3] tests: Remove configure feature checks
Sebastian Huber
sebastian.huber at embedded-brains.de
Mon Apr 30 06:15:50 UTC 2018
Update #3409.
---
testsuites/fstests/configure.ac | 50 ---------------
testsuites/libtests/configure.ac | 2 -
testsuites/psxtests/configure.ac | 72 ----------------------
testsuites/psxtests/psx07/init.c | 12 ----
testsuites/psxtests/psxenosys/init.c | 10 ---
testsuites/psxtests/psxgetattrnp01/init.c | 21 +------
testsuites/psxtests/psxgetrusage01/init.c | 4 --
.../psxhdrs/pthread/pthread_attr_getguardsize.c | 2 -
.../psxhdrs/pthread/pthread_attr_getstack.c | 2 -
.../psxhdrs/pthread/pthread_attr_setguardsize.c | 2 -
.../psxhdrs/pthread/pthread_attr_setstack.c | 2 -
testsuites/psxtests/psximfs02/init.c | 4 --
testsuites/psxtests/psxrwlock01/test.c | 5 --
testsuites/psxtests/psxstack02/init.c | 6 +-
testsuites/psxtests/psxtime/test.c | 4 --
testsuites/psxtmtests/configure.ac | 48 ---------------
testsuites/samples/configure.ac | 27 +-------
testsuites/smptests/configure.ac | 23 +------
testsuites/smptests/smppsxaffinity01/init.c | 14 -----
testsuites/smptests/smppsxaffinity02/init.c | 14 -----
testsuites/sptests/configure.ac | 3 -
testsuites/support/include/primode.h | 9 +--
testsuites/support/include/pritime.h | 9 +--
23 files changed, 11 insertions(+), 334 deletions(-)
diff --git a/testsuites/fstests/configure.ac b/testsuites/fstests/configure.ac
index 469f103d96..e58add55d8 100644
--- a/testsuites/fstests/configure.ac
+++ b/testsuites/fstests/configure.ac
@@ -27,56 +27,6 @@ AC_CONFIG_HEADER([config.h])
RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
-# 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>]])
-
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#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>]])
-
-# 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])
-
# BSP Test configuration
RTEMS_TEST_CHECK([fsbdpart01])
RTEMS_TEST_CHECK([fsclose01])
diff --git a/testsuites/libtests/configure.ac b/testsuites/libtests/configure.ac
index 481a33569d..c529b27660 100644
--- a/testsuites/libtests/configure.ac
+++ b/testsuites/libtests/configure.ac
@@ -40,8 +40,6 @@ AS_IF([test "x$PAX" = "xno"],[
AC_MSG_ERROR([pax is missing.])
])
-AC_CHECK_HEADERS([complex.h])
-
AM_CONDITIONAL(TARTESTS,test "$as_ln_s" = "ln -s" && test -n "$PAX" && test -n "$GZIP")
AM_CONDITIONAL(TARTEST_XZ,test -n "$XZ")
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
diff --git a/testsuites/psxtmtests/configure.ac b/testsuites/psxtmtests/configure.ac
index 2eb01c7917..59192d060e 100644
--- a/testsuites/psxtmtests/configure.ac
+++ b/testsuites/psxtmtests/configure.ac
@@ -26,54 +26,6 @@ AC_CONFIG_HEADER([config.h])
RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
AM_CONDITIONAL(HAS_POSIX,test x"${rtems_cv_RTEMS_POSIX_API}" = x"yes")
-# 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>]])
-
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_getcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_getcputime],[],[],[[#include <pthread.h>]])
-
-# FIXME: RTEMS presumes pthread_attr_setcputime to be IEEE Std 1003.1
-# Likely an anachronism in RTEMS.
-AC_CHECK_DECLS([pthread_attr_setcputime],[],[],[[#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>]])
-
-# 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])
-
OPERATION_COUNT=${OPERATION_COUNT-100}
AC_SUBST(OPERATION_COUNT)
diff --git a/testsuites/samples/configure.ac b/testsuites/samples/configure.ac
index c3f62673a4..9721ea4f26 100644
--- a/testsuites/samples/configure.ac
+++ b/testsuites/samples/configure.ac
@@ -30,37 +30,12 @@ RTEMS_CHECK_CXX(RTEMS_BSP)
RTEMS_CHECK_CPUOPTS([RTEMS_NETWORKING])
RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
-CXXTESTS=$HAS_CPLUSPLUS
-AS_IF([test $HAS_CPLUSPLUS = yes],[
- AC_LANG_PUSH([C++])
- AC_CHECK_HEADERS([cstdio cstdlib iostream],[],[CXXTESTS=no])
- AC_CACHE_CHECK(
- [if iostream supports std:: namespace],
- [rtems_cv_HAVE_IOSTREAM_STD_NAMESPACE],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <iostream>]],
- [[std::cout << "hello" << std::endl;]])
- ],
- [rtems_cv_HAVE_IOSTREAM_STD_NAMESPACE=yes],
- [rtems_cv_HAVE_IOSTREAM_STD_NAMESPACE=no])
- ])
- AS_IF([test $rtems_cv_HAVE_IOSTREAM_STD_NAMESPACE = no],[CXXTESTS=no])
- AS_IF([test $CXXTESTS = no],[
- AC_MSG_WARN([disabling C++ tests])
- ])
- AC_LANG_POP
-])
-
-AM_CONDITIONAL([CXXTESTS],[test $CXXTESTS = "yes"])
+AM_CONDITIONAL([CXXTESTS],[test "$HAS_CPLUSPLUS" = "yes"])
AM_CONDITIONAL(NETTESTS,test "$rtems_cv_RTEMS_NETWORKING" = "yes")
AM_CONDITIONAL(HAS_MP,test "$rtems_cv_RTEMS_MULTIPROCESSING" = "yes")
AM_CONDITIONAL(NO_SMP,test "$rtems_cv_RTEMS_SMP" != "yes")
AM_CONDITIONAL(HAS_SMP,test "$rtems_cv_RTEMS_SMP" = "yes")
-# FIXME: We should get rid of this. It's a cludge.
-AC_CHECK_SIZEOF([time_t])
-
# BSP Test configuration
RTEMS_TEST_CHECK([base_mp])
RTEMS_TEST_CHECK([base_sp])
diff --git a/testsuites/smptests/configure.ac b/testsuites/smptests/configure.ac
index 937c5d4068..4668877e38 100644
--- a/testsuites/smptests/configure.ac
+++ b/testsuites/smptests/configure.ac
@@ -24,35 +24,14 @@ RTEMS_PROG_CC_FOR_TARGET
RTEMS_PROG_CXX_FOR_TARGET
RTEMS_CANONICALIZE_TOOLS
-RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
-
RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
-RTEMS_CHECK_CPUOPTS([RTEMS_MULTIPROCESSING])
-RTEMS_CHECK_CXX(RTEMS_BSP)
-RTEMS_CHECK_CPUOPTS([RTEMS_NETWORKING])
+RTEMS_CHECK_CPUOPTS([RTEMS_POSIX_API])
RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
AM_CONDITIONAL(NO_SMP,test "$rtems_cv_RTEMS_SMP" != "yes")
AM_CONDITIONAL(HAS_SMP,test "$rtems_cv_RTEMS_SMP" = "yes")
AM_CONDITIONAL([HAS_POSIX],[test x"${rtems_cv_RTEMS_POSIX_API}" = xyes])
-# These are SMP related and were added to newlib by RTEMS.
-AC_CHECK_DECLS([pthread_attr_setaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-AC_CHECK_DECLS([pthread_attr_getaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-AC_CHECK_DECLS([pthread_setaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-AC_CHECK_DECLS([pthread_getaffinity_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-AC_CHECK_DECLS([pthread_getattr_np],[],[],[[
- #define _GNU_SOURCE
- #include <pthread.h>]])
-
# BSP Test configuration
RTEMS_TEST_CHECK([smp01])
RTEMS_TEST_CHECK([smp02])
diff --git a/testsuites/smptests/smppsxaffinity01/init.c b/testsuites/smptests/smppsxaffinity01/init.c
index 0ae6ee9f8f..56a0078b77 100644
--- a/testsuites/smptests/smppsxaffinity01/init.c
+++ b/testsuites/smptests/smppsxaffinity01/init.c
@@ -20,8 +20,6 @@
const char rtems_test_name[] = "SMPPSXAFFINITY 1";
-#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
-
#define CPU_COUNT 4
pthread_t Init_id;
@@ -151,18 +149,6 @@ void *POSIX_Init(
rtems_test_exit(0);
}
-#else
-void *POSIX_Init(
- void *ignored
-)
-{
- TEST_BEGIN();
- puts( " POSIX Affinity Methods NOT Supported");
- TEST_END();
- rtems_test_exit(0);
-}
-
-#endif
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/smptests/smppsxaffinity02/init.c b/testsuites/smptests/smppsxaffinity02/init.c
index 12f91124b3..d196621950 100644
--- a/testsuites/smptests/smppsxaffinity02/init.c
+++ b/testsuites/smptests/smppsxaffinity02/init.c
@@ -22,8 +22,6 @@
const char rtems_test_name[] = "SMPPSXAFFINITY 2";
-#if HAVE_DECL_PTHREAD_GETAFFINITY_NP
-
pthread_t Init_id;
pthread_t Med_id[NUM_CPUS-1];
pthread_t Low_id[NUM_CPUS];
@@ -217,18 +215,6 @@ void *POSIX_Init(
rtems_test_exit(0);
}
-#else
-void *POSIX_Init(
- void *ignored
-)
-{
- TEST_BEGIN();
- puts( " Affinity NOT Supported");
- TEST_END();
- rtems_test_exit(0);
-}
-
-#endif
/* configuration information */
#define CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE_DRIVER
diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac
index 5faf6b694f..fee86abb6c 100644
--- a/testsuites/sptests/configure.ac
+++ b/testsuites/sptests/configure.ac
@@ -29,9 +29,6 @@ RTEMS_CHECK_CXX(RTEMS_BSP)
AM_CONDITIONAL([HAS_CPLUSPLUS],[test $HAS_CPLUSPLUS = "yes"])
-# FIXME: We should get rid of this. It's a cludge.
-AC_CHECK_SIZEOF([time_t])
-
# Some tests should not be built/run in SMP configurations
RTEMS_CHECK_CPUOPTS([RTEMS_SMP])
AM_CONDITIONAL(NO_SMP,test "$rtems_cv_RTEMS_SMP" != "yes")
diff --git a/testsuites/support/include/primode.h b/testsuites/support/include/primode.h
index f1efe7ea02..551ae22ea6 100644
--- a/testsuites/support/include/primode.h
+++ b/testsuites/support/include/primode.h
@@ -14,14 +14,11 @@
#define _PRIMODE_H
#include <inttypes.h>
+#include <rtems/score/cpuopts.h>
-#ifndef SIZEOF_MODE_T
-#error "missing SIZEOF_MODE_T"
-#endif
-
-#if SIZEOF_MODE_T == 8
+#if __RTEMS_SIZEOF_MODE_T__ == 8
#define PRIomode_t PRIo64
-#elif SIZEOF_MODE_T == 4
+#elif __RTEMS_SIZEOF_MODE_T__ == 4
#define PRIomode_t PRIo32
#else
#error "unsupported size of mode_t"
diff --git a/testsuites/support/include/pritime.h b/testsuites/support/include/pritime.h
index 97117b94fa..fea5e62cf4 100644
--- a/testsuites/support/include/pritime.h
+++ b/testsuites/support/include/pritime.h
@@ -14,14 +14,11 @@
#define _PRITIME_H
#include <inttypes.h>
+#include <rtems/score/cpuopts.h>
-#ifndef SIZEOF_TIME_T
-#error "missing SIZEOF_TIME_T"
-#endif
-
-#if SIZEOF_TIME_T == 8
+#if __RTEMS_SIZEOF_TIME_T__ == 8
#define PRIdtime_t PRId64
-#elif SIZEOF_TIME_T == 4
+#elif __RTEMS_SIZEOF_TIME_T__ == 4
#define PRIdtime_t PRId32
#else
#error "unsupported size of time_t"
--
2.12.3
More information about the devel
mailing list