Commit Graph

396 Commits

Author SHA1 Message Date
Andrew Boie 027b6aaf89 tests: set userspace tag for all tests that use it
This lets us quickly filter tests that exercise userspace
when developing it.

Some tests had a whitelist with qemu_cortex_m3; change
this to mps2_an385, which is the QEMU target with an
MPU enabled.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Andy Ross 0c59471436 tests/drivers/ipm: Enable on (uniprocessor) x86_64
This test was having trouble earlier (at least with some toolchains),
but whatever was causing that seems to have been fixed.  The only
remaining issue is that neither the IPM console code nor the test are
SMP-safe.  There's a bug (#14639) tracking the need to get these
working, but for now the straightforward workaround is just to disable
SMP.

And even long term, IPM is an oddball interprocessor communication
mechanism designed for asymmetric multiprocessing devices like Quark
SE and doesn't seem like an obvious fit for a SMP machine.

Fixes #12478

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-04-04 22:32:39 -04:00
Andrew Boie b942efda58 tests: adc_api: run adc_read_async() from user
We define a system heap and assign our resource pool
from it as k_poll() requires an implicit allocation.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-02 14:17:37 -04:00
Andrew Boie 02be448cc4 drivers: adc: add some missing system calls
Setting callbacks is forbidden from user mode.

Some heavier code changes will be needed to support
adc_read_async(), this patch just exposes the config
and read functions for now.

Test case updated to run partially in user mode.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-03-29 22:21:16 -04:00
Anas Nashif 15cdeb9352 tests: fix various test identifiers
Fix various test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-03-29 17:44:11 -04:00
Patrik Flykt 21358baa72 all: Update unsigend 'U' suffix due to multiplication
As the multiplication rule is updated, new unsigned suffixes
are added in the code.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Aaron Tsui f7e7f0f55e tests: watchdog: Debug for boards enabled TEST_WDT_CALLBACK_2
The original code cannot go to the next step on those boards enabled
TEST_WDT_CALLBACK_2 macro, because of the flow control issue. So the
test function cannot finish, and the board keeps restart. As a result,
failure on the test.

Fixes #13468

Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
2019-03-28 16:47:06 -05:00
Song Qiang cb26591fc7 sensor: fxos8700: add forgot int2 defines to dts_fixup.h
The last commit changes FXOS8700 to use new DT defines in its
dts_fixup.h, and the build was also succeeded after it. But
DT_NXP_FXOS8700_0_INT2_GPIOS_CONTROLLER and
DT_NXP_FXOS8700_0_INT2_GPIOS_PIN were missed so the build_all project
is still failing.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-03-28 10:54:31 -05:00
Mieszko Mierunski cbf4e54ead tests: uart: Add nrf9160_pca10090 to UART async test
Add nrf9160_pca10090 to UART async test.
Add myself as codeowner to uart_async_api tests.

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Mieszko Mierunski 48f005707e tests: uart: Add chained write test case for UART async API
Add new test case

Signed-off-by: Mieszko Mierunski <mieszko.mierunski@nordicsemi.no>
2019-03-28 09:30:57 -04:00
Maureen Helm 0cff42fe9d drivers: sensor: Refactor apds9960 to use const config struct
Refactors the apds9960 sensor driver to get the i2c device name, i2c
device address, gpio device name, and gpio pin from a constant device
configuration structure, rather than using hardcoded macros. This will
make it easier to change the names of the macros and to instantiate
multiple instances of the driver.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-03-15 10:30:53 -05:00
Henrik Malvik Halvorsen 64fd822652 drivers: sensor: adxl362: Driver update and CS support
Updated to add support for CS. DT config names updated
to adhere to the DTS naming convention. Init and SPI
configuration now follows the device datasheet.

Signed-off-by: Henrik Malvik Halvorsen <henrik.halvorsen@nordicsemi.no>
2019-03-15 07:39:05 -05:00
Song Qiang 5c0f6a3329 sensor: fxos8700: Convert to new DT_<COMPAT>_<INSTANCE> defines
The old defines make the Shippable tests fail. Convert the fixing
ups for fxos8700 to use new defines introduced in #12491.

Signed-off-by: Song Qiang <songqiang1304521@gmail.com>
2019-03-15 07:23:27 -05:00
Krzysztof Chruscinski 3b27779cf6 tests: drivers: counter: Fix coverity issues
Issues 190937, 190952, 190967, 190983

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-13 09:08:55 -05:00
Alexander Wachter 3aa8443ab4 tests: drivers: build_all: add CAN to the build tests
This commit adds CAN to the build_all tests.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-03-11 16:54:42 -07:00
Kumar Gala ca357ee46c tests: spi: spi_loopback: Drop default SPI_1_NAME symbol
We use to define the SPI bus device name in Kconfig, however now that
all SPI bus controllers use DTS that comes from DTS, so SPI_1_NAME is
never set to anything.  So remove it and leave it to the config frag in
the boards dir in the test to set the name.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-03-08 05:38:04 -06:00
Krzysztof Chruscinski 244aecf2d2 tests: drivers: counter: Fix coverity issue (190952)
Fix issue reported by coverity regarding using volatile
variables in zassert_equal macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-05 12:37:18 -06:00
Krzysztof Chruscinski e318401426 tests: drivers: counter: Fix coverity issues 190937, 190967, 190983
Fix issue reported by coverity regarding using volatile variable
in zassert_equal macro.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-03-05 12:37:18 -06:00
Piotr Zięcik 05fa9c8318 drivers: counter_nrfx_timer: Port driver to DTS
This commit updates the counter_nrfx_timer driver in order to
use device tree infrastructure.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-03-01 19:46:57 +01:00
Piotr Zięcik 298b841873 drivers: counter_nrfx_rtc: Port driver to DTS
This commit updates the counter_nrfx_rtc driver in order to
use device tree infrastructure.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2019-03-01 19:46:57 +01:00
Sebastian Bøe 4e5300ba7f cmake: Drop all in-tree usage 'set_conf_file'
Port all users of 'set_conf_file' to use the built-in rules
instead. This follows the convention-over-configuration principle to
make the system as a whole simpler and more consistent.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2019-03-01 09:44:09 +01:00
Flavio Ceolin ed7fb7548f tests: hwinfo: Fix invalid assertion
The return of hwinfo_get_device_id is a signed size and it returns a
negative number in case of error. This test was using an unsigned
variable invalidating the errror check.

CID 190929

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-01 09:41:48 +01:00
Savinay Dharmappa ade05335b3 tests: counter: Adapt test for the qmsi rtc driver
The qmsi rtc hardware supports a single alarm only and a fixed top
value, so restructure the counter_basic_api test to skip unsupported
features.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-27 12:33:53 -08:00
Kumar Gala 34a2630141 drivers: gpio: sx1509b: convert to DT_<COMPAT>_<INSTANCE> defines
Convert sx1509b sensor driver to use new defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-27 10:19:30 -06:00
Savinay Dharmappa f6208622fb boards: x86: quark_d2000_crb: exclude watchdog test case
patch exclude the watchdog test case for quark_d2000_crb
,as it seen that upon watchdog reset the conents of ram are lost.
Hence the existing testcase fails.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-27 00:28:40 -08:00
Kumar Gala bb6b1918b2 drivers: can: stm32: Cleanup Kconfig enablement
Follow the pattern we have for other peripherals in that if the driver
class (CAN) is enabled than enable the driver for that class
(CAN_STM32).  Also have the STM32 CAN driver depend on being on a STM32
SoC.

Remove setting of CONFIG_CAN_STM32 in any .conf files as it will get set
of CONFIG_CAN is set/enabled.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-25 10:05:21 -06:00
Tavish Naruka df500c164c boards: arm: add Electronut labs papyr (nrf52840_papyr)
Added config for https://docs.electronut.in/papyr/

Signed-off-by: Tavish Naruka <tavishnaruka@gmail.com>
2019-02-25 13:01:46 +01:00
Jukka Rissanen 23ba884b2b tests: can: Fix name of CAN msg and filter structs
The name of the CAN message and filter was changed so this
needs to be changed too here.

Fixes #13716

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-02-24 19:00:18 -06:00
Nicholas Lowell f288bcaf99 pwm: add set nanosecond period and pulse width function
For improved precision of high speed PWMs, the new
function will allow you to specify period and pulse
at the nanosecond resolution.

Signed-off-by: Nicholas Lowell <nlowell@lexmark.com>
2019-02-21 18:07:40 -05:00
Krzysztof Chruscinski c73dc42a82 tests: drivers: counter: Test cleanup
Minor cleanup in counter test.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-13 18:15:56 -05:00
Krzysztof Chruscinski 849726b3e4 tests: drivers: counter: Fix single_shot_alarm_top and multiple_alarms
Tests were failing because:

1. `alarm_cnt` was not reset before the test.
2. one test was failing because it was expecting that setting
`top_value` for channel_alarm is too high value but in fact
it is accepted and `top_value+1` is too much.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-02-13 18:15:56 -05:00
Ryan Erickson cb516b4bc9 tests: drivers: adc: adc_api: Add BL654 board support
Add case to support the BL654 DVK board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdtech.com>
2019-02-13 11:02:56 -06:00
Kumar Gala a6eab1be4b tests: spi_loopback: reduce footprint by tweaking logging
Using CONFIG_LOG_IMMEDIATE gives us some flash back.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-13 08:15:37 -06:00
Anas Nashif 054e1bec2d tests: adc: reduce footprint by tweaking logging
Using CONFIG_LOG_IMMEDIATE gives us some flash back.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-02-12 23:38:55 -05:00
Ryan Erickson 90d1e6f6c6 tests: drivers: adc: adc_api: Add BL652 board support
Add case to support the BL652 DVK board.

Signed-off-by: Ryan Erickson <ryan.erickson@lairdtech.com>
2019-02-12 21:16:26 -05:00
Alexander Wachter 548f1f1fff tests: drivers: Add aditional tests for stm32 CAN driver
This commit adds specific stm32 CAN driver testing.
The test covers filter handling.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-12 09:39:30 -05:00
Alexander Wachter 241f945e49 tests: drivers: Add basic tests for CAN driver
This commit adds basic test for the CAN driver and API.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-02-12 09:39:30 -05:00
Kumar Gala 658186bb50 tests: i2c: i2c_slave_api: Remove dead Kconfig symbols from conf file
The following symbols don't exist so remove them from prj_virtual.conf:
	CONFIG_I2C_EEPROM_SLAVE_0_CONTROLLER_DEV_NAME
	CONFIG_I2C_EEPROM_SLAVE_1_CONTROLLER_DEV_NAME

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-11 22:29:58 -05:00
Kumar Gala 7731732160 tests: drivers: counter_basic_api: Convert to use DT_ prefixed defines
The code has been using non DT_ prefixed defines for DT generated
defines.  Switch to use DT_ prefixed ones as we want to deprecated
the non DT_ prefixed defines.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 16:03:17 -06:00
Armando Visconti 208f565bce driver/sensor: add LIS2DW12 sensor support
Add support to STM LIS2DW12 3-axis accelerometer driver.
The driver support I2C and SPI bus communication and both
polling and drdy trigger mode.

Co-authored-by: Mario Tesi <mario.tesi@st.com>
Signed-off-by: Armando Visconti <armando.visconti@st.com>
2019-02-08 15:22:42 -06:00
Savinay Dharmappa f2f049d891 tests: drivers: counter: Enable tests
patch enables tests for qmsi counters and rtc.

Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
2019-02-08 08:56:45 -05:00
Aurelien Jarno 41cdfd5920 tests: Add sam_e70_xplained config in pwm_api
Default to the PWM0 channel 2, as it is the only one available in a
non-inverted form on the EXT1 and EXT2 connectors. That way the measured
voltages match the expected ones.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2019-02-08 06:55:14 -06:00
Piotr Mienkowski 8a86b5aaac api: counter: rename counter_disable_channel_alarm()
The function to set channel alarm is called counter_set_channel_alarm.
To match the name of the function performing the reverse operation this
commit renames counter_disable_channel_alarm() function to
counter_cancel_channel_alarm().

Signed-off-by: Piotr Mienkowski <piotr.mienkowski@gmail.com>
2019-02-08 10:47:40 +01:00
Peter A. Bigot d080d1d791 tests: gpio: basic_api: correct constant test for interrupt trigger
Interrupts default to trigger on level for historical reasons, so use of
GPIO_INT_LEVEL` as a mask results in a zero value.  Use a mask macro to
isolate the trigger configuration.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-02-07 22:46:37 -06:00
Erwan Gouriou 2cefc60973 tests: counter: Update to support STM32 RTC counter
Update counter_basic_api test to support STM32 RTC counter.
Add device to list and skipp not supported test cases.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-07 16:14:00 -05:00
Erwan Gouriou 50da5bb214 tests/drivers: counter: bump cmake minimum version
counter_basic_api test is cmake outdated.
Set it to newest version.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2019-02-07 16:14:00 -05:00
Kumar Gala 7809970c8a drivers: counter: cmsdk: Convert to new DT_<COMPAT>_<INSTANCE> defines
Convert cmsdk driver to use new defines so we can remove the
dts_fixup.h code for it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-07 16:14:00 -05:00
Kumar Gala c2a04890d9 tests: counter_basic_api: Enable tests for ARM CMSDK drivers
Enable testing of counter (COUNTER_{D}TMR_CMSDK) on mps2_an385 and
enable timers on v2m_beetle (TIMER_{D}TMR_CMSDK).

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-07 16:14:00 -05:00
Maureen Helm 210a71f108 tests: counter: Enable debug logging
Enables debug logging in the counter_basic_api test. Fixes a build error
in the nrf counter drivers when logging is enabled.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2019-02-07 16:14:00 -05:00