apps/testing: Move apps/examples/ostest to apps/testing/ostest.

This commit is contained in:
Gregory Nutt 2018-12-12 16:37:38 -06:00
parent 3bf4b6d245
commit 1ea316b46c
41 changed files with 155 additions and 155 deletions

View File

@ -8,9 +8,9 @@ examples
configs/<board-name>/defconfig file via the CONFIG_EXAMPLES_xyz
setting where xyz is the name of the example. For example,
CONFIG_EXAMPLES_OSTEST=y
CONFIG_EXAMPLES_HELLO=y
Selects the examples/ostest example.
Selects the examples/hello "Hello, World!" example.
Built-In functions
@ -1276,40 +1276,6 @@ examples/oneshot
Simple test of a oneshot driver.
examples/ostest
^^^^^^^^^^^^^^^
This is the NuttX 'qualification' suite. It attempts to exercise
a broad set of OS functionality. Its coverage is not very extensive
as of this writing, but it is used to qualify each NuttX release.
The behavior of the ostest can be modified with the following
settings in the configs/<board-name>/defconfig file:
* CONFIG_NSH_BUILTIN_APPS
Build the OS test example as an NSH built-in application.
* CONFIG_EXAMPLES_OSTEST_LOOPS
Used to control the number of executions of the test. If
undefined, the test executes one time. If defined to be
zero, the test runs forever.
* CONFIG_EXAMPLES_OSTEST_STACKSIZE
Used to create the ostest task. Default is 8192.
* CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS
Specifies the number of threads to create in the barrier
test. The default is 8 but a smaller number may be needed on
systems without sufficient memory to start so many threads.
* CONFIG_EXAMPLES_OSTEST_RR_RANGE
During round-robin scheduling test two threads are created. Each of the threads
searches for prime numbers in the configurable range, doing that configurable
number of times.
This value specifies the end of search range and together with number of runs
allows to configure the length of this test - it should last at least a few
tens of seconds. Allowed values [1; 32767], default 10000
* CONFIG_EXAMPLES_OSTEST_RR_RUNS
During round-robin scheduling test two threads are created. Each of the threads
searches for prime numbers in the configurable range, doing that configurable
number of times.
examples/pashello
^^^^^^^^^^^^^^^^^

View File

@ -8,7 +8,7 @@ config EXAMPLES_SMP
default n
---help---
Enable the SMP example. This example basically extracts the pthread
barrier test from apps/examples/ostest and adds some instrumentation
barrier test from apps/testing/ostest and adds some instrumentation
useful for debugging SMP implementations.
if EXAMPLES_SMP

View File

@ -3,6 +3,40 @@ apps/testing README file
The apps/testing directory is used to include external testing frameworks
examples/ostest
^^^^^^^^^^^^^^^
This is the NuttX 'qualification' suite. It attempts to exercise
a broad set of OS functionality. Its coverage is not very extensive
as of this writing, but it is used to qualify each NuttX release.
The behavior of the ostest can be modified with the following
settings in the configs/<board-name>/defconfig file:
* CONFIG_NSH_BUILTIN_APPS
Build the OS test example as an NSH built-in application.
* CONFIG_TESTING_OSTEST_LOOPS
Used to control the number of executions of the test. If
undefined, the test executes one time. If defined to be
zero, the test runs forever.
* CONFIG_TESTING_OSTEST_STACKSIZE
Used to create the ostest task. Default is 8192.
* CONFIG_TESTING_OSTEST_NBARRIER_THREADS
Specifies the number of threads to create in the barrier
test. The default is 8 but a smaller number may be needed on
systems without sufficient memory to start so many threads.
* CONFIG_TESTING_OSTEST_RR_RANGE
During round-robin scheduling test two threads are created. Each of the threads
searches for prime numbers in the configurable range, doing that configurable
number of times.
This value specifies the end of search range and together with number of runs
allows to configure the length of this test - it should last at least a few
tens of seconds. Allowed values [1; 32767], default 10000
* CONFIG_TESTING_OSTEST_RR_RUNS
During round-robin scheduling test two threads are created. Each of the threads
searches for prime numbers in the configurable range, doing that configurable
number of times.
testing/unity
^^^^^^^^^^^^^^

View File

@ -3,29 +3,29 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#
config EXAMPLES_OSTEST
config TESTING_OSTEST
tristate "OS test example"
default n
depends on !DISABLE_SIGNALS
---help---
Enable the OS test example
if EXAMPLES_OSTEST
if TESTING_OSTEST
config EXAMPLES_OSTEST_LOOPS
config TESTING_OSTEST_LOOPS
int "OS test loop"
default 1
---help---
Used to control the number of executions of the test. If undefined, the test
executes one time. If defined to be zero, the test runs forever.
config EXAMPLES_OSTEST_STACKSIZE
config TESTING_OSTEST_STACKSIZE
int "OS test stack size"
default 8192
---help---
Size of the stack used to create the ostest task. Default is 8192.
config EXAMPLES_OSTEST_NBARRIER_THREADS
config TESTING_OSTEST_NBARRIER_THREADS
int "Number of barrier threads"
default 8
---help---
@ -33,7 +33,7 @@ config EXAMPLES_OSTEST_NBARRIER_THREADS
is 8 but a smaller number may be needed on systems without sufficient memory
to start so many threads.
config EXAMPLES_OSTEST_AIO
config TESTING_OSTEST_AIO
bool "Asynchronous I/O Tests"
default n
depends on FS_AIO && FS_WRITABLE
@ -41,9 +41,9 @@ config EXAMPLES_OSTEST_AIO
Enables test of asynchronous I/O. You must have a mounted, writable
directory in place to use this test.
if EXAMPLES_OSTEST_AIO
if TESTING_OSTEST_AIO
config EXAMPLES_OSTEST_AIOPATH
config TESTING_OSTEST_AIOPATH
string "Scratch file path"
default "/tmp"
---help---
@ -52,7 +52,7 @@ config EXAMPLES_OSTEST_AIOPATH
endif
config EXAMPLES_OSTEST_RR_RANGE
config TESTING_OSTEST_RR_RANGE
int "Round-robin test - end of search range"
default 10000
range 1 32767
@ -65,7 +65,7 @@ config EXAMPLES_OSTEST_RR_RANGE
allows to configure the length of this test - it should last at least a few
tens of seconds. Allowed values [1; 32767], default 10000
config EXAMPLES_OSTEST_RR_RUNS
config TESTING_OSTEST_RR_RUNS
int "Round-robin test - number of runs"
default 10
range 1 32767
@ -81,42 +81,42 @@ config EXAMPLES_OSTEST_RR_RUNS
if ARCH_FPU && SCHED_WAITPID
config EXAMPLES_OSTEST_FPUTESTDISABLE
config TESTING_OSTEST_FPUTESTDISABLE
bool "Disable FPU test"
default n
if !EXAMPLES_OSTEST_FPUTESTDISABLE
if !TESTING_OSTEST_FPUTESTDISABLE
config EXAMPLES_OSTEST_FPUSIZE
config TESTING_OSTEST_FPUSIZE
int "Size of floating point register save area"
config EXAMPLES_OSTEST_FPULOOPS
config TESTING_OSTEST_FPULOOPS
int "Number of FPU test loops"
default 16
config EXAMPLES_OSTEST_FPUMSDELAY
config TESTING_OSTEST_FPUMSDELAY
int "FPU test delay (MSec)"
default 750
config EXAMPLES_OSTEST_FPUPRIORITY
config TESTING_OSTEST_FPUPRIORITY
int "FPU test thread priority"
default 100
config EXAMPLES_OSTEST_FPUSTACKSIZE
config TESTING_OSTEST_FPUSTACKSIZE
int "FPU test thread stack size"
default 2048
endif # !EXAMPLES_OSTEST_FPUTESTDISABLE
endif # !TESTING_OSTEST_FPUTESTDISABLE
endif # ARCH_FPU && SCHED_WAITPID && !DISABLE_SIGNALS
config EXAMPLES_OSTEST_WAITRESULT
config TESTING_OSTEST_WAITRESULT
bool "Wait and return test result"
default y
depends on SCHED_WAITPID
config EXAMPLES_OSTEST_POWEROFF
config TESTING_OSTEST_POWEROFF
bool "Terminate on test completion"
default n
depends on BOARDCTL_POWEROFF && EXAMPLES_OSTEST_WAITRESULT
depends on BOARDCTL_POWEROFF && TESTING_OSTEST_WAITRESULT
endif # EXAMPLES_OSTEST
endif # TESTING_OSTEST

View File

@ -1,5 +1,5 @@
############################################################################
# apps/examples/ostest/Make.defs
# apps/testing/ostest/Make.defs
# Adds selected applications to apps/ build
#
# Copyright (C) 2015 Gregory Nutt. All rights reserved.
@ -34,6 +34,6 @@
#
############################################################################
ifneq ($(CONFIG_EXAMPLES_OSTEST),)
CONFIGURED_APPS += examples/ostest
ifneq ($(CONFIG_TESTING_OSTEST),)
CONFIGURED_APPS += testing/ostest
endif

View File

@ -1,5 +1,5 @@
############################################################################
# apps/examples/ostest/Makefile
# apps/testing/ostest/Makefile
#
# Copyright (C) 2007-2012, 2014, 2017 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
@ -57,7 +57,7 @@ endif
endif
ifeq ($(CONFIG_ARCH_FPU),y)
ifneq ($(CONFIG_EXAMPLES_OSTEST_FPUTESTDISABLE),y)
ifneq ($(CONFIG_TESTING_OSTEST_FPUTESTDISABLE),y)
CSRCS += fpu.c
endif
endif
@ -70,7 +70,7 @@ ifeq ($(CONFIG_TLS),y)
CSRCS += tls.c
endif
ifeq ($(CONFIG_EXAMPLES_OSTEST_AIO),y)
ifeq ($(CONFIG_TESTING_OSTEST_AIO),y)
CSRCS += aio.c
endif
@ -136,6 +136,6 @@ endif # CONFIG_DISABLE_PTHREAD
CONFIG_XYZ_PROGNAME ?= ostest$(EXEEXT)
PROGNAME = $(CONFIG_XYZ_PROGNAME)
MODULE = CONFIG_EXAMPLES_OSTEST
MODULE = CONFIG_TESTING_OSTEST
include $(APPDIR)/Application.mk

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/aio.c
* testing/ostest/aio.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -63,7 +63,7 @@
#define AIO_NCTRLBLKS 5
#define AIO_NXFRS 3
#define AIO_FILEPATH CONFIG_EXAMPLES_OSTEST_AIOPATH "/aio_test.dat"
#define AIO_FILEPATH CONFIG_TESTING_OSTEST_AIOPATH "/aio_test.dat"
/****************************************************************************
* Private Data

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/barrier.c
* testing/ostest/barrier.c
*
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -112,7 +112,7 @@ static void *barrier_func(void *parameter)
void barrier_test(void)
{
pthread_t barrier_thread[CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS];
pthread_t barrier_thread[CONFIG_TESTING_OSTEST_NBARRIER_THREADS];
pthread_addr_t result;
pthread_attr_t attr;
pthread_barrierattr_t barrierattr;
@ -129,7 +129,7 @@ void barrier_test(void)
}
status = pthread_barrier_init(&barrier, &barrierattr,
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS);
CONFIG_TESTING_OSTEST_NBARRIER_THREADS);
if (status != OK)
{
printf("barrier_test: pthread_barrierattr_init failed, status=%d\n",
@ -140,7 +140,7 @@ void barrier_test(void)
(void)pthread_barrierattr_init(&barrierattr);
/* Start CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS thread instances */
/* Start CONFIG_TESTING_OSTEST_NBARRIER_THREADS thread instances */
status = pthread_attr_init(&attr);
if (status != OK)
@ -149,7 +149,7 @@ void barrier_test(void)
status);
}
for (i = 0; i < CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS; i++)
for (i = 0; i < CONFIG_TESTING_OSTEST_NBARRIER_THREADS; i++)
{
status = pthread_create(&barrier_thread[i], &attr, barrier_func,
(pthread_addr_t)((uintptr_t)i));
@ -169,7 +169,7 @@ void barrier_test(void)
/* Wait for all thread instances to complete */
for (i = 0; i < CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS; i++)
for (i = 0; i < CONFIG_TESTING_OSTEST_NBARRIER_THREADS; i++)
{
status = pthread_join(barrier_thread[i], &result);
if (status != 0)

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/cancel.c
* testing/ostest/cancel.c
*
* Copyright (C) 2007-2009, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/dev_null.c
* testing/ostest/dev_null.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/fpu.c
* apps/testing/ostest/fpu.c
*
* Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -55,13 +55,13 @@
#undef HAVE_FPU
#ifdef CONFIG_ARCH_FPU
# if defined(CONFIG_EXAMPLES_OSTEST_FPUSIZE) && \
# if defined(CONFIG_TESTING_OSTEST_FPUSIZE) && \
defined(CONFIG_SCHED_WAITPID) && \
defined(CONFIG_BUILD_FLAT)
# define HAVE_FPU 1
# else
# ifndef CONFIG_EXAMPLES_OSTEST_FPUSIZE
# warning "FPU test not built; CONFIG_EXAMPLES_OSTEST_FPUSIZE not defined"
# ifndef CONFIG_TESTING_OSTEST_FPUSIZE
# warning "FPU test not built; CONFIG_TESTING_OSTEST_FPUSIZE not defined"
# endif
# ifndef CONFIG_SCHED_WAITPID
# warning "FPU test not built; CONFIG_SCHED_WAITPID not defined"
@ -74,20 +74,20 @@
#ifdef HAVE_FPU
#ifndef CONFIG_EXAMPLES_OSTEST_FPULOOPS
# define CONFIG_EXAMPLES_OSTEST_FPULOOPS 16
#ifndef CONFIG_TESTING_OSTEST_FPULOOPS
# define CONFIG_TESTING_OSTEST_FPULOOPS 16
#endif
#ifndef CONFIG_EXAMPLES_OSTEST_FPUMSDELAY
# define CONFIG_EXAMPLES_OSTEST_FPUMSDELAY 750
#ifndef CONFIG_TESTING_OSTEST_FPUMSDELAY
# define CONFIG_TESTING_OSTEST_FPUMSDELAY 750
#endif
#ifndef CONFIG_EXAMPLES_OSTEST_FPUPRIORITY
# define CONFIG_EXAMPLES_OSTEST_FPUPRIORITY SCHED_PRIORITY_DEFAULT
#ifndef CONFIG_TESTING_OSTEST_FPUPRIORITY
# define CONFIG_TESTING_OSTEST_FPUPRIORITY SCHED_PRIORITY_DEFAULT
#endif
#ifndef CONFIG_EXAMPLES_OSTEST_FPUSTACKSIZE
# define CONFIG_EXAMPLES_OSTEST_FPUSTACKSIZE 2048
#ifndef CONFIG_TESTING_OSTEST_FPUSTACKSIZE
# define CONFIG_TESTING_OSTEST_FPUSTACKSIZE 2048
#endif
/* Other definitions ***************************************************/
@ -95,7 +95,7 @@
* This logic has no real notion of the underlying representation.
*/
#define FPU_WORDSIZE ((CONFIG_EXAMPLES_OSTEST_FPUSIZE+3)>>2)
#define FPU_WORDSIZE ((CONFIG_TESTING_OSTEST_FPUSIZE+3)>>2)
#define FPU_NTHREADS 2
#ifndef NULL
@ -110,13 +110,13 @@
* to be provided:
*/
/* Given an array of size CONFIG_EXAMPLES_OSTEST_FPUSIZE, this function
/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function
* will return the current FPU registers.
*/
extern void arch_getfpu(FAR uint32_t *fpusave);
/* Given two arrays of size CONFIG_EXAMPLES_OSTEST_FPUSIZE this
/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this
* function will compare them and return true if they are identical.
*/
@ -212,7 +212,7 @@ static int fpu_task(int argc, char *argv[])
sp1 = (float)id;
dp1 = (double)id;
for (i = 0; i < CONFIG_EXAMPLES_OSTEST_FPULOOPS; i++)
for (i = 0; i < CONFIG_TESTING_OSTEST_FPULOOPS; i++)
{
printf("FPU#%d: pass %d\n", id, i+1);
fflush(stdout);
@ -273,7 +273,7 @@ static int fpu_task(int argc, char *argv[])
/* Now unlock and sleep for a while -- this should result in some context switches */
sched_unlock();
usleep(CONFIG_EXAMPLES_OSTEST_FPUMSDELAY * 1000);
usleep(CONFIG_TESTING_OSTEST_FPUMSDELAY * 1000);
/* Several context switches should have occurred. Now verify that the floating
* point registers are still correctly set.
@ -310,7 +310,7 @@ void fpu_test(void)
g_fpuno = 0;
printf("Starting task FPU#1\n");
task1 = task_create("FPU#1", CONFIG_EXAMPLES_OSTEST_FPUPRIORITY, CONFIG_EXAMPLES_OSTEST_FPUSTACKSIZE, fpu_task, NULL);
task1 = task_create("FPU#1", CONFIG_TESTING_OSTEST_FPUPRIORITY, CONFIG_TESTING_OSTEST_FPUSTACKSIZE, fpu_task, NULL);
if (task1 < 0)
{
printf("fpu_test: ERROR Failed to start task FPU#1\n");
@ -323,7 +323,7 @@ void fpu_test(void)
usleep(250);
printf("Starting task FPU#2\n");
task2 = task_create("FPU#2", CONFIG_EXAMPLES_OSTEST_FPUPRIORITY, CONFIG_EXAMPLES_OSTEST_FPUSTACKSIZE, fpu_task, NULL);
task2 = task_create("FPU#2", CONFIG_TESTING_OSTEST_FPUPRIORITY, CONFIG_TESTING_OSTEST_FPUSTACKSIZE, fpu_task, NULL);
if (task2 < 0)
{
printf("fpu_test: ERROR Failed to start task FPU#1\n");

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/mqueue.c
* apps/testing/ostest/mqueue.c
*
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/nsem.c
* apps/testingnsem.c
*
* Copyright (C) 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/ostest.h
* apps/testing/ostest/ostest.h
*
* Copyright (C) 2007-2009, 2011-2012, 2018 Gregory Nutt. All rights
* reserved.
@ -34,8 +34,8 @@
*
****************************************************************************/
#ifndef __APPS_EXAMPLES_OSTEST_OSTEST_H
#define __APPS_EXAMPLES_OSTEST_OSTEST_H
#ifndef __APPS_TESTING_OSTEST_OSTEST_H
#define __APPS_TESTING_OSTEST_OSTEST_H
/****************************************************************************
* Pre-processor Definitions
@ -57,8 +57,8 @@
/* The task_create task size can be specified in the defconfig file */
#ifdef CONFIG_EXAMPLES_OSTEST_STACKSIZE
# define STACKSIZE CONFIG_EXAMPLES_OSTEST_STACKSIZE
#ifdef CONFIG_TESTING_OSTEST_STACKSIZE
# define STACKSIZE CONFIG_TESTING_OSTEST_STACKSIZE
#else
# define STACKSIZE 8192
#endif
@ -67,8 +67,8 @@
* file.
*/
#ifndef CONFIG_EXAMPLES_OSTEST_LOOPS
# define CONFIG_EXAMPLES_OSTEST_LOOPS 1
#ifndef CONFIG_TESTING_OSTEST_LOOPS
# define CONFIG_TESTING_OSTEST_LOOPS 1
#endif
/* This is the number of threads that are created in the barrier test.
@ -76,8 +76,8 @@
* to start so many threads.
*/
#ifndef CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS
# define CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS 8
#ifndef CONFIG_TESTING_OSTEST_NBARRIER_THREADS
# define CONFIG_TESTING_OSTEST_NBARRIER_THREADS 8
#endif
/* Priority inheritance */
@ -132,7 +132,7 @@ void fpu_test(void);
/* aio.c ********************************************************************/
#ifdef CONFIG_EXAMPLES_OSTEST_AIO
#ifdef CONFIG_TESTING_OSTEST_AIO
void aio_test(void);
#endif
@ -263,4 +263,4 @@ int sem_nfreeholders(void);
# define sem_nfreeholders()
#endif
#endif /* __APPS_EXAMPLES_OSTEST_OSTEST_H */
#endif /* __APPS_TESTING_OSTEST_OSTEST_H */

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/ostest_main.c
* apps/testing/ostest/ostest_main.c
*
* Copyright (C) 2007-2009, 2011-2012, 2014-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -49,7 +49,7 @@
#include <sched.h>
#include <errno.h>
#ifdef CONFIG_EXAMPLES_OSTEST_POWEROFF
#ifdef CONFIG_TESTING_OSTEST_POWEROFF
#include <sys/boardctl.h>
#endif
@ -262,7 +262,7 @@ static int user_main(int argc, char *argv[])
/* If retention of child status is enable, then suppress it for this task.
* This task may produce many, many children (especially if
* CONFIG_EXAMPLES_OSTEST_LOOPS) and it does not harvest their exit status.
* CONFIG_TESTING_OSTEST_LOOPS) and it does not harvest their exit status.
* As a result, the test may fail inappropriately unless retention of
* child exit status is disabled.
*
@ -308,9 +308,9 @@ static int user_main(int argc, char *argv[])
/* Top of test loop */
#if CONFIG_EXAMPLES_OSTEST_LOOPS > 1
for (i = 0; i < CONFIG_EXAMPLES_OSTEST_LOOPS; i++)
#elif CONFIG_EXAMPLES_OSTEST_LOOPS == 0
#if CONFIG_TESTING_OSTEST_LOOPS > 1
for (i = 0; i < CONFIG_TESTING_OSTEST_LOOPS; i++)
#elif CONFIG_TESTING_OSTEST_LOOPS == 0
for (;;)
#endif
{
@ -330,7 +330,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
#ifdef CONFIG_EXAMPLES_OSTEST_AIO
#ifdef CONFIG_TESTING_OSTEST_AIO
/* Check asynchronous I/O */
printf("\nuser_main: AIO test\n");
@ -338,7 +338,7 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_EXAMPLES_OSTEST_FPUTESTDISABLE)
#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE)
/* Check that the FPU is properly supported during context switching */
printf("\nuser_main: FPU test\n");
@ -596,7 +596,7 @@ int ostest_main(int argc, FAR char *argv[])
#endif
{
int result;
#ifdef CONFIG_EXAMPLES_OSTEST_WAITRESULT
#ifdef CONFIG_TESTING_OSTEST_WAITRESULT
int ostest_result = ERROR;
#else
int ostest_result = OK;
@ -651,7 +651,7 @@ int ostest_main(int argc, FAR char *argv[])
{
printf("ostest_main: Started user_main at PID=%d\n", result);
#ifdef CONFIG_EXAMPLES_OSTEST_WAITRESULT
#ifdef CONFIG_TESTING_OSTEST_WAITRESULT
/* Wait for the test to complete to get the test result */
if (waitpid(result, &ostest_result, 0) != result)
@ -664,7 +664,7 @@ int ostest_main(int argc, FAR char *argv[])
printf("ostest_main: Exiting with status %d\n", ostest_result);
#ifdef CONFIG_EXAMPLES_OSTEST_POWEROFF
#ifdef CONFIG_TESTING_OSTEST_POWEROFF
/* Power down, providing the test result. This is really only an
*interesting case when used with the NuttX simulator. In that case,
* test management logic can received the result of the test.

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/posixtimer.c
* testing/ostest/posixtimer.c
*
* Copyright (C) 2007-2009, 2011, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/prioinherit.c
* testing/ostest/prioinherit.c
*
* Copyright (C) 2009, 2011, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/pthread_cleanup.c
* testing/ostest/pthread_cleanup.c
*
* Copyright (C) 2017 Haltian Ltd. All rights reserved.
* Author: Juha Niskanen <juha.niskanen@haltian.com>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/pthread_rwlock.c
* testing/ostest/pthread_rwlock.c
*
* Copyright (C) 2017 Mark Schulte. All rights reserved.
* Author: Mark Schulte <mark@mjs.pw>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/pthread_rwlock_cancel.c
* testing/ostest/pthread_rwlock_cancel.c
*
* Copyright (C) 2017 Haltian Ltd. All rights reserved.
* Author: Juha Niskanen <juha.niskanen@haltian.com>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/restart.c
* testing/ostest/restart.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/robust.c
* testing/ostest/robust.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/********************************************************************************
* examples/ostest/roundrobin.c
* testing/ostest/roundrobin.c
*
* Copyright (C) 2007, 2008, 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -56,20 +56,20 @@
* With default values the test takes about 30s on Cortex-M3 @ 24MHz. With 32767
* range and 10 runs it takes ~320s. */
#ifndef CONFIG_EXAMPLES_OSTEST_RR_RANGE
# define CONFIG_EXAMPLES_OSTEST_RR_RANGE 10000
# warning "CONFIG_EXAMPLES_OSTEST_RR_RANGE undefined, using default value = 10000"
#elif (CONFIG_EXAMPLES_OSTEST_RR_RANGE < 1) || (CONFIG_EXAMPLES_OSTEST_RR_RANGE > 32767)
# define CONFIG_EXAMPLES_OSTEST_RR_RANGE 10000
# warning "Invalid value of CONFIG_EXAMPLES_OSTEST_RR_RANGE, using default value = 10000"
#ifndef CONFIG_TESTING_OSTEST_RR_RANGE
# define CONFIG_TESTING_OSTEST_RR_RANGE 10000
# warning "CONFIG_TESTING_OSTEST_RR_RANGE undefined, using default value = 10000"
#elif (CONFIG_TESTING_OSTEST_RR_RANGE < 1) || (CONFIG_TESTING_OSTEST_RR_RANGE > 32767)
# define CONFIG_TESTING_OSTEST_RR_RANGE 10000
# warning "Invalid value of CONFIG_TESTING_OSTEST_RR_RANGE, using default value = 10000"
#endif
#ifndef CONFIG_EXAMPLES_OSTEST_RR_RUNS
# define CONFIG_EXAMPLES_OSTEST_RR_RUNS 10
# warning "CONFIG_EXAMPLES_OSTEST_RR_RUNS undefined, using default value = 10"
#elif (CONFIG_EXAMPLES_OSTEST_RR_RUNS < 1) || (CONFIG_EXAMPLES_OSTEST_RR_RUNS > 32767)
# define CONFIG_EXAMPLES_OSTEST_RR_RUNS 10
# warning "Invalid value of CONFIG_EXAMPLES_OSTEST_RR_RUNS, using default value = 10"
#ifndef CONFIG_TESTING_OSTEST_RR_RUNS
# define CONFIG_TESTING_OSTEST_RR_RUNS 10
# warning "CONFIG_TESTING_OSTEST_RR_RUNS undefined, using default value = 10"
#elif (CONFIG_TESTING_OSTEST_RR_RUNS < 1) || (CONFIG_TESTING_OSTEST_RR_RUNS > 32767)
# define CONFIG_TESTING_OSTEST_RR_RUNS 10
# warning "Invalid value of CONFIG_TESTING_OSTEST_RR_RUNS, using default value = 10"
#endif
/********************************************************************************
@ -96,7 +96,7 @@ static void get_primes(int *count, int *last)
*last = 0; /* To make the compiler happy */
for (number = 1; number < CONFIG_EXAMPLES_OSTEST_RR_RANGE; number++)
for (number = 1; number < CONFIG_TESTING_OSTEST_RR_RANGE; number++)
{
int div;
bool is_prime = true;
@ -135,9 +135,9 @@ static FAR void *get_primes_thread(FAR void *parameter)
while (sem_wait(&g_rrsem) < 0);
printf("get_primes_thread id=%d started, looking for primes < %d, doing %d run(s)\n",
id, CONFIG_EXAMPLES_OSTEST_RR_RANGE, CONFIG_EXAMPLES_OSTEST_RR_RUNS);
id, CONFIG_TESTING_OSTEST_RR_RANGE, CONFIG_TESTING_OSTEST_RR_RUNS);
for (i = 0; i < CONFIG_EXAMPLES_OSTEST_RR_RUNS; i++)
for (i = 0; i < CONFIG_TESTING_OSTEST_RR_RUNS; i++)
{
get_primes(&count, &last);
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/semtimed.c
* apps/testing/ostest/semtimed.c
*
* Copyright (C) 2014-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/setvbuf.c
* testing/ostest/setvbuf.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/sigev_thread.c
* testing/ostest/sigev_thread.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/sighand.c
* apps/testing/ostest/sighand.c
*
* Copyright (C) 2007, 2008, 2011, 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/signest.c
* apps/testing/ostest/signest.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/sigprocmask.c
* apps/testing/ostest/sigprocmask.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/sporadic.c
* apps/testing/ostest/sporadic.c
*
* Copyright (C) 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/suspend.c
* apps/testing/ostest/suspend.c
*
* Copyright (C) 2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* apps/examples/ostest/mqueue.c
* apps/testing/ostest/mqueue.c
*
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/timedwait.c
* testing/ostest/timedwait.c
*
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/tls.c
* testing/ostest/tls.c
*
* Copyright (C) 2016 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/vfork.c
* testing/ostest/vfork.c
*
* Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>

View File

@ -1,5 +1,5 @@
/****************************************************************************
* examples/ostest/waitpid.c
* testing/ostest/waitpid.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>