Commit graph

2591 commits

Author SHA1 Message Date
Benjamin Walsh 68a8059603 unified/test_sema: fix isr wrapper names
isr wrapper names conflicted with real kernel APIs.

Change-Id: Ia85245fcd3025f9d15175523982883e16e97010c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 45054a6e02 unified: Fix test_sema/microkernel
Fixes test_sema/microkernel so that the variable assigned the return
value from task_sem_group_take() is of type 'ksem_t' instead of 'int'.

Work by: Peter Mitsis <peter.mitsis@windriver.com>

Change-Id: Iee9f321a6bd51ca3bc0cd8b0c7eceae8a5bf7ce0
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 3bcd880594 unified/test_timer: adapt for unified kernel
Test is poking into microkernel private data structuresa, but the
unified kernel provides an API to retrieve that value.

Abstract the call in the microkernel case to minic the unified kernel
API.

Work by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>

Change-Id: Ic3195d470fda178164268d9c71c55a2a6daa61a3
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh c24d844eec unified/test_pipe: adapt to not use sem groups
Not available yet on unified kernel.

Change-Id: I70c7c07ab26a66b7a89246a335fa2af0db2ec72c
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh cda52c7adb unified/test_mail: adapt test to not use sem groups and mem pools
Not available on unified kernel yet.

Change-Id: I834482f3ad94d1c6ecc67c70c1fce78e43db31c5
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Benjamin Walsh 6f4b9a64cf unified/test_context: adapt test to run on unified kernel
Fixing issues with the test itself really:

- reply_timeout semaphore was not initialized, causing its limit value
  to be 0 on unified kernel

- There is no API to set a fiber's priority after it is started in a
  nanokernel. However, tcs.prio can be written to and this works without
  issues. On unified kernel, this does not work however because the
  thread has to move between linked lists representing each priority in
  the ready queue.

Change-Id: I3c5585da05cbc4ac3d2f0f9ae0297d24d41b1309
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-09-13 17:12:55 -04:00
Andrew Boie c579ca43ac test_context: use correct timer IRQ for mint valley
LOAPIC timer driver is used by both LOAPIC and MVIC, but the
correct #define needs to be used for the IRQ line.

Issue: ZEP-848
Change-Id: Ib682dd95c08ba437d1ff409e0e0352944d13b633
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-12 17:53:21 +00:00
Genaro Saucedo Tejada 59b06e2860 fix: previously uninitialized variables break DEBUG sanity
Fix several compiler warnings that were preventing sanity from
completing successfully when running with the CONFIG_DEBUG=y setting.
(related to compiler flag -Werror=maybe-uninitialized)

JIRA: ZEP-735

Change-Id: I3cb79eb0f254f15d18f18ace50b0cf24e9ef5f10
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-09-12 02:25:22 +00:00
Andrew Boie 0279d9b2cb test_context: don't test dynamic exceptions
This API has been deprecated and scheduled for removal.
It was only implemented on X86, and ARM systems that
aren't XIP.

Static exceptions (only implemented on x86) will
continue to be tested by test_static_idt.

Change-Id: I6d63347ead8200002ee1edd8dd4572b418800400
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-09-06 16:15:59 +00:00
Andrew Boie 73e5bfda5a tests: kernel: fix incorrect printk() usage
Change-Id: Id7c18edd93eac71d31eaba628158a2badc306238
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie 0ef0136a04 tests: test_printk: crude printk test case
Print some stuff, and verify that the output is as expected.
Not comprehensive (yet).

Change-Id: Ib1ce8dff8165d8ee6b02ff6272513fd76a7be842
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-28 07:47:28 -04:00
Andrew Boie d02b96d5a7 test_ipm: disable on Quark SE ARC core
This test can't run properly because it already defines
an IPM console sender, and instantiating the dummy one
prevents any messages from being forwarded to the x86 side.

Issue: ZEP-708
Change-Id: Ib13c5df5db67f3d9fde960f8e5cda354c60efae1
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-08-17 20:52:30 +00:00
Andy Ross 5c1011a30a test_sleep: More latency workarounds
We are also seeing qemu failures in the synchronous wakeup tests,
where the fiber should be resuming instantly but in practice sees a
one-tick delay due to the emulation environment not being
deterministic.  Allow one tick of slop in those too.

Change-Id: Idab7c45ea0b10bd955b90a98d3884b5fe0571187
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-12 20:36:11 +00:00
Andy Ross 5a8add7821 tests/kernel/{test_task,test_sleep}: Less aggressive timer testing
On some hardware (Qemu) the timer guarantees aren't honored as well as
we like, and these tests are observed to spuriously fail in practice
(e.g. CI testing).  Allow for one tick of slop when testing sleep
durations.

Change-Id: I4b694c0a9ddfc1ee48510fa5deda2bb31499debf
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2016-08-10 16:42:51 +00:00
Andrew Boie 17c0b372a2 x86: improve exception APIs
Previously, exception stubs had to be declared in assembly
language files. Now we have two new APIs to regsiter exception
handlers at C toplevel:

 _EXCEPTION_CONNECT_CODE(handler, vector)
 _EXCEPTION_CONNECT_NOCODE(handler, vector)

For x86 exceptions that do and do not push error codes onto
the stack respectively.

In addition, it's now no longer necessary to #define around
exception registration. We now use .gnu.linkonce magic such that
the first _EXCEPTION_CONNECT_*() that the linker finds is used
for the specified vector. Applications are free to install their
own exception handlers which will take precedence over default
handlers such as installed by arch/x86/core/fatal.c

Some Makefiles have been adjusted so that the default exception
handlers in arch/x86/core/fatal.c are linked last. The code has
been tested that the right order of precedence is taken for
exceptions overridden in the floating point, gdb debug, or
application code. The asm SYS_NANO_CPU_EXC_CONNECT API has been
removed; it was ill- conceived as it only worked for exceptions
that didn't push error codes. All the asm NANO_CPU_EXC_CONNECT_*
APIs are gone as well in favor of the new _EXCEPTION_CONNNECT_*()
APIs.

CONFIG_EXCEPTION_DEBUG no longer needs to be disabled for test
cases that define their own exception handlers.

Issue: ZEP-203
Change-Id: I782e0143fba832d18cdf4daaa7e47820595fe041
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-28 18:13:24 +00:00
Kumar Gala 58647277ed tests: test_tickless: Fix NXP K64 symbol dependency
We filtered on CONFIG_SOC_FSL_FRDM_K64F which doesn't exist change it to
CONFIG_SOC_MK64F12 to allow this testcase to run on the K64 platform

Change-Id: Ifdd89e66aa403c3bb28c07d3a546037275a5118d
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-07-28 07:20:12 -05:00
Andrew Boie 96cadd1a9a arc: move special-purpose irq priorities to flags
We have already done this on x86 and ARM. The policy is as follows:

* IRQ priority levels starting at 0 all have the same semantics and
do not have special properties. The priority level is either ignored
on arches which do not support programmable priority levels, or lower
priority levels take precedence over higher ones.
* Special-case priorty levels are specified via flags, in which case
the supplied priority level is ignored.

Issue: ZEP-60
Change-Id: Ic603f49299ee1426fb9350ca29d0b8ef96a1d53a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-26 15:06:28 +00:00
Andrew Boie 8c524a291e x86: merge IAMCU and SYS V core arch code
Having two parallel implementations is a maintenance issue, especially
when some strategically placed #ifdefs will suffice.

We prefer the ASM versions for SYS V, as we need complete control of
the emitted assembly for interrupt handling and context switching.
The SYS V code is far more mature. IAMCU C code has known issues with
-fomit-frame-pointer.

The only difference between the two calling conventions is that the
first three function arguments are provided in eax, edx, ecx instead
of on the stack.

Issue: ZEP-49
Change-Id: I9245e4b0ffbeb6d890a4f08bc8a3a49faa6d8e7b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-13 17:56:39 +00:00
Andrew Boie dd2273146c test_pool: exclude on olimexino_stm32 and nucleo_f103rb
These two boards don't have enough RAM to effectively run this
test case without making the stacks so small they don't work
on other platforms. ARM is sill covered by other boards.

Change-Id: Ibf20eefaf29f989cbb6da6cd3a8eeed2faa1950b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-12 19:29:19 +00:00
Andrew Boie 8a80ce5c6f Revert "REVERTME: test_pool disable due to memory corruption bug"
Allan fixed the underlying issue, re-enable.

This reverts commit 19fa82ab91.

Change-Id: I6e517f76a6650a3e9ba5a09118187e6c965a147a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-11 17:53:45 +00:00
Juan Manuel Cruz 655a2c89f8 tracing: test includes ipc console fiber if enabled
The test test_thread_monitor fails when a platform enables
the IPC console.
This commit fixes the test to count the IPC console fiber
if it is enabled in the project or the platform.

Change-Id: I9faf9d120b35d9211e558be8f5788885f30c3081
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-07-08 20:34:30 +00:00
Andrew Boie ef29812d51 nios2: support more global pointer scenarios
We now allow use of -mgpopt=global and -mgpopt=data. The 'global'
option is now the default instead of compiler-default local, expanding
global pointer usage to all small data in the system.

For systems where all RAM is less than 64K, the 'data' option may be
appropriate.

Some fixes had to be made to the system in order to get around some
issues:

* prep_c.c no longer uses fake linker variables to figure out the size
of data or BSS, as these gave the linker fits as it tried to compute
relative addresses to them.

* _k_task_ptr_idle is create by sysgen and placed in a special section.
Any small data in a special section needs to be declared extern
with __attribute__((section)) else the compiler will assume it's in
.sdata.

* same situation with extern references to k_pipe_t (fixed pipe_priv
test)

For legacy applications being ported to Nios II which do things that
freak out global pointer calculation, it can be disabled entirely.

Change-Id: I5eb86ee8aefb8e2fac49c5cdd104ee19cea23f6f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-06 18:14:31 +00:00
Andrew Boie 19fa82ab91 REVERTME: test_pool disable due to memory corruption bug
See ZEP-514

Change-Id: I7e9c2c5f81c01e73f1f7ce892fe835ebe3a7a36b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 19:44:30 +00:00
Peter Mitsis b4eee20e4b test_fp_sharing: Enable for Cortex-M4
Update the FP sharing test project for use with the Cortex-M4.

Change-Id: If04a191b26291058bd7002ce8a0939eda8a5eb48
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:16 +00:00
Peter Mitsis 3490627a97 test_fp_sharing: clean up test code
Clean up test code in preparation for adding Cortex-M4 support.

Change-Id: I64a32e8aa2808b4e0348601e2fc0f7f39cdb413c
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-07-01 19:44:15 +00:00
Andrew Boie 571ccee400 test_pool: increase task stack sizes
We were getting a stack overflow on Nios II.

Change-Id: Id2c9be27552f31f5cdbf72dc31e77a106082746b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-07-01 19:01:58 +00:00
Genaro Saucedo Tejada c8d9b6b5e3 tags: basic kernel objects test for actual hardware
Tagged some tests/kernel testcases with 'bat_commit'. Only test that
work on actual hardware are tagged, while tests with known issues
were left not tagged, test meant for emulator or build only were
also not tagged.

Change-Id: Icede6bc76788aba60d8f1fdcf624e95a7d3116a2
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
2016-07-01 00:38:31 +00:00
Andrew Boie e3ffa67bde test_stackprot: disable for Nios II
No compiler support for -fstack-protector on this arch with the
current toolchain.

Change-Id: Ifa793599b6760c318f16748f9e71c31e0d4edbe7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Andrew Boie 5da328b07b tests: test_tickless: exclude on Nios II
Tickless idle will not be enabled on Nios II due to the
lack of a powersaving instruction.

Change-Id: Ib3c23d803d6335aeb791983e31ad7da2d0deb118
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-30 18:51:51 +00:00
Kumar Gala 7dcbbc39e7 build: move from srctree to ZEPHYR_BASE for app include paths
$srctree for the application might not be set to be $ZEPHYR_BASE, use
$ZEPHYR_BASE instead to be more explicit in the build.

Change-Id: Iefa5ff59f246b584949329044f7a6531adc6ed62
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2016-06-30 14:36:39 +00:00
Tomasz Bursztyka 83c82e6cd6 tests: Allow tc_util to use printf when requested
printk() is too simplistic and does not handle byte precision on formats
like %02x etc... printf does, so letting the possibility to use it when
relevant. This might be useful when dumping out some network packets,
byte by byte where a precision of 1 byte (thus 2 0's) is necessary.

It's better to have this output:
	41 d8 ...
instead of:
	00000041 000000d8 ...

Change-Id: Idc15bbae67830f41388373e2ca1947bb274fb550
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-06-29 05:19:26 +00:00
Andrew Boie ab5f6de4af test_context: build/run on ARC and Nios II
Change-Id: If3e03fef8ed9448bdba82b442ac976bfd6a7ddce
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:13 +00:00
Andrew Boie 30db3401e8 nanokernel: tests: increase stack size from 256 bytes
A recent change modified the fiber stack size of these tests
to 256 bytes, which causes a stack overflow on Nios II. (This
arch has lots of registers)

Increase to 384 bytes, which still compiles well on RAM-constrained
targets like Quark SE SS, Nucleo, etc.

Change-Id: I2152ea9fc1fac693638b8f7a00a6b6628e0c42d3
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-29 00:08:08 +00:00
Andrew Boie 2ecb9d45d5 test_irq_offload: unit test for running functions in IRQ context
This is used in many other test cases. However when implementing this
function it's helpful to have a testcase dedicated for it, without
dependencies on other kernel objects.

Change-Id: I66a7cdd0b13712665384d5ad4e79050c82d32e3a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-28 15:56:05 -07:00
Andrew Boie 54b58827b0 test_intmath: new Nios II test case for integer math
Not all CPUs implemement the mul, div, or mulx instructions. Ensure
that any runtime handling of these works correctly.

Change-Id: I50426bd5704cd913f290c9677d1760d53c9e4b56
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-06-28 22:48:28 +00:00
Inaky Perez-Gonzalez 9e66787a33 test_timer: give it more time, in real HW it seems 60s is not enough
Change-Id: Ifea72f4b0e40aa9351f4d377a032c6133b167055
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:57 +00:00
Inaky Perez-Gonzalez fcec9e37c0 testcases: sanity check TCs get more language for real HW
Add more specifications or qualify some to the sanity check test cases
for them to be ran in real hardware:

 - kernel types (micro vs nano)
 - platforms / arches to exclude / include
 - one that is removed (for the PCI sample) as it cannot be ran
   without extra information

Change-Id: Id14dc15eb89358c3656d2814ea41bb6fec051278
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2016-06-14 23:49:56 +00:00
Benjamin Walsh 53c3106520 tests: test nano_fifo_put_list and nano_fifo_put_slist.
Change-Id: I35ab267070126dcf7c8649ed79a7a4a5479b1f55
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-06-13 20:24:42 +00:00
Anas Nashif b67baefefd tests: fix build test configuration
Change-Id: I14f2c0a1c80f0c128db6a5d24830cc31c46308d1
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-06-03 18:42:33 +00:00
Luiz Augusto von Dentz 8b1afeaaa3 tests: Add tests for delayed workqueue
Change-Id: If62f44a989012047008c0d782aef2aa7b6016190
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-31 22:52:52 +00:00
Anas Nashif 60b18711f3 tests: remove duplicate kernel configs and usage of ARCH
Many test configs are the same, remove complexity and duplication by
using just one kernel config where applicable.

This removes the usage of ARCH which is a remnant from the days where
we had to specify the architecture of the board, the architecture is now
part of Kconfig and determined basded on the board configuration.

This will also make it easy adding new architectures to test cases without
having to add an architecture specific config file when it is actually not
needed, for example now that we will enable micro-kernel support on ARC.

Jira: ZEP-238
Change-Id: I143fa3c4629c58329cfeb0c761c7a896fc1ef63a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-23 16:46:08 +00:00
Luiz Augusto von Dentz 21fabb3d39 nano_work: Add nano_work_init
Change-Id: I2e54e3e6ad048ff0d85cbef83e415ad436ecf720
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-05-21 12:02:57 +00:00
Peter Mitsis 1434d49539 test_fp_sharing: Add testcase.ini files
Adds testcase.ini files for the floating point sharing tests to
ensure that there are run on a daily basis.

Change-Id: I206b1734700f6e998c19d7ad1b36a84400284899
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-20 00:09:24 +00:00
Vlad Dogaru efa3b6fa99 tests: Add nano_work test
Change-Id: I78359bdd75aa2aa5e2f4b34347d838747d60015f
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
2016-05-12 15:27:24 +00:00
Anas Nashif aaa508a2f8 tests: build using newlib also on ARC
A recent issue due to a change to ARC was not caught because we
do not build on ARC. Now that we have libc with ARC toolchain,
built for all arches.

Change-Id: I8c9b7d37802cb582dcb50e6c61d040078d8ecd26
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-05-05 14:08:50 +00:00
Andrew Boie 0c4590d252 test_tickless: improve testcase.ini filter
The filter specification now matches the code. We can run on any x86,
or those ARM boards where the test's timestamp.c has _Timestamp*
implementations.

Change-Id: Ib81e5379f892beb3783dd3c345cd536c883a74de
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Andrew Boie 3ea7892410 sanitycheck: allow for more expressive filtering in testcase.ini
The old 'config_whitelist' directive in testcase.ini has been removed.
We use the new expr_parser module to parse a 'filter' directive which
is a boolean expression. This gives a great deal more flexibility
in how tests can be filtered.

To keep the tree bisectable, use of config_whitelist in testcase.ini
converted to the new expression language.

Change-Id: I0617319818c5559c0f0569d2fa73d09b681cac51
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-05-04 22:57:39 +00:00
Peter Mitsis 2cac7eea6a tests: Pend microkernel tasks on nanokernel objects
Adds a test for pending microkernel tasks on nanokernel objects.
This explicitly covers the nanokernel FIFOs, LIFOs and timers
while implicitly covering nanokernel sempahores.

Change-Id: Ic044b731da13dea337e199499c23ea425056fae4
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-05-04 22:51:34 +00:00
Luiz Augusto von Dentz e2c1b2b7be tests: test_slist: Add test for sys_slist_insert
Change-Id: I7b478c78050027013f386146bae6198a554f2005
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2016-04-28 11:41:15 +00:00
Andrew Boie edc81265b4 test_timer: nanokernel: use empty config for all arches
Extra config for x86 was unnecessary.

Change-Id: Ic86979e80db2c63e07b328375027acec97e751c7
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:09 +00:00
Andrew Boie 3e156748d0 test_xip: nanokernel: use common proj.conf
They were all the same anyway...

Change-Id: I4cf54d7a837d585885990bfcd168e96059349c4a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:41:04 +00:00
Andrew Boie 7571cdfd59 test_obj_tracing: nanokernel: use common config
The extra config in x86 isn't necessary.

Change-Id: I967a58ae5c04d55c144e9f711a708f43dc023ebb
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:59 +00:00
Andrew Boie 1bf37fb6d3 test_errno: remove unnecessary use of nanokernel API
Change-Id: I7bc26e11f82f697b980f9eb9105941bc9caeb6c6
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-27 21:40:49 +00:00
Anas Nashif 65c06afa58 kinetis: reorganise soc directory using soc family
Add Kinetis SoC family and rename fsl_frdm_k64f to mk64f12.
This will allow adding new SoCs of the same family and the reuse of code
among SoCs of the family and series.

Change-Id: Iea1a663aef7ce0487f147bdd36f668bebe80deb5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:58 +00:00
Anas Nashif 9bf2da7ef4 stm32: rename CONFIG_SOC_STM32 -> CONFIG_SOC_FAMILY_STM32
Use CONFIG_SOC_FAMILY for the top level SoC family. A family
will have different SoCs or different SoC series with multiple
SoCs.
Adding the Family string to the config variable to avoid confusion
between actual SoCs and families and to prevent name collisions.

Change-Id: Ic99a2c1df7850dee3a45641027af82464dd6fadb
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-04-18 21:24:58 +00:00
Andrew Boie a83f895dd5 microkernel: deprecate task IRQs
This mechanism does not add enough value to the kernel to be worth
maintaining it. Drivers that need deferred processing of interrupts
can simply define their own task and have the interrupt handler
release an event that the task waits on.

The API is marked as deprecated and it is removed from unit test
coverage as well as the documentation.

Change-Id: Ib87b91cb41e9b6d7fdf0dc62b240a531b6a8889f
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-04-15 16:02:12 +00:00
Tomasz Bursztyka 1c827b9721 tests: test_early_sleep: Let's test at all initialization level
Not only SECONDARY, but also the following ones:
- NANOKERNEL
- MICROKERNEL
- APPLICATION

Change-Id: Id41fa572c830727166101fa3c6254398857b31c7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-08 15:08:33 +00:00
Maciek Borzecki 54a055426d test_tickless: disable test for STM32 SoCs
Disable the test for STM32 based platforms until an implementation of
timestamp counter becomes available.

Change-Id: I2e50dac36dbfdc61081610c0e0cf1ace8892f602
Signed-off-by: Maciej Borzecki <maciek.borzecki@gmail.com>
2016-04-01 13:12:57 +00:00
Peter Mitsis 28e5d0287e test_fifo: Reorganize directories
Splits the test into two clear sub-categories: microkernel and nanokernel.
This is done to maintain consistency with other tests that do the same
(e.g. test_obj_tracing, test_sema, test_stackprot, test_timer).

Change-Id: Iddb1ec8d569a9d953fb8af5ce08e87b51995f821
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:07:28 +00:00
Tomasz Bursztyka 71e26d0d03 tests: Add a test suite for the single linked list generic
It will extensively test all provided functions within a normal usage of
the API.

Change-Id: I723203a29c3f3416b464030a7fe34eac5fff6095
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2016-04-01 00:01:58 +00:00
Peter Mitsis 30aa2602ad test_fifo: Fix issues flagged by checkpatch
Fixes line length and whitespace issues flagged by the checkpatch tool.

Change-Id: Id49cd5341571ac7893929a2836fe5e06166abe06
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-04-01 00:00:34 +00:00
Yannis Damigos ee587d08a8 tests: kernel: test_context: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_context to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for
test-context.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I219f63063ee2dca5b0326e25141d8b37f4cd1d74
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:52 +00:00
Yannis Damigos 32e450024e tests: kernel: test_pool: reduce ram requirements
Reduces the amount of memory allocated for task's stack.
This permits the test_pool to compile on boards like
nucleo-f103rb. Sanitycheck script passes all test for test-nano.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ib8041f6d91e8ffc5fcb16dc73de1f7662d9596da
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Yannis Damigos 60695b18a0 tests: kernel: reduce ram requirements
Reduces the amount of memory allocated for stack (both fiber
and task). This permits test_sema and test_mutex to compile
on boards like nucleo-f103rb. Sanitycheck script passes all
tests for test_sema and test_mutex.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: Ie25288bbbbfa64bfc5f7463639bfb09639cc184f
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-31 23:17:51 +00:00
Yannis Damigos 560e6a3cf4 tests: kernel: test-fifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test_nano to compile on boards like
nucleo-f103rb and arduino 101 sss. Sanitycheck script passes
all test for test-fifo.

This patch was verified on the emulated platforms and not against
real hardware boards.

Change-Id: Icf30c4056d9f9ebdc82c100305bf761e49b64491
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 22:21:25 +00:00
Yannis Damigos f004330589 tests: kernel: test-lifo: reduce ram requirements
Reduces the amount of memory allocated for fiber's stack.
This permits the test to compile on boards like
nucleo-f103rb and arduino 101 sss.
Sanitycheck script passes all test for test-lifo.

This patch was verified on the emulated platforms and not
against real hardware boards.

Change-Id: I1dd514c9d273bcf490e0eb4f1fadee1a8a94bcc5
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
2016-03-30 20:02:54 +00:00
Anas Nashif e444363cb9 sanity: add quark_se_devboard to tested boards
Change-Id: I82cefb1baaa0c7174cebcd35c527fec3d133241e
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-30 11:04:36 +00:00
Ramesh Thomas bb19e6f82f power_mgmt: Make names consistent with new RFC
Changed names of Kconfig flags, variables, functions, files and
return codes consistent with names used in the RFC. Updated
relevant comments to match the changes.

Origin: Original
Change-Id: Ie7941032d7ad7af61fc02928f74538745e7966e8
Signed-off-by: Ramesh Thomas <ramesh.thomas@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-26 14:35:11 -04:00
Dmitriy Korovkin 0986684e62 tests: Add test for microkernel early sleep functionality
Test verifies that a task_sleep() function can be used during the system
initialization, then it tests that when the k_server() starts, task_sleep()
call makes another task run.

For fibers, test that fiber_sleep() called during the system
initialization puts a fiber to sleep for the provided amount of ticks,
then check that fiber_sleep() called from a fiber running on the
fully functioning microkernel puts that fiber to sleep for the proiveded
amount of ticks.

Change-Id: Iec20b61d7e802a19b1ec074d2511345eed9f2407
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-26 10:17:22 +00:00
Andre Guedes 54337aa736 test: Convert returning code to errno.h
Change-Id: Ib4e3fb2e3c1cecf7e1646c7dc03b16e9ce4b6da2
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
2016-03-23 15:49:40 +00:00
Juan Manuel Cruz 6d040a89ff debug: add task tracing to sanity test
Change-Id: I2d9691d094a764b9e884ef5f7a2700bedcf71745
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:13:43 +00:00
Juan Manuel Cruz 5f566034e5 debug: object tracing sanity test includes thread monitor.
Change-Id: Ic57ed69374b2075bcdf5cd5d72b83b03b59fbac5
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
2016-03-11 22:10:23 +00:00
Anas Nashif 63ec21c451 Revert "tests: Add test for microkernel early sleep functionality"
This reverts commit b1a0041de6.

This breaks sanitychecks in CI. The early_sleep kernel test case is failing
randomly.

Change-Id: I129b649f7010da90f52616f6fd63eec8b63f8247
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 22:09:42 +00:00
Anas Nashif 3d9759c9c5 Revert "sanitychecks: skip early_sleep test"
This reverts commit f9d1d56153.

This breaks sanitychecks in CI. The early_sleep kernel test case is failing
randomly.

Change-Id: I4b21f926198af9f0703f042fc170226ed6ab4331
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 22:09:31 +00:00
Juan Manuel Cruz 83cbf63431 debug: sanity test for kernel object tracing
Adds the sanity test to integrate the kernel object tracing
API. The test implements the philosophers demo and adds
an additional test thread that uses the kernel object tracing
API and test for the correct output.

Change-Id: I2f01f7b3386afd4783ae58b5311eb7d6ee5a3cea
Signed-off-by: Juan Manuel Cruz <juan.m.cruz.alcaraz@intel.com>
Origin: Original
2016-03-11 22:07:15 +00:00
Anas Nashif f9d1d56153 sanitychecks: skip early_sleep test
Test fails in CI, disabling until we have a resolution.

Change-Id: Ie8e1ca00b08238c2c2a4feefbe08140c762e6d2f
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-11 11:40:49 -05:00
Dmitriy Korovkin b1a0041de6 tests: Add test for microkernel early sleep functionality
Test verifies that a task_sleep() function can be used during the system
initialization, then it tests that when the k_server() starts, task_sleep()
call makes another task run.

For fibers, test that fiber_sleep() called during the system
initialization puts a fiber to sleep for the provided amount of ticks,
then check that fiber_sleep() called from a fiber running on the
fully functioning microkernel puts that fiber to sleep for the proiveded
amount of ticks.

Change-Id: Ibe20ca1ca966575aaaad0b6ffd66ca43512801f0
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
2016-03-10 18:39:33 +00:00
Anas Nashif e81053ee03 samples/tests: remove old message about standard security
Change-Id: I52bb6731a8c7b2c3ba38b867ac57ff82332ae7f2
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-03-07 16:07:35 +00:00
Andrew Boie 7393a00a5f test_bitfield: exercise sys_*_bit and sys_bitfield_*_bit
Origin: original code
Change-Id: I16c324e1124a58d77386236f4c0cc597041c220e
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2016-03-04 15:12:07 +00:00
Peter Mitsis e0f8162a8b test: Add nanokernel test_sleep project
The 'test_sleep' nanokernel project tests the following functionality:
   1. Normal expiration of fiber_sleep()
   2. Waking a sleeping fiber via fiber_fiber_wakeup()
   3. Waking a sleeping fiber via isr_fiber_wakeup()
   4. Waking a sleeping fiber via task_fiber_wakeup()
   5. Normal expiration of task_sleep()

Change-Id: Ie51997ace9a4413f62d77daacd6dff97b6b3a4dd
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Peter Mitsis 06e2b4e129 nanokernel: Change fiber_delayed_start() return type
Instead of returning a 'void *', the nanokernel fiber_delayed_start()
family of routines now return a handle of type nano_thread_id_t.

Consequently, the nanokernel fiber_delayed_start_cancel() family of
routines now accept a parameter of type nano_thread_id_t instead of
'void *'.

The complete list of affected nanokernel routines is:
    fiber_delayed_start()        fiber_delayed_start_cancel()
    fiber_fiber_delayed_start()  fiber_fiber_delayed_start_cancel()
    task_fiber_delayed_start()   task_fiber_delayed_start_cancel()

Change-Id: Ibd4658df3ef07e79a81b7643a8be9ea5ffe08ba0
Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
2016-02-23 10:48:54 -05:00
Anas Nashif 1e57226ae6 boards: remove obsolete CTB board
This board is not supported and not available for general public.
Use the Quark SE CRB/Devboard instead.

Change-Id: Id0f8c08bbacb812ef00fe9502b4acecf4f31ffd7
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-17 17:07:08 +00:00
Anas Nashif 2250c4d397 tests: test_fifo: unify nano and micro tests into one directory
Manage this test using one testcase.ini for both nano and micro
kernel cases.

Change-Id: I9757299cdced17e7fcbfa1fbbbcf87693b48bf41
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif d746f2726f test_rand32: only microkernel version exist
eliminate one directory level since we only have one kernel variant.
Remove one level in the hierarchy.

Change-Id: I0924b5a40357b1a892f7ed3ecf512f617edc99a3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 7e44279399 test_ring_buf: only nanokernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I53dc387c15c6a6efc74f88c477015b2e422c5d6c
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif bc19b72974 test_task_priv: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I72597e8253d027cd134dd58cc3051f21dce376d0
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 1642796202 test_task_irq: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: Ia9f457db372729f403be24c7a502a896623db5b9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 8bbf02d3f3 test_task: only microkernel version exist
eliminate one directory level since we only have one kernel variant.

Change-Id: I7d7c31e7dc5b98ad8ea0ad9e17a05694ac89770a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 65f538238b move driver samples to samples/drivers
All SoC specific driver tests go to samples/drivers.

Change-Id: Ia9aa2140465320a548504ddb7a44569e2d2af6bd
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 13:08:44 -05:00
Anas Nashif 8290b4c795 move include directory for tests cases to tests/
Make the test case routines reside under tests.

Change-Id: Iea59a68e8b537954250d63923a88df267639e716
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:08:08 +00:00
Anas Nashif 13b3727e6e tests: move kernel tests to tests/
Move all kernel testcases to tests/ and change Makefiles
accordingly where applicable.

Change-Id: I130cc3919174e93b7130d55fb101bed1d5d7552d
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-11 18:06:33 +00:00