From cb58b71b536327a62caaf24b53301dfd4143a77c Mon Sep 17 00:00:00 2001 From: batt Date: Mon, 22 Mar 2010 17:55:45 +0000 Subject: [PATCH] Add more kernel tests. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3262 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/kern/proc_test/coop_msg_test.c | 49 ++++++++++++++++++++ bertos/kern/proc_test/coop_sem_test.c | 49 ++++++++++++++++++++ bertos/kern/proc_test/coop_signal_test.c | 49 ++++++++++++++++++++ bertos/kern/proc_test/preempt_msg_test.c | 51 +++++++++++++++++++++ bertos/kern/proc_test/preempt_sem_test.c | 51 +++++++++++++++++++++ bertos/kern/proc_test/preempt_signal_test.c | 51 +++++++++++++++++++++ 6 files changed, 300 insertions(+) create mode 100644 bertos/kern/proc_test/coop_msg_test.c create mode 100644 bertos/kern/proc_test/coop_sem_test.c create mode 100644 bertos/kern/proc_test/coop_signal_test.c create mode 100644 bertos/kern/proc_test/preempt_msg_test.c create mode 100644 bertos/kern/proc_test/preempt_sem_test.c create mode 100644 bertos/kern/proc_test/preempt_signal_test.c diff --git a/bertos/kern/proc_test/coop_msg_test.c b/bertos/kern/proc_test/coop_msg_test.c new file mode 100644 index 00000000..896f8fbd --- /dev/null +++ b/bertos/kern/proc_test/coop_msg_test.c @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Message test. + * + * \version $Id$ + * + * \author Daniele Basile + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_signal.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SIGNALS" >> $cfgdir/cfg_signal.h + * $test$: echo "#define CONFIG_KERN_SIGNALS 1" >> $cfgdir/cfg_signal.h + * + * notest: all + */ + +#include "../msg_test.c" diff --git a/bertos/kern/proc_test/coop_sem_test.c b/bertos/kern/proc_test/coop_sem_test.c new file mode 100644 index 00000000..eaf6bc99 --- /dev/null +++ b/bertos/kern/proc_test/coop_sem_test.c @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Semaphore test. + * + * \version $Id$ + * + * \author Daniele Basile + * \author Stefano Fedrigo + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_sem.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SEMAPHORES" >> $cfgdir/cfg_sem.h + * $test$: echo "#define CONFIG_KERN_SEMAPHORES 1" >> $cfgdir/cfg_sem.h + * + * notest:all + */ + +#include "../sem_test.c" diff --git a/bertos/kern/proc_test/coop_signal_test.c b/bertos/kern/proc_test/coop_signal_test.c new file mode 100644 index 00000000..f1ab4ca7 --- /dev/null +++ b/bertos/kern/proc_test/coop_signal_test.c @@ -0,0 +1,49 @@ +/** + * \file + * + * + * \brief Signals test. + * + * \version $Id$ + * + * \author Daniele Basile + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_signal.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SIGNALS" >> $cfgdir/cfg_signal.h + * $test$: echo "#define CONFIG_KERN_SIGNALS 1" >> $cfgdir/cfg_signal.h + * + * notest: all + */ + +#include "../signal_test.c" diff --git a/bertos/kern/proc_test/preempt_msg_test.c b/bertos/kern/proc_test/preempt_msg_test.c new file mode 100644 index 00000000..88348d49 --- /dev/null +++ b/bertos/kern/proc_test/preempt_msg_test.c @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Message test. + * + * \version $Id$ + * + * \author Daniele Basile + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: echo "#undef CONFIG_KERN_PREEMPT" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN_PREEMPT 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_signal.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SIGNALS" >> $cfgdir/cfg_signal.h + * $test$: echo "#define CONFIG_KERN_SIGNALS 1" >> $cfgdir/cfg_signal.h + * + * notest:all + */ + +#include "../msg_test.c" diff --git a/bertos/kern/proc_test/preempt_sem_test.c b/bertos/kern/proc_test/preempt_sem_test.c new file mode 100644 index 00000000..0738bfac --- /dev/null +++ b/bertos/kern/proc_test/preempt_sem_test.c @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Semaphore test. + * + * \version $Id$ + * + * \author Daniele Basile + * \author Stefano Fedrigo + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: echo "#undef CONFIG_KERN_PREEMPT" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN_PREEMPT 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_sem.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SEMAPHORES" >> $cfgdir/cfg_sem.h + * $test$: echo "#define CONFIG_KERN_SEMAPHORES 1" >> $cfgdir/cfg_sem.h + * + * notest:all + */ + +#include "../sem_test.c" diff --git a/bertos/kern/proc_test/preempt_signal_test.c b/bertos/kern/proc_test/preempt_signal_test.c new file mode 100644 index 00000000..cd02ae70 --- /dev/null +++ b/bertos/kern/proc_test/preempt_signal_test.c @@ -0,0 +1,51 @@ +/** + * \file + * + * + * \brief Signals test. + * + * \version $Id$ + * + * \author Daniele Basile + * + * $test$: cp bertos/cfg/cfg_proc.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN 1" >> $cfgdir/cfg_proc.h + * $test$: echo "#undef CONFIG_KERN_PREEMPT" >> $cfgdir/cfg_proc.h + * $test$: echo "#define CONFIG_KERN_PREEMPT 1" >> $cfgdir/cfg_proc.h + * $test$: cp bertos/cfg/cfg_signal.h $cfgdir/ + * $test$: echo "#undef CONFIG_KERN_SIGNALS" >> $cfgdir/cfg_signal.h + * $test$: echo "#define CONFIG_KERN_SIGNALS 1" >> $cfgdir/cfg_signal.h + * + * notest: all + */ + +#include "../signal_test.c" -- 2.25.1