Commit Graph

521 Commits (mbed-os-5.9)

Author SHA1 Message Date
Jarno Lamsa 7fd1bdf353 Add tests for synchronous dns 2018-09-07 17:28:57 +01:00
Juha Ylinen 257df50d6a Update Greentea EMAC tests
Increase timeout for EMAC tests. Old timeout (600 seconds) was not
enough for slower devices to complete the tests.

Check that connection was successful when running test case
emac_test_initialize.
2018-09-07 17:28:57 +01:00
Ben Cooke 440983f3fd Increase max func exec time to allow slower sys clock 2018-09-07 17:28:57 +01:00
David Saada 93b3991cc0 RTOS threads test: Handle out of memory cases 2018-08-23 19:13:46 -05:00
Mika Leppänen 4be46273b9 Moved ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT under mbed extended tests
Test is giving problems in some networks. Could be that DNS server
is regarding repeated DNS enquiries on the test to be caused by
malfunctioning device.
2018-08-23 17:16:59 -05:00
Maciej Bocianski 972f450013 tests-mbed_drivers-timer: change delay method 2018-08-23 16:58:02 -05:00
jeromecoutant 21f88d56b0 Timeout tests : unstable result
RTX waits, such as sem.wait(N), delays for between N-1 and N cycles.
As lp_ticker is not so accurate as us_ticker,
sometines, wait is expiring just before the lp_timeout.
2018-08-23 16:57:56 -05:00
David Saada f7b83f6e81 FlashIAP: Add timing test 2018-08-13 14:44:27 +01:00
David Saada 57bd7109f8 Skip a few tests if not enough memory can be allocated for them. 2018-08-13 14:44:27 +01:00
Mika Leppänen 2a16bae7a4 Removed device emac check from emac greentea tests
DEVICE_EMAC is defined only for boards with default Ethernet emac.
It is not defined for example for Realtek RTL8195AM board that
does not have Ethernet. Removed the check for device emac from emac
greentea tests.
2018-08-13 14:44:27 +01:00
Veijo Pesonen 5e8fa8b394 Makes Greentea TCP test cases to timeout less in connection errors
Made to prevent timeout if a single test case fails. The goal is that
each test case might wait only half of the remaining time reserved for
running TCP test cases.
2018-07-30 10:47:19 -05:00
jeromecoutant 6064af0434 Systimer test : compilation error with MBED_TICKLESS
Issue occurs when "MBED_TICKLESS" is added in mbed_app.json,
not when "MBED_TICKLESS" is added in targets.json
2018-07-30 10:41:43 -05:00
ccli8 255105553c Fix some targets fail to pass ticker overflow test
In mbed-os-tests-mbed_hal-common_tickers/Microsecond ticker overflow test, some targets
would fail to catch specified ticker value near overflow in time and so fail. This commit
alleviates the issue by checking ticker value range rather than one exact ticker value near
overflow.
2018-07-27 13:43:58 -05:00
ccli8 974c52b416 Fix Greentea test code with Cortex-M23/M33
Enlarge stack size of forked thread for Cortex-M23/M33 targets
2018-07-27 13:30:07 -05:00
Deepika 62990b487d Update stats to fetch Mbed OS version info 2018-07-15 22:54:26 -05:00
Przemyslaw Stekiel 4d31fcbd0c tests-mbed_hal-lp_ticker: change implementation of the delay before deep-sleep.
Serial buffer must be flushed before entering deep sleep mode. In the test this is done by the additional delay which is implemented on the busy loop which decrements given value down to 0 (`void wait_cycles(volatile unsigned int cycles)`). This solution is not appropriate since it is very target specific and the cycles value has been already increased few times. Additionally very big number of loop cycles which is suitable for fast targets may take much longer on slower boards and results in test timeout.
It has been verified that 20ms is sufficient delay for the green-tea transmission. In this test we cannot simply use `wait_ms(20)` since this potentially may put board to sleep and wake up using lp ticker. The test re-initialzies the lp ticker(disables ticker interrupt) and this operation may break the schedule and time tracing by the upper layer. But we can use us ticker which is not affected by this test. The solution is to add a delay routine based on busy loop and us ticker only. This way are able to wait exactly 20 ms.
2018-07-15 22:54:26 -05:00
Przemyslaw Stekiel b305890fc7 tests-mbed_drivers-lp_timer: change delay method
The test sometimes fails on NRF51_DK (test case: "Test: LowPowerTimer - time measurement 1 ms.") in morph tests.

The test verifies if LowPowerTimer class correctly counts elapsed time. Sometimes we got measured ~1600 us for delay 1000 us (delta 550 us).
The delay is performed using `wait_us()` function which for delays greater than or equal to 1 ms (our case) calls `Thread::wait((uint32_t)ms);`. This causes rescheduling and potentially can put board into sleep (deep sleep mode is disabled by `wait_us()`). For our test purposes we don't need rescheduling/sleep since this actions takes extra time and have influence on the time measurement accuracy.
The solution is to implement function for delay which is based on busy loop and uses us ticker. It has been verified that this solves the problem. With this fix when measurement of 1 ms is repeated 1000 times we got usually measured time equal to ~1080 us, and sometimes ~1300us (checked that this is caused by systick interrupt handling). Since this is test for drivers layer and the results are acceptable I decided to not disabling systick in the test).
2018-07-15 22:53:59 -05:00
Maciej Bocianski cef5dbb22e add kernel ticker test 2018-07-15 22:53:30 -05:00
ccli8 65a15a3dd3 Fix Greentea test code
Mark mbed-os-tests-mbed_hal-common_tickers/time_cpu_cycles not in-lined.
Otherwise, time_cpu_cycles may be in-lined somewhere and takes different
CPU cycles on invocation.
2018-07-15 22:53:03 -05:00
Senthil Ramakrishnan 06b1ae5129 Limit error filename capture to 64 chars, wrapping tests with right configs and astyle fixes. 2018-06-29 17:10:17 +01:00
Senthil Ramakrishnan f3406d24fc Updates to configuration flags used in error handling implementation. The new configuration make Error history tracking switched off by default and enabled by using the config flag MBED_CONF_PLATFORM_ERROR_HIST_ENABLED. Config flag MBED_CONF_PLATFORM_ERROR_ALL_THREADS_INFO enables printing info of all threads. This will be turned off by default. 2018-06-29 17:10:17 +01:00
Juha Ylinen 4affb4dbc5 Update Greentea netsocket and wifi tests
Increase timeout for netsocket TCP and UDP tests. Old timeout
(240 seconds) was not enough for slower devices to complete the
tests.
Accept error codes NSAPI_ERROR_CONNECTION_TIMEOUT and
NSAPI_ERROR_NO_CONNECTION when running test wifi_connect_secure_fail
2018-06-29 17:10:17 +01:00
ccli8 7339fa0dea Enlarge wait time for flushing serial buffer in Greentea test code
Original wait time is not enough for UART to flush out before deepsleep on some targets.
2018-06-29 17:10:17 +01:00
Mika Leppänen 3e4076a5a5 Asynchronous DNS greentea tests
Added tests for asynchronous DNS.
2018-06-29 17:10:17 +01:00
ccli8 e5c9a095c6 Enlarge wait time in Greentea test function test_deepsleep
Original wait time is not enough for UART to flush out before deepsleep on some targets.
2018-06-29 17:10:17 +01:00
Mika Leppänen 9fdb9a1ac7 Added long echo sequence test to EMAC tests
Test echoes 50000 random length ethernet frames between CTP echo
server and device.
2018-06-29 17:10:17 +01:00
Jarno Lamsa 8cc8b813f1 Tolerate packet loss up to 30% in udp echo tests 2018-06-29 17:10:17 +01:00
Maciej Bocianski 14c75c584f fix and enable sleep_usticker_test
Increases tolerance value for sleep_usticker_test to cover extra time needed
for cpu stats computation (for more details see MBED_CPU_STATS_ENABLED).
Prevent scheduling interrupt during ticker initialization (in lp_ticker_init)
while test execution.
2018-06-15 13:30:56 +01:00
Maciej Bocianski 393424262f enable HAL sleep test 2018-06-15 13:30:56 +01:00
Maciej Bocianski 8b3ae8dea4 HAL sleep test fix
Prevents ticker upper layer initialization during test execution
2018-06-15 13:30:56 +01:00
David Saada 688268328d Fix flash_program_page API in LPC boards.
This API allocates a program buffer of 256 on the stack to ensure alignment.
However, FlashIAP driver already ensures this alignment of the user data.
2018-06-15 13:30:56 +01:00
Cruz Monrreal 754e18f335 Only exclude RTOS-specifc tests in error_handling
Allows for other tests to run if no RTOS is present.
2018-06-15 13:30:56 +01:00
Cruz Monrreal 4c3012ccd6 Wrapped test around MBED_CONF_RTOS_PRESENT
Wrapping a #define to prevent test from being run when no RTOS is present.
2018-06-15 13:30:56 +01:00
Cruz Monrreal bed820734c Corrected casting issue with an assert within the error_handling test
Discovered via https://github.com/ARMmbed/mbed-os/pull/7105.
If both values are negative values, they are casted in such a way that -1 != -1. This small commit fixes that.
2018-06-15 13:30:56 +01:00
Przemyslaw Stekiel 592ec6fdd0 HAL CRC test: Fix out of memory issue on NULCLEO_F070RB, NULCLEO_F072RB/IAR
Allocate test case array on stack since memory limits on some boards.
2018-06-15 13:30:56 +01:00
Przemyslaw Stekiel 648710ba5a Add HAL CRC test and test header file. 2018-06-15 13:30:56 +01:00
Maciej Bocianski 8990f23e43 ticker test improvement
Make multiticker test more reliable when scheduling very early interrupts.
When very early interrupt is scheduled (e.g now + 2[ticks]) then it's likely
that it won't be fired in some circumstances and as a result there is overdue
event in queue. That overdue event can be mistakenly scheduled again by
`Ticker::detach` (detach calls schedule if head was removed). That's why we
should check interrupts counter immediately after wait period and before detach loop
2018-06-15 13:30:56 +01:00
Mika Leppänen b1faa8f31d Changed TCP socket test to use shared buffers
Changed RX and TX buffers used in TCP socket tests to global variables
to conserve memory.
2018-06-15 13:30:56 +01:00
Mika Leppänen 4d3921d498 Updated EMAC test environment for LPCxx boards
Updated EMAC memory manager to use libservice nsdynmemlib
for EMAC memory buffers. Located the nsdynmemlib buffer heap
to DMA safe memory bank on LPCxx boards. Optimized placement of
static variables on EMAC test environment for LPCxx boards to
maximize available memory.
2018-06-15 13:30:56 +01:00
Juha Ylinen 8dbd41c57f Add targets to Greentea EMAC tests
Update test configuration file for WicedInterface
2018-06-15 13:30:56 +01:00
Marc Emmers 32ecbb71b5 Ticker test: Add ticker_irq_handler call because the time reaching the previous interrupt_timestamp would have triggered one anyway 2018-06-15 13:30:56 +01:00
Kimmo Vaisanen e1288ab6c2 Lora: Add greentea tests for LoRaRadio API
This LoRaRadio test set adds basic tests which can be run with a single HW.
2018-06-15 13:30:56 +01:00
Veijo Pesonen 67a329f382 Makes UDPSOCKET_SENDTO_INVALID part of the netsocket extended test set 2018-06-15 13:30:56 +01:00
Wilfried Chauveau 5c8236e78b set the tolerance to 5% if NO_SYSTICK is enabled 2018-06-05 15:05:18 +01:00
deepikabhavnani 39a08f7e20 OS version is not available in code, need a fix for this in next patch release 2018-06-05 15:05:18 +01:00
Przemyslaw Stekiel c181003702 tests-mbed_hal-common_tickers: Fix increment test case implementation
In case when base tick count is different than next tick count check first if the difference is equal to 1 tick (this is what we are looking for) if not then decrease the tick count.

Repeat counting process few times before incrementing the number of cycles in case when base tick count is equal to next tick count.
2018-06-05 15:05:18 +01:00
Martin Kojtal 501a7b6949
Merge pull request #7009 from bulislaw/merge_feature_branches_for_5.9
Bring in improved HAL APIs to master
2018-05-28 12:31:14 +02:00
Bartek Szatkowski 4ae6491fd5 Disable sleep tests as they are unstable 2018-05-27 23:31:20 -05:00
Bartek Szatkowski 817bf0b092 Disable intermittently failing sleep test 2018-05-27 23:31:20 -05:00
Bartek Szatkowski a305d849a8 Rename LOWPOWERTIMER to LPTICKER 2018-05-25 13:06:56 -05:00