Commit Graph

71 Commits (f69531e82fb683a4476afd9154742558b14561ca)

Author SHA1 Message Date
Brian Daniels 631e5ebdee Modifying echo test to be driven more from the device.
Previously, the echo test followed a flow like the following:

-STEP-	-HOST PC-                  -DEVICE-
0	send _sync
1				   echo back _sync
2				   send echo_count
3	echo back echo_count
4	send first echo packet
5				   echo back echo packet
	(repeat echo steps)

However, as noted by issue #6659, this test would somtimes fail between
steps 4 and 5. To ensure each KV pair makes to the correct destination,
we usually write the KV back. Step 4 does not wait for this to happen
and starts sending echo packets. So the device is acting as the "echo
server".

This change makes the host PC the "echo server". The idea being that the
device will be slower and the host pc should always be able to keep up
with it, not the other way around.
2018-04-23 17:56:13 -05:00
Deepika bf0393aaa9 Added test for MbedCRC.h 2018-03-23 14:54:24 -05:00
Filip Jagodzinski 82f781ce3d Tests: Drivers: Timeout: Update unit tests
Added unit tests for Timeout API.
Added unit tests for LowPowerTimeout API.
Moved all existing test cases to a header file.
2018-02-28 17:27:46 +01:00
Cruz Monrreal 3d37d819e9
Merge pull request #5046 from fkjagodzinski/timerevent_tests
TimerEvent tests
2018-02-26 15:02:52 -06:00
Filip Jagodzinski 44c4583f2a Tests: Drivers: TimerEvent: Add tests 2018-02-23 09:13:37 +01:00
David Saada 0aeeece97d FlashIAP driver modifications:
- Support programming across sectors.
- Support program size not aligned to page size.
- Fix validations on sector erase.
2018-02-22 22:48:29 +02:00
Maciej Bocianski 143765137e test-mbed_drivers-ticker: improve two ticker test accuracy
test_case_2x_callbacks test was redesigned to eliminate ticker rescheduling and improve time mesure accuracy.

Constant ticker rescheduling (detach()/attach_us() calls)
was causing the gap between consecutive callback calls was not exact 1ms
but 1ms + time needed to call the callback and attach new one.
New design just uses two tickers to update counter alternatively every 1ms without rescheduling them
2018-01-30 13:40:56 +01:00
Maciej Bocianski dd84c0bc5f test-mbed_drivers-ticker: fix ticker cross attach
This commit fixes ticker cross-schedule bug in test_case_2x_callbacks subtest

In effect of this bug:
    ticker_callback_1_switch_to_2 was called only once
    ticker2 was never been fired because it was repeatedly detached just before fire and attached again
2018-01-30 13:01:11 +01:00
Przemyslaw Stekiel a25bf8fbc1 Add RTC time test. 2018-01-24 10:47:34 +01:00
Jimmy Brisson c00efaec44
Merge pull request #5737 from jeromecoutant/PR_LP_TIMER_TEST
lp_timer test : add a minimum delta value
2018-01-04 10:03:53 -06:00
jeromecoutant 9a43912177 lp_timer test : add a minimum delta value 2018-01-03 15:37:19 +01:00
Maciej Bocianski cc580d7532 mem_trace tests refactoring 2017-12-22 07:56:56 +01:00
Russ Butler 1faf46e161 Fix deficiency in the race test
The test for construction of local static objects doesn't check
to see if the object returned has been fully initialized. Because
of this, an error with ARMCC was not detected.

This patch adds an assert to the race_test to ensure that the
object has been properly initialized.
2017-12-01 10:49:50 -06:00
Martin Kojtal 56aa7c396f
Merge pull request #5261 from maciejbocianski/ticker_tests2
Extends test set for Ticker class
2017-11-16 16:23:35 +00:00
Martin Kojtal eb5d3fffff
Merge pull request #5403 from mprse/timer_test_delta_fix
Provide fixes for Timer and LowPowerTimer tests.
2017-11-16 16:19:24 +00:00
Przemyslaw Stekiel 78e1362ec0 Provide fix for Issue #5468.
Issue: https://github.com/ARMmbed/mbed-os/issues/5468
Increased DELTA value for Timer and Low Power Timer tests.
2017-11-13 11:03:29 +01:00
Przemyslaw Stekiel d962f67ca2 Move Timer test, modify ASERT macros, fix comments.
Move Timer test to TESTS/mbed_drivers/ directory which is more suitable.
Fix few comments which are incorrect.
Use more relevant ASERT macros.
2017-11-13 10:43:26 +01:00
Przemyslaw Stekiel d49899a6e2 Provide fix for Timer and LowPowerTimer tests (time accumulation).
LowPoterTimer test gives sometimes failed result while testing measured time accumulation. The check which verifies if total number of elapsed milliseconds is valid fails. Test assumes that delta value equal to 1 ms is sufficient for all test cases, which is not true since in case where time measurement is performed few times in sequence the measurement error also accumulates and 1 ms might be not enough. To solve this problem delta value for milliseconds tests must be updated.
2017-11-13 10:12:11 +01:00
Jimmy Brisson 1454e6b54b
Merge pull request #5047 from maciejbocianski/lp_ticker_tests
Test set for LowPowerTicker class
2017-11-02 10:37:00 -05:00
Maciej Bocianski 9bf936cb49 race test: fix out of memory problem for NUCLEO_F070RB 2017-10-25 09:40:05 +02:00
Maciej Bocianski aaa15bcf58 Extends test set for Ticker class (round 2) 2017-10-19 15:12:44 +02:00
Jimmy Brisson 23be7a814d Merge pull request #5074 from mprse/lp_timer_test
Add Low Power Timer test.
2017-10-13 09:21:46 -05:00
Jimmy Brisson 84f2d089f4 Merge pull request #5147 from 0xc0170/fix_deepsleep_tests
Test: deepsleep() API replacement
2017-10-13 09:19:41 -05:00
Maciej Bocianski 9fb4fd017a Test set for LowPowerTicker class 2017-10-11 15:01:15 +02:00
Przemyslaw Stekiel 34a03267d8 Add Low Power Timer test. 2017-10-11 14:55:34 +02:00
Jimmy Brisson df88a9dcc2 Merge pull request #5272 from studavekar/echo_test_fix_handshake
Fix echo test handshake and reduce uart load
2017-10-09 13:05:03 -05:00
Martin Kojtal 943fc32c73 Merge pull request #5255 from c1728p9/fix_ticker_test
Prevent use of deleted ticker in Ticker test
2017-10-09 14:05:22 +01:00
Shrikant Tudavekar c5621b9eb3 fix echo test handshake and reduce uart load
1) if we receive more than one __sync, previous handshake would consider
it as echo_count and try to decode the value. Now we skip superfluous __sync.

2) reduce the uart load produced by the test, as we are heavily running tests in
parallel and not one-to-one this update was required.
2017-10-08 11:21:17 -05:00
Martin Kojtal b30c622522 Test: deepsleep() API replacement
Use sleep() as entry function + check to be certain we
are entering deepsleep when required by test (should be allowed)
2017-10-05 16:43:57 +01:00
Jimmy Brisson 4dff32ab5a Merge pull request #5220 from c1728p9/sleep_lock_fixes
Fix deep sleep lock bugs
2017-10-05 10:03:44 -05:00
Russ Butler ad0b11565c Prevent use of deleted ticker in Ticker test
In test_case_2x_callbacks two tickers are setup to repeatedly
reschedule each other. When these tickers are deleted this
rescheduling is still occurring and can lead to a deleted ticker
being scheduled.

When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context

Note - this problem was not detected by CI since the test reported
the correct results back to the host test and only experienced this
error on tear down.

This problem can be reproduced on an nrf51 by first building the ticker
test with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker
--compile -DMBED_TRAP_ERRORS_ENABLED=1
-DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1"

And then running testing with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"
2017-10-04 16:07:41 -05:00
Russ Butler d910dc5bc4 Revert #5006 - Extends test set for Ticker class
This commit reverts commit c1c0f1ea57
because it causes nightly builds to fail. This is because extra tests
added in tests-mbed_drivers-ticker fail on some targets, such as the
KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
2017-10-03 11:44:24 -05:00
Russ Butler ea468856c4 Add a test to validate locking
Test that DeepSleepLock and Timer lock deep sleep at the correct time
and do no leave sleep locked after they are destroted.
2017-10-02 11:35:03 -05:00
Jimmy Brisson 90e5483bbe Merge pull request #5006 from maciejbocianski/ticker_tests
Extends test set for Ticker class
2017-09-29 10:06:14 -05:00
Martin Kojtal b72bd08644 Merge pull request #4965 from deepikabhavnani/IAR_heap_stats
Add heap stats for IAR
2017-09-22 11:34:47 +01:00
Deepika 459e7d4725 IAR heap stats added 2017-09-18 10:24:01 -05:00
Russ Butler 47b0f31d32 Remove direct use of us and lp ticker from tests
Remove the direct use of the microsecond and low power ticker from
the tests. This enforces that sleep mode is properly locked when
using timers. Furthermore, this prepares the codebase for new ticker
changes which allow differing clock frequencies and timer bit widths.
2017-09-13 20:11:39 -05:00
Maciej Bocianski c1c0f1ea57 Extends test set for Ticker class 2017-09-12 16:04:52 +02:00
Anna Bridge 2955a0adc6 Merge pull request #5063 from 0xc0170/fix_lpticker_test
Fixing lp ticker and sleep manager tests
2017-09-11 22:28:52 +01:00
Russ Butler 30450d40d6 Decrease error in Timeout test due to ISR latency
Increase the Timeout period from 1ms to 10ms so interrupt latency has
1/10th the effect on the measurement. This prevents failures due to
interrupt latency causing a drift.
2017-09-09 20:43:36 -05:00
Russ Butler d9aff6f0dd Prevent deeps sleep in regular sleep test case
Lock deep sleep before calling sleep to prevent the device from
entering deep sleep mode.
2017-09-09 20:43:35 -05:00
Deepika 5875569070 Added function header for stl test 2017-09-06 09:51:16 -05:00
Laurent MEUNIER be7fa925ad TESTS: flashiap: Add condition to check error on unaligned access
In case the target supports a page size of 1 byte, i.e. is able to
program flash 1 byte at a time, which is the case of STM32 F4 targets,
there is no reason for flash_device.program to return an error when
trying to write on an "unaligned" address.
2017-08-28 16:21:18 +02:00
Shrikant Tudavekar 8a4dbff8d6 validate base_time key received
This is required as greentea can send multiple __sync packets and cause the
to be in unexpected state.
2017-07-05 12:37:41 -05:00
Shrikant Tudavekar 73907259d9 Increased stack to 1024 from 768 and corrected assert.
1) mbed-os-tests-mbedmicro-rtos-mbed-basic tests use to fail when run in loop
after 20-25, This was because the stack used by test application was in range of
744-840 bytes. So bumped the stack size to 1024 bytes.

2) Corrected the assert and taken out the assert which was not required.
2017-06-22 18:25:39 -05:00
studavekar 12fe3415bc Deprecate testcases related to time drift.
1) RtosTimer is been Deprecated by EventQueue.
2) wait_us testing can't be reliably tested.
2017-06-22 18:25:38 -05:00
studavekar 0f55193df8 Update timing tests to be robust.
In the new approach the host controls the device activity when the test
should start, finish and pass/fail status is send to device. Also deprecate
the test cases which can't accurately test.
2017-06-22 18:25:16 -05:00
Martin Kojtal 7aea3bc43e race tests: fix unsupported condition
Should be true if single thread is defined, then its not
supported.
2017-05-25 14:47:28 +01:00
Bartek Szatkowski 6a0fcd3c58 Reduce test overhead in preparation for CMSIS 5
Reduce RAM consumption so all tests can still be built when using
CMSIS/RTX5. Also reduce clutter by removing the per target stack size
defines in the tests.
2017-05-14 19:25:19 -05:00
Martin Kojtal 84eddd01c1 tests: race test - add not supported for single threaded env
Fixes #4196. As someone might not be aware that settting default_lib to small has
some implications regarding thread safety, therefore we print an error.
2017-04-20 10:53:01 +01:00