examples/ostest can be executed in a loop

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@763 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2008-06-01 17:50:07 +00:00
parent a9b64a7469
commit e8339c2aba
10 changed files with 100 additions and 67 deletions
+1
View File
@@ -366,3 +366,4 @@
verified).
* Host simulator no longer uses Linux system calls directly; Now works with Cygwin.
* Fix an error that occurs when a POSIX timer is deleted by the timer signal handler.
* Add logic to allow the examples/ostest to be run repetitively as an endurance test.
+1
View File
@@ -1016,6 +1016,7 @@ nuttx-0.3.11 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
verified).
* Host simulator no longer uses Linux system calls directly; Now works with Cygwin.
* Fix an error that occurs when a POSIX timer is deleted by the timer signal handler.
* Add logic to allow the examples/ostest to be run repetitively as an endurance test.
pascal-0.1.3 2008-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
+1
View File
@@ -114,6 +114,7 @@ nuttx$(EXEEXT): nuttx.rel $(HOSTOBJS)
@$(NM) $(TOPDIR)/$@ | \
grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
sort > $(TOPDIR)/System.map
@rm -f nuttx.rel
.depend: Makefile $(SRCS)
@$(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+2 -1
View File
@@ -311,7 +311,8 @@ CONFIG_NET_RESOLV_ENTRIES=4
#
# Settings for examples/ostest
CONFIG_OSTEST_STACKSIZE=256
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=256
#
# Settings for examples/nsh
+5
View File
@@ -281,6 +281,11 @@ CONFIG_EXAMPLE_NETTEST_DRIPADDR=(192<<24|168<<16|0<<8|1)
CONFIG_EXAMPLE_NETTEST_NETMASK=(255<<24|255<<16|255<<8|0)
CONFIG_EXAMPLE_NETTEST_CLIENTIP=(192<<24|168<<16|0<<8|106)
#
# Settings for examples/ostest
CONFIG_EXAMPLES_OSTEST_LOOPS=100
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
#
# Settings for examples/nsh
CONFIG_EXAMPLES_NSH_TELNET=n
+2 -1
View File
@@ -312,7 +312,8 @@ CONFIG_NET_RESOLV_ENTRIES=4
#
# Settings for examples/ostest
CONFIG_OSTEST_STACKSIZE=256
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=256
#
# Settings for examples/nsh
+2 -1
View File
@@ -312,7 +312,8 @@ CONFIG_NET_RESOLV_ENTRIES=4
#
# Settings for examples/ostest
CONFIG_OSTEST_STACKSIZE=256
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=256
#
# Settings for examples/nsh
+5 -1
View File
@@ -20,7 +20,11 @@ examples/ostest
The behavior of the ostest can be modified with the following
settings in the configs/<board-name>/defconfig file:
* CONFIG_OSTEST_STACKSIZE
* 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.
examples/nsh
+2 -1
View File
@@ -53,7 +53,7 @@ static void *barrier_func(void *parameter)
usleep(500*1000);
#endif
/* Take the semaphore */
/* Wait at the barrier until all threads are synchronized. */
printf("barrier_func: Thread %d calling pthread_barrier_wait()\n", id);
status = pthread_barrier_wait(&barrier);
@@ -99,6 +99,7 @@ void barrier_test(void)
{
printf("barrier_test: pthread_barrierattr_init failed, status=%d\n", status);
}
/* Create the barrier */
status = pthread_barrierattr_init(&barrierattr);
+21 -4
View File
@@ -58,12 +58,21 @@
#define NARGS 4
/* The task_create task size can be specified in the defconfig file */
#ifdef CONFIG_OSTEST_STACKSIZE
# define STACKSIZE CONFIG_OSTEST_STACKSIZE
#ifdef CONFIG_EXAMPLES_OSTEST_STACKSIZE
# define STACKSIZE CONFIG_EXAMPLES_OSTEST_STACKSIZE
#else
# define STACKSIZE 8192
#endif
/* The number of times to execute the test can be specified in the defconfig
* file.
*/
#ifndef CONFIG_EXAMPLES_OSTEST_LOOPS
# define CONFIG_EXAMPLES_OSTEST_LOOPS 1
#endif
/****************************************************************************
* Private Data
****************************************************************************/
@@ -280,6 +289,14 @@ static int user_main(int argc, char *argv[])
check_test_memory_usage();
#endif
/* 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
for (;;)
#endif
{
#if CONFIG_NFILE_DESCRIPTORS > 0
/* Checkout /dev/null */
@@ -394,7 +411,7 @@ static int user_main(int argc, char *argv[])
printf("\nFinal memory usage:\n");
show_memory_usage(&g_mmbefore, &g_mmafter);
#endif
}
printf("user_main: Exitting\n");
return 0;
}
@@ -446,7 +463,7 @@ int user_start(int argc, char *argv[])
stdio_test();
#ifdef SDCC
/* I am not yet certain why SDCC does not like the initilizer.
/* I am not yet certain why SDCC does not like the following initilizers.
* It involves some issues with 2- vs 3-byte pointer types.
*/