Commit Graph

1541 Commits (0f5c3f0b37eadb50fd6982fe81f330723ea1a467)

Author SHA1 Message Date
Filip Jagodzinski ed41994a3a Test: HAL: serial: Add DEVICE_SERIAL_FC guards
Fix undefined references to serial_set_flow_control.
2019-07-09 13:21:42 +02:00
Martin Kojtal ee5b6d2c74
Merge pull request #10976 from vmedcy/tests-mbed_drivers-ticker
Fix error in tests-mbed_drivers-ticker when LED2 is not connected
2019-07-09 08:33:25 +01:00
Martin Kojtal 358046e472
Merge pull request #10989 from mprse/spi_fpga_basic_test_ext
SPI FPGA test extension + SPI driver fix (K64F)
2019-07-08 20:42:47 +01:00
Devaraj Ranganna 7ead3fedb8 Include psa/crypto.h instead of mbedtls/config.h.
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-08 16:28:58 +01:00
Arto Kinnunen cd4283e5fb
Merge pull request #10977 from vmedcy/tests-mbedmicro-rtos-mbed-malloc
Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc
2019-07-08 16:39:22 +03:00
Przemyslaw Stekiel 6490ac75d8 FPGA SPI test: Fix typo 2019-07-08 15:23:21 +02:00
Przemyslaw Stekiel 6112ca8c64 FPGA SPI test: Fix unsupported transfer case
Co-Authored-By: Filip Jagodziński <fkjagodzinski@gmail.com>
2019-07-08 14:54:33 +02:00
Przemyslaw Stekiel 17d5e6d00a Extend FPGA SPI test
Add test cases for:
- async mode,
- different frequencies,
- block write
2019-07-08 14:54:33 +02:00
Martin Kojtal 1c91d03d9b
Merge pull request #10975 from fkjagodzinski/fix-fpga_ci_test_shield-tests
Restrict FPGA tests to Arduino form factor
2019-07-08 13:47:55 +01:00
Russ Butler e74e3dd124 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-08 09:42:30 +02:00
Russ Butler d5cc17ff8c 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-05 16:54:38 -05:00
Neil Tuttle 81f85296e8 Fix out-of-bounds array access in tests-mbedmicro-rtos-mbed-malloc 2019-07-05 14:33:40 +01:00
Neil Tuttle 09b8d7fc5b Fix error in tests-mbed_drivers-ticker when LED not available 2019-07-05 14:26:15 +01:00
Filip Jagodzinski d425dc9ba4 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-05 14:51:18 +02:00
Martin Kojtal c709955aff
Merge pull request #10820 from mprse/bring_fpga_tests_master
Bring FPGA-Test-Shield tests into Mbed-os master.
2019-07-04 15:02:21 +01:00
Devaraj Ranganna 6e590cd3e7 Include mbedtls/config.h before evaluating MBEDTLS_PSA_CRYPTO_C
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2019-07-04 16:44:19 +03:00
Przemyslaw Stekiel d2d3d5f35d FPGA uart test: Remove unsupported test cases
Not all uart features are supported by specific platforms.
2019-07-04 14:55:02 +02:00
Przemyslaw Stekiel 879d8917c4 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-04 13:52:19 +02:00
Martin Kojtal ccb63d771e
Merge pull request #10857 from ARMmbed/feature-watchdog
Add Watchdog and ResetReason
2019-07-03 11:43:52 +01:00
Przemyslaw Stekiel c016f2ab76 FPGA Analogout test: mark dead code as debug code, increase tolerance 2019-07-03 12:34:22 +02:00
Przemyslaw Stekiel 852456006b 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-03 12:27:25 +02:00
Przemyslaw Stekiel 261e67b687 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-03 10:23:06 +02:00
Filip Jagodzinski b89eeb7ec5 Test: Watchdog: Fix test_restart case
Watchdog::stop() is called in this test. If the target does not support
stopping the watchdog this case needs to be skipped.
Also improve handling ignored test cases.
2019-07-02 12:46:23 +01:00
Filip Jagodzinski 9e2a1816bb Test: Watchdog: Fix astyle errors 2019-07-02 12:46:23 +01:00
Filip Jagodzinski 7ab0a35fdf Test: WatchdogManager: Remove tests
This component no longer exists in Mbed OS.
2019-07-02 12:46:23 +01:00
Filip Jagodzinski a5ad5e04ca Test: Watchdog: Add new driver tests 2019-07-02 12:46:23 +01:00
Martin Kojtal 85c477c1dc
Merge pull request #10609 from kjbracey-arm/us_ticker_optimise
wait_us optimization
2019-06-28 14:29:00 +01:00
Martin Kojtal dfdf70b873
Merge pull request #10767 from maciejbocianski/msd_test_windows_unmount_fix
usb_device-msd test: fix powershell unmount script issue
2019-06-28 14:24:53 +01:00
Martin Kojtal a2c9152441
Merge pull request #10700 from LMESTM/hal_sleep_manager_test_update
Update HAL Sleep manager test to cope with STM32 LPTIM HW
2019-06-28 13:19:10 +01:00
Filip Jagodzinski e2ba0bb533 ResetReason: Update the header file
Minor doxygen fixes.
2019-06-26 09:58:24 +01:00
Martin Kojtal e40a76575f watchdog: fix copyright 2019-06-26 09:43:21 +01:00
Filip Jagodzinski 4e35e368b2 Test: watchdog_mgr: Remove dead code 2019-06-26 09:09:59 +01:00
Filip Jagodzinski 94181a9930 Test: update reset_reason driver test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.

Use a SERIAL_FLUSH_TIME_MS value consistent with other tests.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski ee202dafd8 Test: update HAL watchdog-timing test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 81898af2b5 Test: update HAL watchdog-reset test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
Remove explicit calls to sleep.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 777a863ac8 Test: update HAL watchdog test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Filip Jagodzinski 68e536b368 Test: update HAL reset_reason test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-26 09:09:59 +01:00
Maciej Bocianski b4138d1102 usb_device-msd test: OS type detection fix 2019-06-24 22:12:20 +02:00
Filip Jagodzinski 8d8383b23c 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-06-24 18:24:01 +02:00
Maciej Bocianski 60ef4a0854 usb_device-msd test: astyle fix 2019-06-19 15:37:09 +02:00
Laurent Meunier 8476be6285 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-06-19 15:33:34 +02:00
Maciej Bocianski 855a6ddbfd usb_device-msd test: docs update 2019-06-19 15:10:33 +02:00
Maciej Bocianski 4378c141df usb_device-msd test: disable host side unmount on windows machines 2019-06-19 14:32:21 +02:00
Maciej Bocianski f6d6863c1f usb_device-msd test: improve error handling 2019-06-19 14:32:21 +02:00
Maciej Bocianski 18285168fd 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-06-19 14:32:20 +02:00
Anna Bridge 2a7635f536
Merge pull request #10782 from d-kato/rza1_armc6
GR_LYCHEE,RZ_A1H,VK_RZ_A1H: Fix greentea test failure with ARMC6
2019-06-19 12:33:28 +01:00
Anna Bridge fe6f458222
Merge pull request #10744 from LMESTM/Fix_sysTimerTest
Fixes in Sys Timer test
2019-06-19 12:23:57 +01:00
Anna Bridge aa9bd486d5
Merge pull request #10688 from fkjagodzinski/test_update-docs-usb
Add a top level README file for USB tests
2019-06-19 12:21:39 +01:00
Anna Bridge d8c17b5fab
Merge pull request #10536 from mprse/stm_lptim_issue
Changes required by the ST low power ticker wrapper.
2019-06-19 12:08:21 +01:00
Laurent Meunier d6c3d79a9d Increase DEEP_SLEEP_TEST_CHECK_WAIT_DELTA_US
now that sleep_manager_can_deep_sleep_test_check() is based on wait_ns
2019-06-19 11:00:33 +02:00
Przemyslaw Stekiel d577e7f186 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-06-18 18:06:02 +02:00
Anna Bridge 14b77c9a2e
Merge pull request #10776 from tymoteuszblochmobica/echotest
UDPSOCKET_ECHOTEST_NONBLOCK performance improvement.
2019-06-18 16:35:17 +01:00
Filip Jagodzinski c5ad70c1e5 Tests: Watchdog: Update timing test
Skip test cases with unsupported timeout values.
2019-06-14 10:59:06 +02:00
Filip Jagodzinski d634862a09 Tests: Watchdog: Decrease default timeout to 100 ms 2019-06-14 10:59:06 +02:00
Filip Jagodzinski c29cdab079 Tests: Watchdog: Update test case teardown
Added a mechanism which will prevent an initialised watchdog from
resetting the device during final greentea communication.
This allows testing watchdog timeouts as short as 50 ms.
2019-06-14 10:59:06 +02:00
Kevin Bracey 57310729d4 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-06-14 10:22:08 +03:00
Laurent Meunier 83e274a82c Remove unused variable
and avoid associated warning ...
2019-06-13 16:47:02 +02:00
Przemyslaw Stekiel cd0ad518cc Bring FPGA-Test-Shield tests into Mbed-os master. 2019-06-13 13:43:25 +02:00
Filip Jagodzinski 98708d1041 Tests: Update Watchdog Manager test
Update the watchdog timing requirements:
1. The watchdog should trigger at, or after the timeout value.
2. The watchdog should trigger before twice the timeout value.
2019-06-11 10:52:47 +02:00
Martin Kojtal fbcae489a0
Merge pull request #10762 from mprse/reenable_tests
Disable only time drifting test cases and fix GREENTEA_SETUP() call in tests
2019-06-11 07:35:41 +01:00
Laurent Meunier 24203fc42b Fix compilation issue for targets without LPTICKER or USTICKER 2019-06-10 18:03:04 +02:00
Tymoteusz Bloch c22350589d UDPSOCKET_ECHOTEST_NONBLOCK performance improvement. 2019-06-10 11:20:12 +02:00
Martin Kojtal 3c2dd9ca89
Merge pull request #10761 from jarvte/fix_nwinterface_statustest
Fix networkinterface non-blocking status test
2019-06-09 18:21:15 +01:00
Martin Kojtal dd77957d45
Merge pull request #10665 from tymoteuszblochmobica/json
Add hardcoded Echo server defaults for Greentea socket tests.
2019-06-09 18:05:03 +01:00
Martin Kojtal dc77c40fe9
Merge pull request #10709 from LDong-Arm/nrf52_cordio
Default to Cordio BLE stack for NRF52* targets
2019-06-09 18:03:34 +01:00
Martin Kojtal a2c029404b
Merge pull request #10437 from OpenNuvoton/nuvoton_psa_exclude_test
PSA: Exclude mbed-hal-spm test for M23 target
2019-06-07 17:19:27 +01:00
Laurent Meunier d4db0f30c7 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-06-07 16:37:44 +02:00
d-kato 4eca482061 tests-mbed_drivers-crc: Increase the task stack 2019-06-07 11:07:59 +09:00
Przemyslaw Stekiel 86dab2f9fa 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-06-06 21:48:04 +02:00
Teppo Järvelin 2b9e1f3982 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-06-06 09:04:44 +03:00
Przemyslaw Stekiel c325dbc695 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-06-05 13:32:13 +02:00
Lingkai Dong 977eea4447 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-05 09:53:53 +01:00
Maciej Bocianski 90fbab0419 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-06-04 14:14:21 +02:00
Filip Jagodzinski 19272b7a1c Tests: ResetReason: Use the HAL watchdog API
The Watchdog driver has been updated making this test incompatible
with the new API. Use HAL API instead.
2019-06-03 16:32:15 +02:00
Filip Jagodzinski 93b01c79bb Tests: Watchdog: Add Watchdog Manager tests 2019-06-03 16:32:15 +02:00
Filip Jagodzinski 2dd5216ceb Tests: Watchdog: Remove outdated driver tests
The Watchdog driver has been updated making these tests incompatible
with the new API. The Watchdog driver functionality is tested with the
unit tests located in UNITTESTS/drivers/Watchdog/ .
2019-06-03 16:32:14 +02:00
Laurent Meunier df07e7d29e 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-06-03 13:50:40 +02:00
Przemyslaw Stekiel 48fdd33db8 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-05-31 14:17:33 +02:00
Przemyslaw Stekiel 874ff1fe22 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-05-31 14:16:34 +02:00
Laurent Meunier 19b843d530 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-05-29 11:48:36 +02:00
ccli8 b4e5a53f48 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-05-29 16:09:03 +08: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
Filip Jagodzinski 0ae1be0e65 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-05-28 15:53:28 +02:00
Tymoteusz Bloch d42ed4e6a9 Added hardcoded Echo server defaults for Greentea socket tests. 2019-05-27 14:41:17 +02: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
Mel W 26986289e5 capitalizing class name
Hope this is alright.
2019-05-24 12:23:46 +02:00
Mel W ae776cbf1c Capitalizing Watchdog 2019-05-24 12:23:45 +02:00
Mel W c0e186b3dd small grammatical changes
Not sure if the formatting's still alright on these.
2019-05-24 12:23:45 +02:00
Filip Jagodzinski 16863bb972 Docs: Watchdog: Update code comments
* capitalize driver class name,
* reword test docs for the driver & HAL,
* capitalize Mbed name,
* reword the comments explaining the SERIAL_FLUSH_TIME_MS macro.
2019-05-24 12:23:44 +02:00
Amanda Butler dd46edaef3 Edit ResetReason_tests.h
Make minor grammar edits.
2019-05-24 12:23:40 +02:00
Filip Jagodzinski 337b394048 Tests: Watchdog: Update the reset-to-sync delay
Change the config parameter used as a delay before sending the sync
packet after the device reset in watchdog and reset_reason tests. Use
'forced_reset_timeout' instead of 'program_cycle_s'.
2019-05-24 12:23:38 +02:00
Filip Jagodzinski a37d03d640 Tests: Watchdog: Fix config access in the host script
Move the calls to get_config_item() to the setup() method. The config is
not available in the initializer yet.
2019-05-24 12:23:38 +02:00
Donatien Garnier f9ac1567af Fix more astyle failures 2019-05-24 12:23:37 +02:00
Donatien Garnier 91ef36809f Apply new astyle config style 2019-05-24 12:23:36 +02:00
Donatien Garnier 3ab0fbc7cf Update license headers 2019-05-24 12:23:35 +02:00
Steve Cartmell b06e30ed35 test(api-watchdog): Fix errors in compiling watchdog greentea tests
The latest rebase of the watchdog feature branch introduced errors in compiling
watchdog tests due to missing headers.

- Watchdog HAL API test
  Include missing header files to main.cpp (mbed_wait_api.h, stdlib.h).

- Watchdog HAL API timing test
  Include missing header files to main.cpp (us_ticker_api.h).

- Watchdog Driver API test
  Include missing header files to main.cpp (mbed_wait_api.h, stdlib.h).
  Inject mbed namespace into main.cpp to fix Watchdog name resolution.
2019-05-24 12:23:34 +02:00
ccli8 b17ea44046 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-05-24 12:20:05 +02:00
ccli8 5190ec8048 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-05-24 12:20:04 +02:00
Filip Jagodzinski 76f7ca613a Tests: Drivers: Reset_reason: Add tests 2019-05-24 11:35:34 +02:00
Filip Jagodzinski f9497e5ed4 Tests: HAL API: Reset_reason: Add tests 2019-05-24 11:35:33 +02:00
Filip Jagodzinski 4e28b80b5f Tests: HAL: Watchdog: Fix timing accuracy test
Relax time measurement margins for UBLOX_EVK_ODIN_W2.
2019-05-24 11:35:33 +02:00
Filip Jagodzinski 8baf16760d Tests: Drivers: Watchdog: Add tests 2019-05-24 11:35:28 +02:00
Filip Jagodzinski c4d9300f9d Tests: HAL API: Watchdog: Add time accuracy tests 2019-05-24 11:35:28 +02:00
Filip Jagodzinski f1e744d4a0 Tests: HAL API: Watchdog: Add dev reset tests 2019-05-24 11:35:27 +02:00
Filip Jagodzinski 484b716c6e Tests: HAL API: Watchdog: Add tests 2019-05-24 11:35:26 +02:00
Filip Jagodzinski 6e405463ae Add a sanity check for the GPIO pinmap 2019-05-23 14:29:26 +02: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
Michal Paszta 266d4c43a2 Handle oversized packets in tcp, tls and udp socket tests 2019-03-27 11:01:16 +02:00
Cruz Monrreal d26fe0fe55
Merge pull request #10184 from mirelachirica/wise_1570_udp_echotest_nonblocking
Cellular: Increase receiving timeout for UDP echo non-blocking test
2019-03-27 00:34:47 -05:00
itayzafrir 75e4210633 Fix typos 2019-03-26 15:27:22 +02:00
Kevin Bracey b8d90fb1dc MemoryPool: Add timeout and wake tests 2019-03-26 14:12:59 +02:00
Mirela Chirica ec3c6f37f9 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-03-26 09:10:02 +02:00
Martin Kojtal e7987a9f04
Merge pull request #10166 from cmonr/astyle-fix
Travis CI: Tweak astyle to not over-exclude files
2019-03-22 06:36:07 +01:00
Martin Kojtal db8a018fec
Merge pull request #9959 from michalpasztamobica/refactor_socket_stats_usage
Refactor socket stats to reduce boiler plate
2019-03-21 10:46:15 +01:00
Martin Kojtal f99431f7c2
Merge pull request #9444 from maciejbocianski/usb_msd_tests
Usb msd tests
2019-03-21 10:42:55 +01:00
Cruz Monrreal II e7c2e66543 Added missing astyle corrections for TESTS/mbed_hal/* 2019-03-20 12:57:36 -05:00
Martin Kojtal 0d86248316
Merge pull request #10120 from mirelachirica/networkinterface_connection_status_fix
Cellular: Fix network interface test for cellular targets
2019-03-20 15:40:30 +01:00
itayzafrir 2dfafe6299 Crypto acl tests destroy keys 2019-03-19 17:57:24 +02:00
itayzafrir f1722cb8dc Add crypto acl test - key agreement 2019-03-19 17:47:48 +02:00
itayzafrir c8eb51d576 Add crypto acl test - key derivation 2019-03-19 13:35:24 +02:00
Cruz Monrreal dbb33ef423
Merge pull request #9801 from vmedcy/fix-eventqueue-h
Correctly include EventQueue.h
2019-03-16 22:52:40 -05:00
Martin Kojtal 2fad1547a7
Merge pull request #10116 from 0xc0170/rollup
Rollup pt2: fixes for 5.12.1
2019-03-15 16:15:55 +01:00
Martin Kojtal 91b81c65fb
Merge pull request #9905 from michalpasztamobica/test_recv_return_less_or_equal
Tests: check if recv returned too much data
2019-03-15 14:57:01 +01:00
Mirela Chirica d15bcfe83a Cellular: Fix network interface test for cellular targets 2019-03-15 15:29:46 +02:00
Oren Cohen fc97a75632 Remove #ifndef NO_GREENTEA from tests 2019-03-14 11:16:44 +02:00
Michal Paszta b7ed4b5d9e Refactor socket stats to reduce bioler plate
Add a proper test case setup and teardown which does the socket stats
checks in tcp, udp and tls.
2019-03-14 11:09:35 +02:00
Netanel Gonen f7a2d4a082 move init of test into greentea init function 2019-03-13 10:43:00 +02:00
Qinghao Shi 83e7b66872 TESTS: skip timing accuracy test on FastModels 2019-03-11 10:40:31 +00:00
Alexander Zilberkant 661613c998 Rename psa_system_reset to mbed_psa_system_reset
add noreturn attributes
update lifecycle service to use psa/error.h
fix doxygen
2019-03-11 10:43:19 +02:00
Oren Cohen 5677b386af Reset ITS before the test start 2019-03-10 10:53:38 +02:00
Mahesh Mahadevan 162425b574 Increase the stack pointer check range
Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2019-03-08 07:33:48 -06:00
Oleg Kapshii aedec74b9a Added support for PSA target to WIFI_BT board
Added WiFi_Bt CM4 PSA target in mbedos json
Added SPE-NSPE mailbox initialization for CM4 SystemInit
Made similar to FUTURE_SEQUANA configurations
Copied FUTURE_SEQUANA CM0 SPM part for WiFi_Bt smoke test
Added CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Sorted files for new CY8CKIT_062_WIFI_BT_M0 and CY8CKIT_062_WIFI_BT_M0_PSA targets
Copied files for CY8CKIT_062_WIFI_BT_M0_PSA from FUTURE_SEQUANA
Copied and updated cm0p start files
Corrected according to FUTURE_SEQUANA
Changes to M0 startup files to have SPM started
Fixed implicit declaration warning
Commented interrupts enabling according to FUTURE_SEQUANA flow
Updated prebuild spm_smore CM0 hex for CM4 target
Turned on greentea environment
Used special memory region for common CM0/CM4 data
Updated prebuild CM0 SPM hex
Placed shared memory region for flash operations into SPM shared memory region
Updated cyprotection code and configuration
Start address of protected regions is set by a defined number from target.json
Added masters pcMask configuration
Added support for PSA target to WIFI_BT board
Enabled resources protection for SPM
Aligned RAM usage according to Cypress FlashBoot and CyBootloader
alligned protection config
Added CYW943012P6EVB_01_M0 target
Enlarged heap size, remobed nv_seed
Added heap reservation in linker script from mbed-os
Removed heap size definition
turned on nv_seed config
Removed nv_seed macros
Enabled protection for PSoC6 CM0
Added PSoC6 CM0 PSA readme
Enabled mbed_hal-spm test
Enabled nv_seed and removed unneeded ipc config define
Added SPDX string to feature_ble cypress target files
Removed unneeded supported_toolchains lines for Cypress targets
Disabled protection settings
Corrected flash initialization for PSoC6 CM0 PSA
Changed PSoC6 IPC6 protection for flash
Enabled special flash initialization and enabled protection settings
Updated and added new prebuild PSoC6 CM0 PSA hex files
Disabled HW TRNG and CRC for PSoC6 CM4 PSA target
Added missing const to allow types to match
Updated PSoC6 WIFI_BT_PSA prebuilt directory
Moved PSoC6 shared section usage area definition to begin of ld
Added initial ARM_STD linker and startup files for PSoC6 CM0
Added initial IAR linker and startup files for PSoC6 CM0
Added defines to disable some SPM protection settings for PSoC64
Moved Flash function variables into separate memory region
Added defines for new Public area definition
Updated PSoC6 CM0_PSA hex-files
2019-03-07 08:40:20 -08:00
Michael Schwarcz 0b4f16f456 Disable SPM tests with TF-M issues for TF-M targets 2019-03-06 16:42:51 +02:00
Martin Kojtal 355f09bbac
Merge pull request #9875 from tymoteuszblochmobica/testfix
Apply proper network interface verification.
Only run for platforms which have two interfaces and prevent crashes otherwise.
2019-03-04 15:24:41 +01:00
Martin Kojtal e75794ec6e
Merge pull request #9888 from ARMmbed/feature-armc6
ARM Toolchain update to ARM Compiler 6.11(ARMC6)
2019-03-04 12:23:38 +01:00
Tymoteusz Bloch f420a5551d Fix multihoming tests for case of no ethernet device 2019-03-04 11:25:56 +01:00
Martin Kojtal 9f6156abb3
Merge pull request #9916 from kfnta/skip_spm_hal_m33
Skip test on Cortex M33 devices
2019-03-04 10:51:14 +01:00
Oren Cohen 577d286639 Skip test on Cortex M33 devices
On platforms using coretx m33 accessing the secure memory will cause SecureFault instead of Hardfault.
SecureFault is implemented in the secure image and cannot be changed in runtime.
2019-03-03 18:43:04 +00:00
Martin Kojtal fa65546aa2
Merge pull request #9913 from kfnta/fix_acl_test
Fix bug in crypto_acl test
2019-03-03 19:30:43 +01:00
Oren Cohen 4fe5a41734 Fix bug in crypto_acl test 2019-03-03 14:41:27 +02:00
Oren Cohen cfb60ec955 Fixes
* Add #include <stddef.h> to psa/client.h
* Add Attestation service to TFM
* Update FUTURE_SEQUANA_PSA secure binaries
* Remove MBED_SPM from K64F
* Refactor psa_manifest/sid.h
* Increase stackl size in spm-client tests
* Add handling of errors from psa_get in partitions
2019-03-03 13:30:58 +02:00
Michael Schwarcz b62c48977f Review fixes 2019-03-03 10:55:46 +02:00
Michael Schwarcz 20d7f817df Fix astyle 2019-03-03 10:55:46 +02:00
Michael Schwarcz ef76ec83ee Generate psa_manifest/sid.h 2019-03-03 10:55:46 +02:00
Oren Cohen a1bd657594 Test partition modification 2019-03-03 10:55:44 +02:00
Oren Cohen bd9a738473 Move SPM_PANIC to psa/service.h 2019-03-03 10:55:44 +02:00
Oren Cohen 306a51f6c0 Update psa_get() to return psa_status_t 2019-03-03 10:55:44 +02:00
Michael Schwarcz 3edcf455a6 mbed-crypto sanity tests enable run without greentea 2019-03-03 10:55:43 +02:00
Michael Schwarcz f9fbd6ae82 Align PSA SPM tests to TF-M 2019-03-03 10:55:42 +02:00
Oren Cohen 483b23c318 Fix SPM warnings 2019-03-03 10:54:55 +02:00
Oren Cohen 68d91fb277 Remove osDelay from smoke test 2019-03-03 10:54:55 +02:00
Oren Cohen 5e4649bae8 Remove obsolete test 2019-03-03 10:54:54 +02:00
Oren Cohen dfbc7b6b7a Adapt partitons 2019-03-03 10:54:54 +02:00
Oren Cohen aad114aa55 Genrerate SPM data 2019-03-03 10:54:54 +02:00
kegilbert 194fa129fb Update recently added previous macro name uses in tests 2019-03-01 13:53:47 -06:00
Michal Paszta c81f71b2de Tests: check if recv returned too much data 2019-03-01 18:01:38 +02:00
Michael Schwarcz 3c0c5759bf Regenerate mbed-spm files 2019-03-01 09:40:45 +02:00
Cruz Monrreal befed111f5
Merge pull request #9668 from moranpeker/psa-init-attestation
PSA Initial Attestation service
2019-02-28 18:25:16 -06:00
Cruz Monrreal e393c2dc0b
Merge pull request #9785 from c1728p9/default_to_us_ticker
Use us ticker for tickless on devs with wrapper
2019-02-28 18:25:01 -06:00
Cruz Monrreal e6caa122cb
Merge pull request #9812 from kjbracey-arm/wait_ns
Add wait_ns API
2019-02-28 18:21:46 -06:00
Senthil Ramakrishnan 15cb4a4fee Fix compiler flags for ARMC6 in sys stats test 2019-02-28 12:03:15 -06:00
Russ Butler 8d880bb63e Skip deep sleep test when running from US ticker
Skip the systimer deep sleep test when running from the microsecond
ticker, since the microsecond ticker doesn't support operation in deep
sleep mode.
2019-02-28 10:57:00 -06:00
itayzafrir b8bdaf9e9f Fix acl test asymmetric encrypt decrypt 2019-02-28 10:29:53 +02:00
itayzafrir 31d202b3f6 Change error code handling of calls to psa_call 2019-02-28 10:29:52 +02:00
Maciej Bocianski 7ff689be20 Add USB mass storage test 2019-02-27 17:18:41 +01:00
itayzafrir 2918f74883 Free dynamic memory in test partition 2019-02-27 16:28:36 +02:00
itayzafrir 2227e33e5a Add acl test - use other partitions' key - asymmetric encrypt decrypt 2019-02-27 16:28:36 +02:00
itayzafrir 5a7ed318ae Add acl test - use other partitions' key - asymmetric sign verify 2019-02-27 16:28:36 +02:00
itayzafrir db90606a34 Add acl test - use other partitions' key - aead 2019-02-27 16:28:36 +02:00
itayzafrir b8079c3d09 Add acl test - use other partitions' key - cipher 2019-02-27 16:28:36 +02:00
itayzafrir d1e61a0df4 Add acl test - use other partitions' key - mac 2019-02-27 16:28:35 +02:00
itayzafrir 200930d752 Refactor test partition helper function to create and generate a key 2019-02-27 16:28:35 +02:00
itayzafrir 2c1f0b37f2 Add acl test - use other partitions' key - manage key 2019-02-27 16:28:35 +02:00
itayzafrir 8c21f10696 Add acl test - create key same id different partitions 2019-02-27 16:28:35 +02:00
itayzafrir 9adda5b88e Add acl test - open other partitions' key 2019-02-27 16:28:35 +02:00
itayzafrir 2146e74c84 Prepare for crypto access control tests
- Add a secure side test partition
- Add a proxy to communicate with the test partition
- Add main test file
2019-02-27 16:28:35 +02:00
Moran Peker e819b23638 Fix attestation main to check PSA target before includes 2019-02-27 14:14:33 +02:00
Moran Peker 41bd381462 General fixes of spelling, newline, un needed code
-Correct spelling errors
-Add newline at end of file
-Remove un needed code
2019-02-27 14:14:27 +02:00
Moran Peker e12f5eeaa7 Add ifdef TARGET_PSA and MBEDTLS_PSA_CRYPTO_C to test file
if not supported return error
2019-02-27 14:14:23 +02:00
Moran Peker 2117a26cb1 Get security lifecycle by psa_security_lifecycle_state function
-Add bug fix for psa_security_lifecycle_state function - PR #9745
-Remove lifecycle data from temp boot status data
-Update attesttation_partition_json file to use
PSA_PLATFORM_LC_GET and generate partition
code - auto generated files update
2019-02-27 14:14:17 +02:00
Moran Peker 4101ee92df Add checks ,initialization,remove unneeded code and files license update 2019-02-27 14:14:14 +02:00
Moran Peker 636753b404 Attestation: Add a new define for attestation private key id 2019-02-27 14:14:13 +02:00
Moran Peker 8fc9c8fdab Attestation: astyle fixs
Runing astyle over attestation file to pass CI
2019-02-27 14:14:11 +02:00
Moran Peker a994499bf3 Atteststaion: Update header files
-Remove psa_initial_attesttaion.h
-Move psa_initial_attesttaion_api.h and psa_attest_inject_key.h into
inc folder
-Update include in test file
2019-02-27 14:14:11 +02:00
Moran Peker 22437fca7e Attestation: Add test for initial attestation service
Add single test that check inject attestation key and attestation get token
2019-02-27 14:14:10 +02:00
Moran Peker 5f45b0af92 Attestation: aut- generated files by generate_partition_code.py
Atestation paration added.
2019-02-27 14:14:09 +02:00
Cruz Monrreal 4b13c8a212
Merge pull request #9768 from c1728p9/feature-hal-spec-usb-device
Bring USB Feature branch into master
2019-02-26 22:48:02 -06:00
Kevin Bracey d2df5a03cb Increase wait_ns test tolerance 2019-02-26 17:30:52 +02:00
Kevin Bracey 08a8f16e73 Add wait_ns timing test 2019-02-26 17:30:51 +02:00
Martin Kojtal b08ddaad8b
Merge pull request #9794 from michalpasztamobica/greentea_tcpsocket_sigio
Refactor tcpsocket tests to use sigio and not to wait
2019-02-26 10:30:56 +01:00
Cruz Monrreal 044d0c9cb1
Merge pull request #9778 from michalpasztamobica/add_missing_wifi_config_params
Add missing wifi parameters to test configs
2019-02-25 17:30:36 -06:00
Michal Paszta 999273f7e5 Refactor tcpsocket tests to use sigio and not to wait 2019-02-25 15:33:09 +02:00
Russ Butler 6527cf2bad Update files to include SPDX-License-Identifier
Update the header of all files to use a newer license template which
includes SPDX-License-Identifier.
2019-02-22 10:53:24 -06:00
Russ Butler 9f116d9f33 Applied more astyle fixes 2019-02-22 10:53:24 -06:00
Russ Butler 005df3559c Applied suggested astyle fixes 2019-02-22 10:53:23 -06:00
Russ Butler 8d731561cf Remove inclusion of mbed.h from USB
Remove mbed.h from USB files and fix the build errors this causes.
This is required to pass CI.
2019-02-22 10:53:23 -06:00
Filip Jagodzinski 4a4dcdb5b8 Tests: USB: Use astyle to format the test class 2019-02-22 10:53:23 -06:00
Filip Jagodzinski 38032453a5 Tests: USB: Fix 'endpoint halt' test
Abort all endpoint transfers before running the test again.
Use an updated vendor request to explicitly restart device reads.
2019-02-22 10:53:23 -06:00
Filip Jagodzinski 1ec448dbd0 Tests: USB: Add a README for Linux users
Explain how to overcome xHCI limitations in kernels prior to v4.17 and
successfully run USB tests.
2019-02-22 10:53:22 -06:00
Filip Jagodzinski 7db3a8a34a Tests: USB: DTR fix for Linux hosts
A DTR line is used to signal that the host has configured a terminal and
is ready to transmit and receive data from the USB CDC/Serial device.
When this test suite is run with the use of a Linux host, a workaround has
to be used to overcome some platform specific DTR line behavior.
Every time the serial port file descriptor is opened, the DTR line is
asserted until the terminal attributes are set.
As a consequence, the device receives a premature DTR signal with a
duration of 200-500 us before the correct, long-lasting DTR signal set by
the host-side test script. (tested on the Linux kernel 4.15.0)

The solution is to wait for the first DTR spike, ignore it, and wait for
the correct DTR signal again.
2019-02-22 10:53:21 -06:00
Russ Butler a4a3b3d429 Remove USB disconnect delay from Serial test
Remove the USB disconnect delay since there is no reason this is
needed. Failures which occur without this indicate a device or host
problem.
2019-02-22 10:53:21 -06:00
Russ Butler 930b29dd83 Tests: USB: Increase serial open retries
Double the number of attempts that are made to open a serial port.
This makes tests run more reliably on Windows.
2019-02-22 10:53:21 -06:00
Russ Butler 96154b577a Tests: USB: Remove TX_DELAY_MS from serial test
Remove TX_DELAY_MS and all the places it was called since it is not
needed when DTR flow control is used.
2019-02-22 10:53:21 -06:00
Russ Butler 8f72f314d7 Tests: USB: Use DTR to make Serial tests reliable
Update the serial host test to set DTR low before opening a serial
port. Set DTR high once the serial object is ready. This ensures that
no data is sent by the device until the host is ready.
2019-02-22 10:53:21 -06:00
Filip Jagodzinski 31fe3ee11e Tests: USB: Increas the size of RX CDC test data
This ensures the flow control is tested.
2019-02-22 10:53:21 -06:00
Filip Jagodzinski 53f7cd5561 Tests: USB: Fix Windows USB SN handling 2019-02-22 10:53:21 -06:00
Filip Jagodzinski 3d4d10191c Tests: USB: Update code comments 2019-02-22 10:53:21 -06:00
Filip Jagodzinski edf360d2fc Tests: USB: Use SN generated by the host machine 2019-02-22 10:53:21 -06:00
Filip Jagodzinski fc366291a2 Tests: USB: Correct reconnect delay
Setting to 1 ms to be on the safe side. The USB spec defines this delay
to be at least 200 us.
2019-02-22 10:53:21 -06:00
Filip Jagodzinski 2d4d111445 Tests: USB: Wait before transmitting data to host
Despite having ECHO and ECHOCTL POSIX lflags disabled by default by
pyserial, a delay is needed for host to properly handle data received
from USB serial/CDC device.
With no delay host would echo 0x00-0x31 characters prefixed with '^'.
2019-02-22 10:53:20 -06:00
Filip Jagodzinski dbfd43a098 Tests: USB: Wait before closing host's port
This delay eliminates the possibility of the device detecting the port
being closed when still waiting for data.
2019-02-22 10:53:20 -06:00
Filip Jagodzinski 7b80cb6586 Tests: USB: Add Serial test for line coding change 2019-02-22 10:53:20 -06:00
Filip Jagodzinski bf3aa29e0b Tests: USB: Use the serial number to find device
Use the USB device SN instead of VID & PID to find the device port name
on the host system.
2019-02-22 10:53:20 -06:00
Filip Jagodzinski 07ffcb4269 Tests: USB: Fix USB reconnect tests for Win hosts 2019-02-22 10:53:20 -06:00
Filip Jagodzinski 7a4b36c37f Tests: USB: Add tests for Serial class. 2019-02-22 10:53:20 -06:00
Filip Jagodzinski 3ed7d8139b Tests: USB: Add tests for CDC class. 2019-02-22 10:53:20 -06:00
Russ Butler cb6a6dbd20 Fix USB traceback during testing when wrong size
In the pyusb_basic host test check the length of control transfers
before comparing contents for equality.
2019-02-22 10:53:20 -06:00
Filip Jagodzinski 1f8bf46f2e Tests: USB: Check ep buffer is released by abort
Validate that endpoint buffer is not used after a transfer has been
aborted.
2019-02-22 10:53:20 -06:00
Filip Jagodzinski 36d4c355a9 Tests: USB: Update endpoint halt test
Wait for a locally created Timer thread to finish before returning.
2019-02-22 10:53:19 -06:00
Filip Jagodzinski c677bf7426 Tests: USB: Decrease the max data size for iso ep
Although the USB spec sets the upper limit on FS isochronous endpoint
payloads to 1023 B, this value is hard to test in practice. Moreover,
not all the targets Mbed OS supports (like NUCLEO_F207ZG) are able to
handle all the endpoints set to max.
2019-02-22 10:53:19 -06:00
Russ Butler 7563a0f03f Update test to restart reads after unstall
After an endpoint is unstalled any pending transfers are terminated.
This patch re-starts any reads that were ongoing.
2019-02-22 10:53:19 -06:00
Filip Jagodzinski 27bd1656b1 Tests: USB: Update ep callbacks
Endpoint callbacks no longer have endpoint as a param. This update was
introduced in #7267.
2019-02-22 10:53:19 -06:00
Filip Jagodzinski c12e2d15f5 Tests: USB: Add data toggle test 2019-02-22 10:53:19 -06:00
Filip Jagodzinski ff8a9b6ae8 Tests: USB: Update endpoint tests
Fix the host script issues present on Windows machines.
Add 0 B payload size to bulk endpoints test.
Update halt and abort tests according to PR comments.
Add an explicit request to start reading on OUT endpoints.
2019-02-22 10:53:19 -06:00
Filip Jagodzinski 62dc95f60a Tests: USB: Generic: Update documentation 2019-02-22 10:53:19 -06:00
Filip Jagodzinski 686126b8ea Tests: USB: Generic: Add basic endpoint tests 2019-02-22 10:53:19 -06:00
Filip Jagodzinski 79376c6f00 Tests: USB: Add device config files for Zadig
Zadig is a tool used to install generic USB drivers on Windows machines.
These drivers are necessary to run USB device test suite on Windows
hosts.
2019-02-22 10:53:18 -06:00
Russ Butler 799cde0fc3 Remove endpoint parameter from USB callbacks
Remove the endpoint parameter from endpoint callbacks. This
information is redundant because endpoints are known at
construction time because they must be in the configuration
descriptor.
2019-02-22 10:53:18 -06:00
Russ Butler 793044eb26 Fix various USB warnings
Fix the following warnings:
-[Warning] USBTester.cpp@45,0:  #1299-D: members and base-classes will
    be initialized in declaration order, not in member initialisation
    list order
-[Warning] USBTester.h@41,0:  #1300-D: ~USBTester inherits implicit
    virtual
-[Warning] USBAudio.cpp@345,0:  #1035-D: single-precision operand
    implicitly converted to double-precision
-[Warning] USBHID.cpp@29,0:  #1300-D: ~AsyncSend inherits implicit
    virtual
-[Warning] USBHID.cpp@61,0:  #1300-D: ~AsyncRead inherits implicit
    virtual
-[Warning] USBHID.cpp@93,0:  #1300-D: ~AsyncWait inherits implicit
    virtual
-[Warning] EndpointResolver.cpp@125,26: '<<' in boolean context, did
    you mean '<' ? [-Wint-in-bool-context]
2019-02-22 10:53:17 -06:00
Maciej Bocianski d66e576227 USB basic test documentation update 2019-02-22 10:53:15 -06:00
Maciej Bocianski fee14771e9 USB basic test update
disable suspend/resume test
disable sync frame test
improve reset test
2019-02-22 10:53:15 -06:00
Maciej Bocianski bcfe96b83c Update usb test to connect and block itself
Update the basic usb test so it does blocking itself since blocking
connect was removed from USBDevice.
2019-02-22 10:53:15 -06:00
Russ Butler 9f94a5fc56 Fix typo in USBTester.h
Fix the spelling of product_release.
2019-02-22 10:53:15 -06:00
Maciej Bocianski 12c91c3b7e pyusb_basic test update
test code refactoring
align test to use device multiconfiguration
2019-02-22 10:53:14 -06:00
Maciej Bocianski e85d5a33cd pyusb_basic test add helper functions 2019-02-22 10:53:14 -06:00
Maciej Bocianski 972fee6143 pyusb_basic test formatting fixes 2019-02-22 10:53:14 -06:00
Maciej Bocianski 9b4970342b Extend USB test class configuration 2019-02-22 10:53:14 -06:00
Russ Butler 6bb6d6fb42 Explicitly specify USBPhy used for testing
Add a parameter to the USBPhy class so mock or wrapper USBPhy classes
can be used.
2019-02-22 10:53:14 -06:00
Russ Butler a341a7c258 Make USB disconnect + connect time explicit
Create the define MIN_DISCONNECT_TIME_US to be used as the amount of
time that must pass between connect and disconnect for the host to
reliably detect reconnection. Replace the wait calls delaying for this
value to wait_us to indicate the precision required. Finally, remove
the unnecessary calls to wait_ms in
repeated_construction_destruction_test.
2019-02-22 10:53:14 -06:00
Maciej Bocianski ff3b0c1623 code formatting fixes 2019-02-22 10:53:13 -06:00
Maciej Bocianski 69a095cf3e USBDevice - add multiconfiguration support 2019-02-22 10:53:13 -06:00
Maciej Bocianski c2c3e01c36 USBDevice - add support for deconfiguration 2019-02-22 10:53:13 -06:00
Maciej Bocianski e4ffc6dea0 USB reset test fix 2019-02-22 10:53:13 -06:00
Russ Butler 50adb03f88 Fix USB tests
Change the direction used in set interface to match the USB
specification. This allows USB tests to pass on OSX.
2019-02-22 10:53:13 -06:00
Russ Butler 0a787e7fe9 Skip USB reset tests on OSX
OSX machines don't allow you to reset USB devices. Skip this test on
OSX so testing can still be used.
2019-02-22 10:53:13 -06:00
Maciej Bocianski 49504d66ca Fix for USB set_clear_feature_test for OSX 2019-02-22 10:53:13 -06:00
Russ Butler f31eb68ec5 Update USBTester product name
Change the name reported by USBTester from CDC DEVICE to
MBED TEST DEVICE.
2019-02-22 10:53:12 -06:00
Maciej Bocianski 33bef331e6 USB generic tests 2019-02-22 10:52:35 -06:00
Russ Butler aedeee068a Update USBTester for the new USB API
Update the class USBTester so it works with the new zero-copy
USBDevice API.
2019-02-22 10:52:34 -06:00
Russ Butler de12bb57fa Update USBTester for simplified read handling
Remove read_start and replace read_finish with read to match the new
USBDevice API.
2019-02-22 10:52:33 -06:00
Russ Butler f9f12766d8 Add USBDevice test code
Add a USB test and the class USBTester.cpp to go along with it.
2019-02-22 10:52:32 -06:00
Michal Paszta 19c6732105 Add missing wifi parameters to test configs 2019-02-22 10:13:14 +02:00
Oren Cohen 49aae7b43e
Update secure binaries 2019-02-22 02:04:00 +02:00
Cruz Monrreal 870bd05904
Merge pull request #9708 from davidsaada/david_protected_storage
Implement PSA protected storage & restructure PSA storage implementation
2019-02-21 17:30:56 -06:00
David Saada 41eb5cbfd9 Implement PSA protected storage & restructure PSA storage implementation
- Move all PSA storage code under psa/storage directory
- Create a global PSA error codes header, eliminating ITS specific ones
- Create a common header file for PSA storage type definitions,
  eliminating ITS specific ones
- Create a common implementation for PS & ITS
- Implement protected storage feature
- Change ITS test to be common to PS as well
2019-02-21 20:58:59 +02:00
Volodymyr Medvid b0a33273ff Correctly include EventQueue.h
There are two EventQueue.h in mbed-os codebase:
events/EventQueue.h
features/FEATURE_BLE/ble/pal/EventQueue.h

By accident, `mbed compile` generates includes.txt with the correct
order of include search paths. This is not the case for the CMake
exporter: targets with FEATURE_BLE enables fail to compile with errors:

mbed-os/features/cellular/framework/AT/ATHandler.h:99:60: error:
'events' has not been declared

Update all places to always include either "events/EventQueue.h"
or "ble/pal/EventQueue.h": to always find the correct header.
2019-02-21 17:59:05 +02:00
Martin Kojtal dbd92c746b
Merge pull request #9387 from tymoteuszblochmobica/Sockets
Multihoming initial release
2019-02-21 13:50:03 +01:00
Tymoteusz Bloch 641189c357 Multihoming change parameter orded in gethostbyname 2019-02-20 14:37:33 +02:00
Jaeden Amero dfab4de4cf crypto: test: Use new PSA error codes
The PSA Framework and PSA Crypto error code names have been unified and
renamed in some cases. Use the new unified names.
2019-02-20 11:31:30 +02:00
Martin Kojtal 7f4475d924
Merge pull request #9736 from 0xc0170/fix_licenses_files
tools/test/cmsis: add license header
2019-02-20 09:38:55 +01:00
Cruz Monrreal b59b8170a6
Merge pull request #9698 from michalpasztamobica/netsocket_documentation_cleanup
Netsocket documentation cleanup
2019-02-19 15:34:26 -06:00
Cruz Monrreal 4c04771c5d
Merge pull request #9653 from kfnta/tfm_src_integ
TF-M sources integration to Mbed-OS
2019-02-19 15:28:44 -06:00
Cruz Monrreal feae56eea1
Merge pull request #9493 from RonEld/add_platform_initialization_in_trng_test
Initialize platform in trng test
2019-02-19 15:27:40 -06:00
Cruz Monrreal 4cbcc36c3c
Merge pull request #9730 from michalpasztamobica/tlssocketsimultaneous_temporary_removal
Greentea: Remove TLSSocket_simultaneous test
2019-02-19 14:56:02 -06:00
Seppo Takalo 00feb5313a Update copyright years 2019-02-19 17:39:46 +02:00
Tymoteusz Bloch 49141376ee Multihoming initial release
Added Multihoming feature to LWIP (ability to use more than one network interfaces) for increasing networking reliability.
This involves:

    LWIP interface
    LWIP IP routing
    DNS storage
    Sockets (bind to interface name possibility)
    possibility to add non default network interface
    cellular middleware modifications if cellular connection is used
2019-02-19 17:39:46 +02:00
Michael Schwarcz 60c6740c88 Build SPM tests only for MBED_SPM targets 2019-02-19 15:19:05 +02:00
Martin Kojtal 31da50e8fa
Merge pull request #9718 from michalpasztamobica/greentea_tcpsocket_suite_timeout
Greentea tests: user-configurable timeouts
2019-02-18 14:15:39 +01:00
Ron Eldor 22bf92bb7e Initialize platform in trng test
Add calls to `mbedtls_platform_setup()` and
`mbedtls_platform_terminate()` to the trng greentea test, to
initialize the hardware acceleration engines, in some platforms.
2019-02-18 11:43:32 +02:00
Michal Paszta 5eaf08e899 Netsocket documentation cleanup 2019-02-18 10:40:42 +02:00
Martin Kojtal c08f51aa36 copyright 2019 fix 2019-02-15 13:37:40 +00:00
Michal Paszta ca57bdd481 Greentea tests: user-configurable timeouts
Now it is enough to add:
    "macros": [
        "MBED_GREENTEA_TEST_XXXSOCKET_TIMEOUT_S=20"
    ],
to mbed_app.json, where XXX is on of {DNS, TLS, UDP, TCP}.
Also network-* tests are now configurable: network-interface, network-wifi, network-emac with a similar macro.
2019-02-15 15:08:15 +02:00
Michal Paszta a089661f05 Greentea: Remove TLSSocket_simultaneous test
The reason is that some platforms lack memory to run it. To be brought
back once TLS library memory consumption is optimized.
2019-02-15 11:59:28 +02:00
Amir Cohen 92ed1cb10c Add flash sum check
Check that flash size sum up to all sectors combined
2019-02-14 17:30:51 +02:00
Martin Kojtal 17878e3ce8 test mbedmicro: fix licenses 2019-02-14 14:02:35 +00:00
Martin Kojtal 852f667d05 wifi test: add license info 2019-02-14 13:58:07 +00:00
Cruz Monrreal f2abdcbcc6
Merge pull request #9639 from michalpasztamobica/esp8266_connect_timeout
ESP8266: connect() checks errors from ESP chip
2019-02-13 20:00:37 -06:00
Cruz Monrreal da5719113c
Merge pull request #9701 from kfnta/entorpy_inject_test_refactor
Refactor psa entropy inject test
2019-02-13 17:28:53 -06:00
Cruz Monrreal 2e9d6d2938
Merge pull request #9645 from AriParkkila/cellular-netsocket
Change TESTS/netsocket/ for cellular testing
2019-02-13 17:28:35 -06:00
Cruz Monrreal 704a1cb6c8
Merge pull request #9702 from kfnta/psa_fix_partition_dpendecies
Fix dependencies of platform partition
2019-02-13 17:11:06 -06:00
Cruz Monrreal 1b233c5d5e
Merge pull request #9686 from michalpasztamobica/tlssocket_invalid_handshake_port_fix
Greentea tests: set correct port to test against google.com
2019-02-13 17:10:48 -06:00
Oren Cohen 45c44eb07c Fix dependencies of platform partition 2019-02-13 17:10:12 +02:00
Oren Cohen eb48d3cbeb Clear ITS environment in psa entropy tests
mbed_psa_reboot_and_request_new_security_state() API replaced its_reset() which is now a secure API only

This change is necessary for a clean environment for the test
2019-02-13 14:21:17 +02:00
Oren Cohen 6bb0894c47 Refactor psa entropy inject test
Replace TEST_ASSERT with more specific assertions
2019-02-13 14:20:55 +02:00
Ari Parkkila 56badd8616 Change TESTS/netsocket/ for cellular testing 2019-02-13 01:30:42 -08:00
Cruz Monrreal 3e6cd4e89d
Merge pull request #9501 from caixue1102/mbed-os-rda
Add WIFI support for RDA target UNO_91H
2019-02-12 20:05:27 -06:00
Cai d92e33dcee Add WIFI support for RDA target UNO_91H 2019-02-12 22:59:53 +08:00
Michal Paszta b5c00aa6b7 Greentea tests: set correct port to test against google.com 2019-02-12 15:40:11 +02:00
Martin Kojtal 091509705f
Merge pull request #9570 from VeijoPesonen/bugfix-tests-netsocket-udp_udpsocket_echotest_nonblock
tests-netsocket-udp: UDPSOCKET_ECHOTEST_NONBLOCK fixes
2019-02-12 09:55:20 +01:00
Cruz Monrreal 799476dd55
Merge pull request #9630 from michalpasztamobica/publish_documentation
Publish tests documentation for DNS, Emac, NetworkInterface and Wifi
2019-02-11 18:47:55 -06:00
Cruz Monrreal 5c4d5e346d
Merge pull request #9582 from michalpasztamobica/greentea_socket_improvements
Greentea Socket test improvements
2019-02-11 18:45:38 -06:00
Martin Kojtal 8f932a476f
Merge pull request #9449 from c1728p9/pinmap-extension
Pinmap extensions
2019-02-11 18:24:19 +01:00
Michal Paszta 6a184da381 ESP8266: connect() can handle ESP's errors.
ESP8266Interface::connect() checks the exact return value from
the underlying ESP8266::connect() call.
Increased timeout for network-wifi greentea tests to 6 minutes.
2019-02-11 17:20:14 +02:00
Russ Butler d5892ce312 Add a sanity check test for pinmaps
Add a test which sanity checks all pinmaps.
2019-02-08 09:10:50 -06:00
Amanda Butler ae20556635
Edit README.md
Edit file, mostly for inclusion of articles.
2019-02-07 16:10:38 -06:00
Amanda Butler e9c44a86ac
Edit README.md
Edit file, mostly for inclusion of articles.
2019-02-07 15:52:20 -06:00
Amanda Butler 629e8a0e05
Edit README.md
Edit file, mostly for inclusion of articles and complete sentences.
2019-02-07 15:45:08 -06:00
Veijo Pesonen 099cbb1d30 tests-network-interface: drops unreferenced variable 2019-02-07 12:04:09 +02:00
Veijo Pesonen ba75924c28 tests-netsocket-tls: TLSSOCKET_ECHOTEST deletes socket on failure case 2019-02-07 12:01:09 +02:00
Michal Paszta ea3d70e0b1 Publish tests documentation for DNS, Emac, NetworkInterface and Wifi
Documentation moved from internal Confluence pages.
2019-02-06 16:22:21 +02:00
Martin Kojtal dcba5ffa3c
Merge pull request #9529 from kfnta/its_crypto
RollUp PR Crypto with ITS
2019-02-04 17:14:05 +01:00
Veijo Pesonen df3cdaa983 tests-netsocket-udp: UDPSOCKET_ECHOTEST_NONBLOCK execution time limit
Test case is allowed to take not more than a half what has been given
to the whole UDP suite.

UDP test cases reorganized so that the longest running ones are
executed last.
2019-02-04 12:33:34 +02:00
Michal Paszta b3fd8a9bef Greentea DNS test: added debug print 2019-02-01 15:34:38 +02:00
Michal Paszta 99fc26ecdf Greentea Socket bind tests made ipv6-aware 2019-02-01 15:34:07 +02:00
Michal Paszta fba66cf7f3 Greentea UDPSOCKET_RECV_TIMEOUT increase time tolerance 2019-02-01 14:22:05 +02:00