patch fix the issue of unable to read from adc by setting
appropriate sampling delay.
The sampling delay should be set to resolution of adc + 2.
In adc qmsi driver the sampling delay received form application
is subtracted from resolution of adc + 2 , if the resultant value
is less than zero then zero is set as sampling delay. So in the
adc_simple application when 12 is passed as sampling delay driver
sets it as zero. So 26 is the minimum sampling delay should be
set in application for a adc with resolution of 12. The reason
to choose 30 was to maintain same value of sampling
delay between adc_simple and adc_api application.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
These tests test the IPv4 multicast address add, lookup and
removal functions found for network interface.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
From section 3.4.5.3 in the Mesh Profile Specification 1.0:
"A node shall implement a Local Network Interface."
Removing the Kconfig option also helps clean up quite a lot of code.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
All moved under tests/kernel/mem_protect to reduce clutter. Many more
tests are coming for 1.10 and 1.11.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This adds performance test for nffs with open, close, read, write and
unlink sub test cases.
Origin: Original
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This patch adds NFFS test suite ported from Mynewt. The test cases are
pretty much the same as in original implementation, however some of
them had to be adjusted to cover differences in Mynewt and Zephyr
filesystem APIs. Also the code was reformatted in some places to make
checkpatch happy.
All test cases from "basic" group can be also run on nRF52840 (nRF52 and
nRF51 do not have enough RAM to run all tests as-is).
Origin: Apache Mynewt NFFS
URL: https://github.com/apache/mynewt-nffs/tree/master
Commit: 6639f7a432e70db00ef25d5e558aedbe503a3c9a
Purpose: NFFS test suite
Maintained-by: Zephyr
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
nrf SOCs use external timer for measuring benchmarking stats.
Earlier this timer is programmed in 24 bit mode, due to which
is is getting expired in some of benchmark stats like mutex
lock/unlock. So configuring to 32 bit mode to avoid overflow.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Some of benchmark stats were not reported for nrf52/52 based SOCs.
This was because nrf based SOCs use external timer.
In timing info some of benchmark stats still use systick based APIs.
Due to which benchmarking number was not getting reported. So change
it to timer based for nrf.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
If IPv6 is disabled, then it is useless to try to resolve
IPv6 address because "struct sockaddr" does not have enough
space to store IPv6 address.
Fixes#1487
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add a simple test which generates a file that can be included
into a .c file. Then verify in zephyr that the file contains
the same bytes as the original file.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Fixing regression, address family is now called sa_family.
The testcase.yaml file was missing so no tests were actually run.
After making test to run, it was also failing because link address
was accessed before first fragment was set. This caused null pointer
access.
Fixes#1474
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There were bunch of config options in tests/net, net-shell and
wpan_serial sample, and those options had wrong name so they
were ignored by the code.
Fixes#1428
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Indenting preprocessor directives reduces the code readability, because
it make preprocessor directives harder to spot.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added tests for the mcuboot interface module and the image
storage module.
Both tests are checking flash content produced by modules verified.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Do not print messages by default on console for test cases.
Use SYS_LOG_INF which provides functionality to choose print whenever
require.
Signed-off-by: Punit Vara <punit.vara@intel.com>
This patch eliminates need to add logging/sys_log.h in test
cases which required to use this header file.
Signed-off-by: Punit Vara <punit.vara@intel.com>
It's now possible to instantiate a thread object, but delay its
execution indefinitely. This was already supported with K_THREAD_DEFINE.
A new API, k_thread_start(), now exists to start threads that are in
this state.
The intended use-case is to initialize a thread with K_USER, then grant
it various access permissions, and only then start it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
/tmp/bt-stack-tester is not a pipe, but unix domain socket.
This commit fixes respective "make run" errors:
qemu-system-arm: -serial pipe:/tmp/bt-stack-tester: Could
not open '/tmp/bt-stack-tester': No such device or address
qemu-system-arm: -serial pipe:/tmp/bt-stack-tester: could
not connect serial device to character backend
'pipe:/tmp/bt-stack-tester
Signed-off-by: Ruslan Mstoi <ruslan.mstoi@intel.com>
The (artificially small) ISR stack was overflowing on this test when
CONFIG_DEBUG was enabled on qemu_x86. Really there's no reason to be
restricting stack size at all in a memory pool test, just remove those
settings and use the defaults, which are fine.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If the query name is already in numeric format, there is no
need to send the query string to DNS server as we can just
convert it ourselves.
Jira: ZEP-2562
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
nrf SOC uses nrf rtc timer (not sys tick), which is 32kHz,
whereas CPU runs at higher speed (nrf52 runs at 64MHz).
So 32Khz is too slow to measure critical kernel parameters.
This patch does :-
1. Add support for nrf SOC for timing_info benchmarking.
2. Uses SOC timer to measure kernel parameters.
Jira: ZEP-2314
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
The API/Variable names in timing_info looks very speicific to
platform (like systick etc), whereas these variabled are used
across platforms (nrf/arm/quark).
So this patch :-
1. changing API/Variable names to generic one.
2. Creating some of Macros whose implimentation is platform
depenent.
Jira: ZEP-2314
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
We use UART1 for UART pipe in a number of qemu tests, so lets do the
same thing for the bluetooth test and move the bluetooth uart to UART2.
Jira: ZEP-2412.
Signed-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Implement the first Vendor-Specific Command of the Zephyr specification
other than the 3 mandatory ones already present in the codebase, along
with a Kconfig option to enable and disable the presence of the VS
commands.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The documentation of k_fifo_put mentions that the items must have 32
bits reserved for kernel use as that is where the sys_snode_t pointer
is placed but this detail was not taken into consideration when
designing the cmd_queue which access each element as a btp_cmd.
Note: This probably used to work just because k_fifo_get used to place
data directly into thread's swap_data so the kernel never really touched
the list but with the changes to use k_poll the list is always updated
exposing this issue.
Jira: ZEP-2568
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This was failing to build when the PWD was not that of the
tests/benchmarks/object_footprint because it was asking to load
$(PWD)/Kconfig.
Kconfig shall be specified with no directory location, as the file
will be imported relative to to Zephyr app's directory.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
The verify_send_report() failed in quark_se_c1000_devboard because
the multicast group was already joined. We can safely ignore this
error for this specific test.
Fixes#1240
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This tests the situation when there are multiple threads calling
k_queue_get which was causing issues when using k_poll.
Jira: ZEP-2553
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This is necessary in order for k_queue_get to work properly since that
is used with buffer pools which might be used by multiple threads asking
for buffers.
Jira: ZEP-2553
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>