Commit Graph

1239 Commits (eda75fd02a27d0d26bbed4953abb19ed778a5a8c)

Author SHA1 Message Date
ccli8 87ca77bbfc Fix NUMAKER_PFM_NANO130 cannot pass mbed_hal/watchdog_reset test
On NUMAKER_PFM_NANO130 target, WDT's clock source is fixed to LIRC, which is much
less accurate than other targets. Enlarge delta define to pass this test.
2019-07-11 11:55:08 +01:00
ccli8 90c75f5d01 Enlarge wait time for flushing serial buffer in Greentea test code
Original wait time is not enough for UART to flush out before deepsleep/reset on some targets.
2019-07-11 11:55:08 +01:00
Filip Jagodzinski 008cd6453c Tests: Drivers: Reset_reason: Add tests 2019-07-11 11:55:06 +01:00
Filip Jagodzinski 9ed1209657 Tests: HAL API: Reset_reason: Add tests 2019-07-11 11:55:06 +01:00
Filip Jagodzinski 685efbde97 Tests: HAL: Watchdog: Fix timing accuracy test
Relax time measurement margins for UBLOX_EVK_ODIN_W2.
2019-07-11 11:55:05 +01:00
Filip Jagodzinski 91c9cb5c0f Tests: Drivers: Watchdog: Add tests 2019-07-11 11:55:05 +01:00
Filip Jagodzinski a129b57443 Tests: HAL API: Watchdog: Add time accuracy tests 2019-07-11 11:55:05 +01:00
Filip Jagodzinski 4f05912b99 Tests: HAL API: Watchdog: Add dev reset tests 2019-07-11 11:55:05 +01:00
Filip Jagodzinski a7734d0fc8 Tests: HAL API: Watchdog: Add tests 2019-07-11 11:55:04 +01:00
Russ Butler f71baa24be Remove FPGA analog out test
Remove the analog out test temporarily due to limitations of the
FPGA rev 2 hardware.
2019-07-11 11:41:30 +01:00
Neil Tuttle 7205238c3b Fix error in tests-mbed_drivers-ticker when LED not available 2019-07-11 11:41:30 +01:00
Przemyslaw Stekiel 05ff391030 FPGA SPI test: Fix typo 2019-07-11 11:41:30 +01:00
Przemyslaw Stekiel c4f9a8d566 FPGA SPI test: Fix unsupported transfer case
Co-Authored-By: Filip Jagodziński <fkjagodzinski@gmail.com>
2019-07-11 11:41:30 +01:00
Przemyslaw Stekiel 37dcf826c3 Extend FPGA SPI test
Add test cases for:
- async mode,
- different frequencies,
- block write
2019-07-11 11:41:30 +01:00
Neil Tuttle 5233eeae5b Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc 2019-07-11 11:41:30 +01:00
Russ Butler b0de32c07c FPGA test shield: Allow any defined form factor
Build in the FPGA tests if either MBED_CONF_TARGET_DEFAULT_FORM_FACTOR
or TARGET_FF_ARDUINO is defined.
2019-07-11 11:41:30 +01:00
Filip Jagodzinski 5a007262b4 FPGA test shield: Restrict tests to Arduino FF only
Currently only the Arduino form factor is supported. Support for other
form factors will be added in the future.
2019-07-11 11:41:30 +01:00
Russ Butler 6902844cf2 Skip form factor pins marked as NC
The gpio and gpio_irq FPGA tests run on form factor pins that are
marked as NC. This patch changes that behavior so they skip NC
pins.
2019-07-11 11:41:30 +01:00
Przemyslaw Stekiel 306ecbe9cc FPGA uart test: Remove unsupported test cases
Not all uart features are supported by specific platforms.
2019-07-11 11:40:55 +01:00
Przemyslaw Stekiel a887855250 FPGA Analogin test: Remove test case which can not be executed
The test case which checks full range cannot be executed at the moment due to a hardware bug in FPGA-Test-Shield.
This test case will be restored when the final version of FPGA-Test-Shield is ready.
2019-07-11 11:40:55 +01:00
Przemyslaw Stekiel cd1321d59f FPGA Analogout test: mark dead code as debug code, increase tolerance 2019-07-11 11:40:54 +01:00
Przemyslaw Stekiel dff4f3b536 FPGA Analogin test: Remove usage of FULL_TEST_SHIELD symbol, increase tolerance
Keep "AnalogIn - full test" disabled due to hardware issue in the first rev of FPGA Test Shield.
2019-07-11 11:40:54 +01:00
Przemyslaw Stekiel 2f90312547 FPGA I2C test update.
Divide one test case to four test cases to increase readability.
Adapted to the last version of the FPGA CI Test Shield API.
2019-07-11 11:40:54 +01:00
Przemyslaw Stekiel 7ae579b890 Bring FPGA-Test-Shield tests into Mbed-os master. 2019-07-11 11:40:54 +01:00
Kevin Bracey 0d12800b9f wait_us optimization
As the timer code became more generic, coping with initialization on
demand, and variable width and speed us_ticker_api implementations,
wait_us has gradually gotten slower and slower.

Some platforms have reportedly seen overhead of wait_us() increase from
10µs to 30µs. These changes should fully reverse that drop, and even
make it better than ever.

Add fast paths for platforms that provide compile-time information about
us_ticker. Speed and code size is improved further if:

* Timer has >= 2^32 microsecond range, or better still is 32-bit 1MHz.
* Platform implements us_ticker_read() as a macro
* Timer is initialised at boot, rather than first use

The latter initialisation option is the default for STM, as this has
always been the case.
2019-07-11 11:40:54 +01:00
Maciej Bocianski cae15715f9 usb_device-msd test: OS type detection fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski 7d0e7a65c7 usb_device-msd test: astyle fix 2019-07-11 11:40:53 +01:00
Maciej Bocianski b28c37684f usb_device-msd test: docs update 2019-07-11 11:40:53 +01:00
Maciej Bocianski 8a667702da usb_device-msd test: disable host side unmount on windows machines 2019-07-11 11:40:53 +01:00
Maciej Bocianski faa3fb5438 usb_device-msd test: improve error handling 2019-07-11 11:40:53 +01:00
Maciej Bocianski b4e2ea63df usb_device-msd test: fix powershell unmount script issue
Running PowerShell script on some windows machines is blocked.
To avoid this problem script was replace by the code run directly in PowerShell console.
2019-07-11 11:40:53 +01:00
Filip Jagodzinski 5e9a2a7b2a Tests: SleepManager: Fix test_check for NRF5X
Add missing `lp_ticker_clear_interrupt()` in the interrput handler used
in `test_lock_unlock_test_check()` test.
Remove redefined `us_to_ticks()`.
2019-07-11 11:40:53 +01:00
Laurent Meunier b21d0de725 Update test_lock_unlock_test_check() assertion to cope with new timings
With the DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US increased,
we now have TEST_ASSERT_UINT64_WITHIN(delta=1000, expected=1000, actual=1000)
so this assertion needed to be updated.

What we need is the deep sleep to be enabled after the programed interrupt
has fired and before a 2ms timeout expiration, which means >= 1000 and < 2000.
2019-07-11 11:40:53 +01:00
Laurent Meunier 9aa859c68d Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
2019-07-11 11:40:53 +01:00
Przemyslaw Stekiel caed5aac99 Further modifications in Sleep Manager test.
Changes:
- restore the original form of setup/teardown handlers,
- test_lock_unlock_test_check(): do not use common ticker layer (Timer, Timeout). Use only ticker HAL layer.
- Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US delta.
2019-07-11 11:40:53 +01:00
Laurent Meunier d82346e5ca Remove unused variable
and avoid associated warning ...
2019-07-11 11:40:53 +01:00
Laurent Meunier 25e5f2c68c Fix compilation issue for targets without LPTICKER or USTICKER 2019-07-11 11:40:53 +01:00
Laurent Meunier 89602c87d3 Update HAL Sleep manager test to cope with STM32 LPTIM HW
In particular and as kindly suggested by Przemec S. :
1. Add setup/teardown handler’s for all cases. This disables sys-tick,
so there should be no unexpected lp ticker interrupt scheduling.
2. Modify setup/teardown handler’s: remove suspension of lp/us tickers,
so they can count as this is required by test_lock_unlock_test_check test
case.
3. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) after
setting interrupt to cope with STM specific handling (CMPOK interrupt with
deep-sleep locked). This performs wait only if needed and will not affect
other targets which do not need extra wait.
4. Move sleep_manager_lock_deep_sleep() after TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check())
5. Use TEST_ASSERT_TRUE(sleep_manager_can_deep_sleep_test_check()) in
test_lock_unlock_test_check to let lower layers manage deep sleep.
2019-07-11 11:40:53 +01:00
d-kato 099617dfd9 tests-mbed_drivers-crc: Increase the task stack 2019-07-11 11:40:52 +01:00
Laurent Meunier 7062d6ba7a Fixes in Sys Timer test
Do not call sleep from the test thread, but let scheduler do it.
And also include the deep sleep latency in the computation of the allowed
delta for deep sleep test case.
2019-07-11 11:40:52 +01:00
Filip Jagodzinski 771658953b Add a top level README file for USB tests
Add setup instructions and aggregate all the info from README files
related to USB testing.
2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel aba5ca72cd tests-mbed_drivers-lp_timeout: Rework "Zero delay" test case
Execute test case 100 times in loop since one run is not enough to catch possible failure.
2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel f1044a7de5 tests-mbed_hal-sleep: add exception for STM LPTIM targets.
On some targets like STM family boards with LPTIM enabled an interrupt is triggered on counter rollover.
We need special handling for cases when next_match_timestamp < start_timestamp (interrupt is to be fired after rollover).
In such case after first wake-up we need to reset interrupt and go back to sleep waiting for the valid one.

On some targets like STM family boards with LPTIM enabled there is a required delay (~100 us) before we are able to reprogram LPTIM_COMPARE register back to back.
This is handled by the low level lp ticker wrapper which uses LPTIM_CMPOK interrupt. CMPOK fires when LPTIM_COMPARE register can be safely reprogrammed again.
This means that on these platforms we have additional interrupt (CMPOK) fired always ~100 us after programming lp ticker.
Since this interrupt wake-ups the board from the sleep we need to go to sleep after CMPOK is handled.

Background:
There is an errata in LPTIM specification that explains that CMP Flag
condition is not an exact match (COUNTER = MATCH) but rather a
comparison (COUNTER >= MATCH).

As a consequence the interrupt is firing early than expected when
programing a timestamp after the 0xFFFF wrap-around.

In order to
work-around this issue, we implement the below work-around.
In case timestamp is after the work-around, let's decide to program the
CMP value to 0xFFFF, which is the wrap-around value. There would anyway be
a wake-up at the time of wrap-around to let the OS update the system time.
When the wrap-around interrupt happen, OS will check the current time and
program again the timestamp to the proper value.
2019-07-11 11:40:52 +01:00
Tymoteusz Bloch 4fe355e1d2 UDPSOCKET_ECHOTEST_NONBLOCK performance improvement. 2019-07-11 11:40:52 +01:00
Przemyslaw Stekiel 1a2af2c7b6 Disable time drifting test cases.
Time drifting test cases use serial communication with the host and are unstable on CI.
Skip time-drifting test cases if SKIP_TIME_DRIFT_TESTS macro is defined.
The idea for the future is to use FPGA test shield for timing tests instead of host scripts.

Also remove `__ARM_FM` macro which in most cases was used to disable time drifting tests. In other cases replace `__ARM_FM` with `TARGET_ARM_FM` which is more suitable.
2019-07-11 11:40:51 +01:00
Przemyslaw Stekiel 1ddebcd9b7 Fix GREENTEA_SETUP() call in not time drifting tests.
In these tests GREENTEA_SETUP() is incorrectly called with "timing_drift_auto" instead of "default_auto".
2019-07-11 11:40:51 +01:00
Teppo Järvelin 1a00c6dbe7 Fix networkinterface non-blocking status test
Fix was to add some time between iterations connect-disconnect.
In cellular disconnect, cellular network may send disconnect events
and if those events come when connect is already ongoing test will fail.
So wait a bit after disconnect so that disconnect events should be over.
2019-07-11 11:40:51 +01:00
Tymoteusz Bloch db83da69c1 Added hardcoded Echo server defaults for Greentea socket tests. 2019-07-11 11:39:48 +01:00
ccli8 81f117af35 Exclude mbed-hal-spm test for TrustZone chips
This is because for TrustZone chips like M23/M33, SecureFault is implemented in
secure-side and cannot pass on to non-secure side.
2019-07-11 11:39:48 +01:00
Maciej Bocianski d9e2930808 hal_qspi_test: undo buggy code
Remove some buggy code introduced to hal_qspi_test by PR #10435
Added support for QSPI to Cypress Boards
a8570ffe6c
2019-07-11 11:39:48 +01:00
Laurent Meunier 46860d14dd timeout_tests: do not call sleep from test thread
This is up to scheduler to call sleep when threads are inactive.
So the thread should simply wait for the semaphore for ever (or test timeout).
2019-07-11 11:39:48 +01:00
Lingkai Dong ad91527023 critical_section tests: do not check APP interrupts on NRF52
APP interrupts are masked on SoftDevice BLE stack only, but we
have switched to Cordio stack on NRF52 targets.
2019-06-12 16:15:57 +01:00
Martin Kojtal 9cc1caa031
Merge pull request #10596 from kjbracey-arm/sem_acquire
Introduce Semaphore::acquire methods
2019-05-29 06:22:30 +01:00
Kevin Bracey 2fbbd9d2ca Introduce Semaphore::acquire methods
Deprecate wait() in favour of acquire(), try_acquire(),
try_acquire_for() and try_acquire_until().

Brings Semaphore more into line with CMSIS-RTOS 2 (which uses "acquire"),
itself (as it has "release"), and other classes having "try", "try for"
and "try until".

Also steps away from vague "wait" term - the primary operation here is
to acquire the semaphore, and this will of course sleep.
2019-05-28 17:02:06 +03:00
Martin Kojtal ab82f1fca6
Merge pull request #10627 from devran01/remove_future_sequana_target
Remove targets FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA
2019-05-24 12:16:10 +01:00
Michael Schwarcz b8745b8ed8 Build PS tests only if FLASHIAP exists 2019-05-22 17:17:23 +03:00
Martin Kojtal 1dbb478bbb
Merge pull request #10597 from LDong-Arm/systimer_lptimer
SysTimer should be buildable without lp ticker
2019-05-22 11:59:16 +01:00
Devaraj Ranganna 7765d39283 The targets FUTURE_SEQUANA_M0_PSA and FUTURE_SEQUANA_PSA are removed
due to partial implementation. Having FUTURE_SEQUANA_M0 and
FUTURE_SEQUANA PSA targets is misleading.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-05-21 15:00:31 +01:00
Martin Kojtal f859289634
Merge pull request #10489 from kjbracey-arm/gpio_api_nc
gpio_api.h: Clarify desired behaviour for NC
2019-05-21 14:36:49 +01:00
Lingkai Dong 9fc54c9774 systimer tests: do not require lp ticker
SysTimer can run on us ticker now. Only deep sleep test
strictly requires lp ticker and it already has build conditions
in place.
2019-05-16 17:04:22 +01:00
Martin Kojtal 3ea1c56124
Merge pull request #10147 from kjbracey-arm/atomic_bitwise
Assembler atomics
2019-05-13 14:18:05 +01:00
Martin Kojtal 548a40ee62
Merge pull request #10541 from guialonsoalb/master
Adding QSPI support to target RHOMBIO_L476DMW1K
2019-05-13 13:59:40 +01:00
Martin Kojtal 2239babf26
Merge pull request #10543 from mirelachirica/wise_1570_udp_echotest_non_recvtimeout
Cellular: Increase receiving timeout for UDP echo non-blocking test
2019-05-13 13:45:11 +01:00
Olli-Pekka Puolitaival 842d145d91 Py3 fixes for test scripts 2019-05-08 13:46:01 +03:00
Mirela Chirica 26facc7f9b Cellular: WISE-1570 needs greater receiving timeout to pass UDPSOCKET_ECHOTEST_NONBLOCK test
Reason for needing greater timeout could be this test's performance.
UDPSOCKET_ECHOTEST_BURST_NONBLOCK is implementing the receiving
differently and is passing with 1 second timeout.
2019-05-08 10:43:08 +03:00
Guillermo Alonso 70bc390410 added QSPI support to target RHOMBIO_L476DMW1K 2019-05-07 15:44:09 +02:00
Kevin Bracey 66f446b9a9 Add GPIO NC test
Check two items of defined behaviour - that you can initialise a
gpio_t with NC, and you can detect that state with gpio_is_connected().
2019-05-02 16:12:21 +03:00
Martin Kojtal 40f8cb95a8
Merge pull request #10435 from morser499/pr/cy-smif
Add support for QSPI to Cypress Boards
2019-05-02 13:41:56 +01:00
Ryan Morse a8570ffe6c Added support for QSPI to Cypress Boards 2019-05-01 07:09:58 -07:00
Alexander Zilberkant 117e3e82b6 Update PSA includes to autogenerated files 2019-04-30 14:41:09 +03:00
Alexander Zilberkant ab01bea46d Delete autogenerated files 2019-04-30 14:10:23 +03:00
Martin Kojtal 1de0712272
Merge pull request #9944 from deepikabhavnani/stm32_splitheap
GCC - Add support to split heap across 2-RAM banks
2019-04-30 11:02:51 +01:00
Anna Bridge a5f1a125f1
Merge pull request #10426 from michalpasztamobica/udp_echo_error_handling
UDPSOCKET_ECHOTEST fails if a packet of every size was not sent
2019-04-26 13:33:25 +01:00
Kevin Bracey 4fe06e0949 Critical tests: use atomics
Get rid of a volatile, and use atomics to synchronise with the interrupt
routine instead.

Useful as a non-RTOS basic compilation check for the atomics - the
fuller atomic test relies on the RTOS.
2019-04-26 13:12:35 +03:00
Kevin Bracey 0fabf37564 Add some atomic tests
These are platform tests, but rely on the RTOS to run multiple threads
to exercise it.

(The atomics are still useful in non-RTOS, to protect against interrupt
handlers, but testing versus other threads is easier. The implementation
is the same either way, so doesn't seem worth testing non-RTOS
specifically).
2019-04-26 13:12:35 +03:00
Michal Paszta d1017ea274 UDPSOCKET_ECHOTEST fails if a packet of any given size was not sent at least once 2019-04-18 11:38:11 +03:00
Martin Kojtal ca887a9712
Merge pull request #10407 from kfnta/warn_fix
Fix warnings on PSA secure builds
2019-04-18 08:16:51 +01:00
Martin Kojtal 6b9d1573fb
Merge pull request #10096 from fkjagodzinski/test-usb-hid
Add USB HID tests
2019-04-17 14:06:51 +01:00
Oren Cohen f51eb6215a Fix warnings on PSA secure builds 2019-04-17 10:37:51 +03:00
Martin Kojtal 0b7d9af4dd
Merge pull request #10385 from michalpasztamobica/wifi_test_readme
README file for wifi tests gives configuration example
2019-04-16 09:10:26 +01:00
Martin Kojtal 79dddf84f0
Merge pull request #10381 from michalpasztamobica/echotests_loop_fix
ECHOTEST internal loop simplification and fix
2019-04-16 08:45:25 +01:00
Michal Paszta 631540a421 ECHOTEST internal loop simplification and fix
The loop was wrongly incrementing the index of the array after assiging
the value. Thus the first array element was used twice and the last one
was never user. The issue is fixed and the loops are refactored and
simplified to avoid such confusion in the future.
2019-04-15 11:54:03 +03:00
Michal Paszta e87d0ce654 README file for wifi tests gives configuration example. 2019-04-12 11:36:28 +03:00
Tymoteusz Bloch 42b5680697 Multihoming fixed according to new LWIP implementation. 2019-04-11 20:54:48 -05:00
Cruz Monrreal b1e48db242
Merge pull request #10225 from kjbracey-arm/memorypool_blocking_alloc
Mail/MemoryPool: blocking alloc
2019-04-11 20:21:44 -05:00
Deepika 56154c096d Update the test case to check multiple bank heap regions 2019-04-09 12:08:49 -05:00
Filip Jagodzinski 852390fcdc Tests: USBHID: Make report test optional on Linux
This test case uses `hidapi` -- a cross-platform Python module.
To keep the initial Mbed setup as simple as possible, the `hidapi`
module is skipped on Linux hosts because of its external dependancies
for this platform.

The module can be easily installed following instructions from the
README file.
The test case is skipped if the host machine lacks `hidapi` module.
2019-04-09 17:03:22 +02:00
Filip Jagodzinski 111f485cbe Tests: USBHID: Remove unnecessary wait_ready call
Every test case waits at greentea_parse_kv() anyway.
2019-04-09 17:03:22 +02:00
Filip Jagodzinski 36eb700ede Tests: USBHID: Handle variable driver setup time
Wait for the host driver to finish setup before sending any HID reports
from the device.

USBHID::wait_ready() blocks until the device reaches 'configured' state,
but the state of the host HID driver remains unknown to the device.
2019-04-09 17:03:22 +02:00
Filip Jagodzinski 4f880691fb Tests: USBHID: Reuse VID & PID from basic test
To successfully use pyusb on Windows hosts, a Zadig configuration has to
be performed. Since config for basic tests has already been provided,
use it again.
2019-04-09 17:03:22 +02:00
Filip Jagodzinski 572beb6731 Tests: USBHID: Add tests 2019-04-09 17:03:21 +02:00
Martin Kojtal af3a7656a4
Merge pull request #10330 from michalpasztamobica/greentea_test_fixes
Reduce greentea socket tests failures related to network issues
2019-04-09 11:03:33 +02:00
Michal Paszta 872edd4964 Relax TLSSOCKET_RECV_TIMEOUT sigio timeout 2019-04-08 12:56:41 +03:00
Michal Paszta 3505923d02 Test udpsocket_recv_timeout does not check packet reception ratio 2019-04-08 12:56:29 +03:00
Qinghao Shi 2603e295e8 FastModel: Skip low-power ticker time drifting test for models
FastModels are a software simulator for Arm platform/cores.
They mean to be used as a tool for testing or early prototype stage development.
Due to the nature of software simulator can't grantee the timing accuracy like HW.
So time drifting test is skipped for software models.
2019-04-03 16:51:02 +01:00
Anna Bridge 0f6a8357e7
Merge pull request #10037 from michalpasztamobica/tcp_skip_if_unsupported
TCP/TLS Socket tests will skip if TCP is not supported
2019-03-29 13:30:37 +00:00
Cruz Monrreal 8e819de43e
Merge pull request #10030 from jamesbeyond/fm_test
TESTS: skip timing accuracy test on FastModels
2019-03-28 17:58:51 -05:00
Cruz Monrreal 53920a62b7
Merge pull request #9904 from michalpasztamobica/greentea_packet_size_fix
Handle oversized packets in tcp and udp socket tests.
2019-03-28 17:01:52 -05:00
Michal Paszta 09183c94b9 TCP/TLS Socket tests will skip if TCP is not supported 2019-03-28 10:08:53 +02:00
Cruz Monrreal 1549c5c425
Merge pull request #10160 from itayzafrir/crypto-access-control-additional-tests
Crypto access control additional tests
2019-03-27 17:09:08 -05:00