Commit Graph

57 Commits (107d6336b2030f0e2b1e2e3aa5d99df2eb0a575f)

Author SHA1 Message Date
Mike Fiore 1b4a1b11e1 fix RTOS unit tests for MultiTech xDot platform - increase stack sizes in tests 2016-10-03 12:41:52 -05:00
Sam Grove 7f8cadae7f Merge pull request #2869 from geky/callback-fix-overloads
callback - Remove problematic callback overloads
2016-09-30 15:39:13 -05:00
Sam Grove 20756cbf77 Merge pull request #2860 from ARMmbed/event_loop_mbed_events_new
Event loop with mbed-events
2016-09-30 15:24:24 -05:00
Bogdan Marinescu f16342f321 Removed allocate_failure_test1 from equeue tests
This tests doesn't run on some MCUs with low RAM. According to @geky:

"We may want to omit this test (allocate_failure_test1) for now. It has
had other problems such as overflowing stacks, and allocation failure is
also tested by allocate_failure_test2."
2016-09-30 17:01:23 +03:00
Andres AG d6f40b6e89 Port mbedTLS entropy and sha selftest to mbedOS 2016-09-30 11:24:49 +01:00
Christopher Haster c18e1786cd callback - Updated tests based on argument order 2016-09-29 16:55:49 -05:00
Bogdan Marinescu e7abc11f59 Added mbed-events library
Added mbed-events from https://github.com/ARMMbed/mbed-events. Changes
from upstream:

- the whole code is licensed under the Apache license. Sources and
  headers were updates with this information.
- removed the porting layers for Windows and FreeRTOS and the references
  to these porting layers in equeue_platform.h.
- moved the TESTS directory in mbed-events to the TESTS directory of
  mbed-os.
2016-09-29 18:44:09 +03:00
Sam Grove 48ac4aec25 Merge pull request #2830 from jeromecoutant/PR_L073RZ
[STM32L073RZ] update OS5 RTOS tests
2016-09-28 15:00:27 -07:00
Sam Grove ab3e77f50a Merge pull request #2826 from jeromecoutant/PR_F410RB_THREAD
[STM32F410RB] update OS5 RTOS thread test
2016-09-28 14:59:29 -07:00
Sam Grove 28a4b3e03a Merge pull request #2781 from jeromecoutant/PR_RTOS_Tests_clean
Clean RTOS tests after PR #2648
2016-09-28 14:58:43 -07:00
jeromecoutant 1d6d554717 Clean RTOS OS5 tests 2016-09-27 17:26:03 +02:00
jeromecoutant 17c1d97f01 [STM32L073RZ] update OS5 RTOS tests 2016-09-27 16:58:23 +02:00
jeromecoutant 2db0938d67 [STM32F410RB] update OS5 RTOS thread test 2016-09-27 15:04:27 +02:00
jeromecoutant 52f70b06d0 [STM32F091RC] patch for tests-mbedmicro-rtos-mbed-threads 2016-09-27 10:59:34 +02:00
jeromecoutant c416a1286d [NUCLEO_F103RB] RTOS tests update
As this target has 20K RAM, default stack size needs to be tuned
2016-09-22 14:48:11 +02:00
Sam Grove a994f47da9 Merge pull request #2640 from jeromecoutant/PR_F0_RB
[NUCLEO_F072RB-NUCLEO_F070RB] RTOS issues
2016-09-22 00:47:14 -05:00
jeromecoutant dc8957a046 STM32F070RB/STM32F072RB: issue with some mbedmicro-rtos-mbed tests
Status is now OK
2016-09-19 10:17:56 +02:00
Simon Hughes 5e22db842f This commit includes the following CFSTORE/Flash-Journal/Storage updates and fixes:
- flash-journal basicAPI fix for ARM toolchain
- Updated storage-abstraction with version 0.4.7
  (commit c7c4a8c52298bbc006a6f53a059fb2599cad73cc).
- https://github.com/ARMmbed/storage-volume-manager at version v0.2.10.
- https://github.com/ARMmbed/mtd-k64f v0.4.2 version of flash.c (imported as storage_driver.c).
- update to CFSTORE to use the storage-volume-manager API to initialize volume manager and
  add a volume for CFSTORE to use.
- https://github.com/ARMmbed/flash-journal at version v0.5.3
  (commit 4c58165e2fa02c6ed2b9d166a9c96967e81f458f) including readFrom() support.
- Taking flash-journal-strategy-sequential v0.6.7 strategy.c
  (commit b11a718761aa9f33679956968a21aaef9179bde1).
- GCC_ARM, ARM and IAR compiler warning fixes for new versions of flash-journal code.
- Fix storage-volume-manager test cases for concurrent access from 2 volumes to use
  addresses within the 512-1024kB address range, which is within the cfstore added volume.
- Fix cfstore/storage-volume-manager IAR warnings when building with verbose flag.
2016-09-13 18:16:56 +01:00
Sam Grove 3806c8713b Merge pull request #2559 from pan-/utest_globals_optimizations
[utest]: Allow the linker to remove any part of utest if not used
2016-09-10 07:16:34 -05:00
Sam Grove 7dd1b04c2e Merge pull request #2651 from svastm/fix_lp_timer_test
Use lp_timer to count time in the deepsleep tests
2016-09-09 18:02:10 -05:00
Sam Grove 14f5647d62 Merge pull request #2643 from c1728p9/fix_thread_self_termination
Fix thread self termination
2016-09-09 18:01:38 -05:00
Sam Grove 0128dd2d8f Merge pull request #2562 from c1728p9/init_race_condition
Fix GCC lazy init race condition and add test
2016-09-09 17:59:37 -05:00
Sam Grove 3bb149cab2 Merge pull request #2549 from geky/thread-clarification
Clean up confusion with deprecated constructors and callbacks in thread-spawning functions
2016-09-09 17:58:13 -05:00
Sam Grove a6b27319ec Merge pull request #2496 from geky/callback-cv
Add cv-qualifiers to Callback and deprecate combinatorial explody functions
2016-09-09 01:45:25 +02:00
svastm cc55173329 Use lp_timer to count time in the deepsleep tests
Because microseconds timer can be disable during deepsleep
2016-09-08 18:09:45 +02:00
Russ Butler abbd71da9b Add test case for thread self termination
Test that thread self termination works.
2016-09-07 17:33:33 -05:00
Brian Daniels 1473240637 Fixing issue in timing host test and wait_us case
The timing host tests reported success even if the total drift was
negative. This adds a check for this now.

The wait_us test now does not use a timer and just waits for 100000 us
between prints. This adds inherent drift, but it should still be well
under the limit.
2016-09-07 09:14:17 -05:00
Brian Daniels 4f4112b18e Consolidating timer reads to reduce drift 2016-09-01 15:12:38 -05:00
Brian Daniels 07a23556a9 Reducing number of timeouts to decrease drift 2016-09-01 15:12:06 -05:00
Brian Daniels e678325730 Modifying timing tests to use timing drift host test 2016-08-30 14:53:18 -05:00
Brian Daniels f6c60d07ac Adding timing drift host test 2016-08-30 14:38:30 -05:00
Brian Daniels 6e223e311c Removing threaded_blink test (duplicate of basic rtos test) 2016-08-30 14:37:30 -05:00
Russ Butler 69431da0c7 Add a test to check for init race conditions
Test SingletonPtr initailization along the with lazy initailization
that is built into the C++ language itself.
2016-08-30 11:23:11 -05:00
Vincent Coubard a9d9987d7c Fix a rare case of imcompatibility between base_control_t and control_t.
Both branches of a ternary operator should yield the same type;
compatibility is not enough in that case.
2016-08-30 13:29:19 +01:00
Christopher Haster 756a09003c Added explicit void specialization in callbacks
One limitation of C++ is that implicit casts do not occur when
matching template overloads, as a consequence the callback's
argument type requires a strict match.

Unfortunately, the prevents the previously common pattern of using
void pointers as function arguments, causing unnecessary problems
for users porting code.

        Thing *t;
        void doit(void *p) { blablabla }

        Callback<void()> cb(t, doit);

To avoid this, explicit overloads on void pointers were added. This
avoids a template expansion, and allows the implicit cast to occur
as the user would expect.
2016-08-26 12:50:13 -05:00
Christopher Haster 5c0f39f190 Split callback test into multiple tests based on types
As the templated tests grew, the resulting binary exceeded a
flash size of 64K. This caused the test to incorrectly fail on
small devices.

Moved and split into the following:
TESTS/mbed_functional/callback
TESTS/mbed_functional/callback_small
TESTS/mbed_functional/callback_big
TESTS/mbed_functional/functionpointer
2016-08-26 09:54:13 -05:00
Christopher Haster c71e67f2dc Updated minor functionality of the Callback class
- Marked `call` and `operator()` functions as const
- Moved to static_cast for internal function pointer to avoid losing
  compiler checked const-safety
- Added test for `operator=` with non-callback types
- Moved from zero-cast to value-initializer when callback is null
- Added `operator==` and `operator!=`
- Removed special handling of null callback
- Replicated doxygen to all overloads
- Added correct nops where uninitialized callbacks are called
- Added assertion for null callback
- Removed copy-constructor from callback constructor
2016-08-26 09:54:02 -05:00
Bogdan Marinescu 1e3cbc909b Added tests for the memory tracer 2016-08-26 09:42:40 -05:00
Christopher Haster 45d25ed493 Added support for cv-qualifiers in Callback class
Additionally, the following changes were don to avoid combinatorial
explosion in function overloads as a result of adding cv-qualifiers:
- Added convenience function for inferred type
- Deprecated callback overloads qhere cv-qualifiers are not scalable

Supported overloads:
callback(void (*f)(A...));
callback(const Callback<R(A...)> &);
callback(T *t,                void (*f)(T*, A...));
callback(const T *t,          void (*f)(const T*, A...));
callback(volatile T *t,       void (*f)(volatile T*, A...));
callback(const volatile T *t, void (*f)(const volatile T*, A...));
callback(T *t,                void (T::*f)(A...));
callback(const T *t,          void (T::*f)(A...) const);
callback(volatile T *t,       void (T::*f)(A...) volatile);
callback(const volatile T *t, void (T::*f)(A...) const volatile);
2016-08-26 09:40:22 -05:00
Sam Grove 3dac791b4a Merge pull request #2476 from bulislaw/lp_ticker
K22F/K64F: Add lp_ticker implementation and HAL lp_ticker tests
2016-08-25 09:19:18 -05:00
Bartek Szatkowski 7203be9e6f Add tests for LowPowerTimeout and lp_ticker 2016-08-25 13:25:02 +01:00
Russ Butler 6a31ffbf3e Heap statistics
Keep track of the current size allocated, maximum size allocated,
number of allocations, failed allocations and total size allocated for
both GCC and ARM. Report the maximum size allocated at the end of
testing.

Also, add a test to verify heap metrics are working as expected.
2016-08-22 18:32:51 -05:00
Martin Kojtal 64a30a0095 Merge pull request #2479 from geky/deprecated-until
Updated deprecation notices to match branch names
2016-08-18 09:06:39 +01:00
Martin Kojtal 8568c9eac8 Merge pull request #2394 from geky/deprecated-until
Add more well-defined garuntees on deprecation notices in mbed
2016-08-17 14:45:46 +01:00
Christopher Haster b12c27c5b4 Updated deprecation notices to match branch names
Example:

    MBED_DEPRECATED_SINCE("mbed-os-5.1", "don't foo any more, bar instead")
    void foo(int arg);
2016-08-16 20:30:20 -05:00
Christopher Haster 0f516aa8e0 Added more well-defined garuntees on deprecation notices in mbed
From the discussion on issue #2068:
Functions marked deprecated in the mbed library should notate when
the deprecation was started to allow efficient removal once a set
amount of time has expired.

Added the following macro:
MBED_DEPRECATED_SINCE("version", "message string")

Example usage:

    MBED_DEPRECATED_SINCE("v5.1", "don't foo any more, bar instead")
    void foo(int arg);

Adopted in existing deprecations:
- FunctionPointer
- RtosTimer
- Thread
2016-08-16 15:45:51 -05:00
Russ Butler 13c06850a2 Add a test for thread-safe malloc
Add a test to repeatedly malloc and free from different threads to
test if these functions are thread safe.
2016-07-29 20:14:07 -05:00
Vincent Coubard a7d1bf7364 Update thread stack size for NRF based targets in rtos tests. 2016-07-28 21:21:31 +01:00
Sam Grove c24e461be3 Merge pull request #2248 from pan-/define_stack_stize_for_RTOS_threads_test
Define stack size of the threads spawned by RTOS threads test.
2016-07-26 20:14:51 -05:00
Vincent Coubard 2099da6d58 Define stack size of the threads spawned by this test.
This stack size is adjusted for NRF51 and NRF52 based targets.
2016-07-25 23:56:14 +01:00