This patch updates the alignment for the memory domain partitions.
Also update the stack size for qemu_cortex_m3.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Adds many missing sensor drivers and rebalances the testcases to
instantiate similar numbers of sensor drivers. Splits the sensor trigger
testcase into two due to having too many thread objects.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit removes all MPU-related (ARM_CORE_MPU and NXP_MPU)
options exept ARM_MPU, which becomes master switch controlling
MPU support on ARM.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
The ARM_MPU_NRF52X option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.
This commit removes the ARM_MPU_NRF52X option and replaces
its usage by ARM_MPU option.
Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
New shell implementation is on the way. For now old one and all
references are kept to be gradually replaced by new shell.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Set CONFIG_USERSPACE in the prj.conf to ensure its set, right now
getting CONFIG_USERSPACE depends on tests/Kconfig setting it.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Rename _DEVICE_STRUCT_SIZE to _DEVICE_STRUCT_SIZEOF. This causes it to
be picked by the script 'gen_offset_header.py' and inserted into the
header file 'include/generated/offsets.h'.
Renaming from x_SIZE to x_SIZEOF will align it's name with the other
symbols that denote a sctruct's size, like K_THREAD_SIZEOF.
Furthermore, it will allow the symbol to be accessed through a header
file define, instead of only as an extern symbol. This is more
flexible, and more aligned with the other symbols in offsets.
Finally, if we are able to move all of offsets.c symbols into the
offsets.h header file we be able to remove offsets.o from the link and
thereby simplify the linking process.
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
tests/subsys/logging/log_core does not work if inplace processing
is set and the process thread is disabled.
So let's set the valid configuration in its project file
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.
The only directory excluded directory was ext/* since it contains
only imported code.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The result of both printk and vprintk are not used in any place.
MISRA-C says that the return of every non void function must be
checked.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This test is intended to validate k_pipe_alloc_init()
and k_pipe_cleanup(), when CONFIG_USERSPACE is not defined.
Also added test to validate pending reader and pending writer
feature in pipe.
Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
With the new Kconfig preprocessor (described in
https://github.com/torvalds/linux/blob/master/Documentation/kbuild/
kconfig-macro-language.txt), the syntax for expanding environment
variables is $(FOO) rather than $FOO.
$(FOO) is a general preprocessor variable expansion, which falls back to
environment variables if the variable isn't set (like in Make). It can
also be used in prompts, 'comment's, etc.
The old syntax will probably be supported forever in Kconfiglib for
backwards compatibility, but might as well make it consistent now that
people might start using the preprocessor more.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Put all tinycrypt tests into one project. Having project for every small
feature does not scale and slows down testing and CI operations.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Rather than having some implied name for the logging name, explicitly
pass it in the macros LOG_MODULE_REGISTER & LOG_MODULE_DECLARE.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Create a basic test for the realtime clock. This sets the clock value
to a particular time, half a second in, and monitors the clock for a few
seconds, making sure that the value returned is reasonable.
Signed-off-by: David Brown <david.brown@linaro.org>
*_ll_src/*_ll_dst/*_ll_swap/*_ll_if were not self explanatory, ll
meaning "link layer" it's ambiguous what the names meant.
Changing to:
*_lladdr_src/*_lladdr_dst/*_lladdr_swap/*_lladdr_if to fix this.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This change adds DTS definition of SPI device for nRF chips.
It also removes SPI pin configuration from Kconfig and moves it to
chip DTS.
Signed-off-by: Filip Kubicz <filip.kubicz@nordicsemi.no>
Add additional test scenarios to validate signal event
APIs such as setting signal from ISR, setting/clearing
each unique flag and few negative test cases too.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
Introduce test to check that only the thread which locks the mutex
shall be able to release it.
Signed-off-by: Rajavardhan Gundi <rajavardhan.gundi@intel.com>
The BT threads are interfering with the main thread priority selection
and the test fails semi-spuriously on NRF5x boards with "threads ran
too soon" (i.e. not an EDF failure per se, but the fact that the new
threads at K_LOWEST_APPLICATION_PRIO are running instead of the test
thread). This is a reasonable workaround for testing the
SCHED_DEADLINE ordering behavior, though.
Fixes#9843
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
While it's possible to define which mbedTLS config header to use, our
samples should use config-tls-generic.h as default because this header
is configurable through Kconfig.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Simple test for CONFIG_SCHED_DEADLINE. It creates a bunch of threads
at randome deadlines but within the same priority, and validates that
they run in the correct order.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
In NRF52 we need to write to a capture register to retrieve the current
counter value. This was missing for userspace implementation.
Fixes: GH-9676
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Building with !MULTITHREADING is designed for bootloaders and similar
minimal-functionality use cases. It's pathologically silly to combine
it with MMU drivers and address space partitioning, even though on
some architectures that technically works (on ARM, it seems not to).
The test intent was to disable this originally, but it turns out that
doesn't work. There is a TEST_USERSPACE kconfig symbol that also
needs to be explicitly turned off, otherwise it will reselect
USERSPACE against our wishes.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Add the missing sha256 crytographic algorithm testcase for
execution via ztest. The sub test case was not getting executed
as it was missed to be added in ztest suite.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
Added few more tests to cover all the message
send and receive scenarios. Added negative tests
to increase code coverage.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Fixes the gen_isr_table kernel test on mimxrt1050_evk by using data and
instruction synchronization barriers instead of disabling compiler
optimization on arm platforms. According to [1] section 4.5, "if a
pended interrupt request needs to be recognized immediately after being
enabled in the NVIC, add a DSB instruction and then an ISB instruction"
[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0321a/BIHJDAAE.html
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This adds some test cases where the pipe buffer is smaller than
the size of data being pushed through the pipe.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Adds board-specific macros to enable the adc_api test to run on kinetis
boards. This restores the test to support all the nxp boards that were
supported before the new adc api was introduced.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This adds to the adc_api test board-specific configurations
for the following boards:
- nrf51_pca10028
- nrf52_pca10040
- nrf52840_pca10056
"adc" is indicated as supported in the yaml files for these boards
so that they are included in sanitycheck.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
This commit replaces the API for ADC drivers with a reworked one.
As requested in the issue #3980, the adc_enable/adc_disable functions
are removed. Additionaly, some new features are introduced, like:
- asynchronous calls
- configuration of channels
- multi-channel sampling
Common parts of code that are supposed to appear in each implementation
of the driver (like locking, synchronization, triggering of consecutive
samplings) are provided in the "adc_context.h" file to keep consistency
with the SPI driver. Syscalls are no longer present in the API because
the functions starting read requests cannot use them, since they can be
provided with a callback that is executed in the ISR context, and there
is no point in supporting syscalls only for the channels configuration.
"adc_api" test is updated and extended with additional test cases,
with intention to show how the API is supposed to be used.
"adc_simple" test is removed as it does not seem to add much value.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
No need to have setup and teardown functions. Teardown will
even cause crash when tearing down last IPv4 test.
Fixes#9617
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Run networking tests for native_posix, qemu_x86 and qemu_cortex_m3
platforms only as the tests are generic enough so no need to run
them in real physical device.
Fixes#9623#9614#9622#9621#9618
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Few SoCs whose clock speed is very less will cause multiple ticks
to occur for 1 sec of sleep. For such a platform we cant run
the loops for over 5000 because the tick handler will get executed.
Thus rendering the test useless for such platforms. By reducing
the number of iterations we get the required benchmark results.
Fixes: GH-7906
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
For boards like nrf52 with low system clock (32768), k_busy_wait
for values less than 1 second (1000000 us) ends up waiting less
than the desired wait time because of decimal truncation while
converting wait time to hw clock cycles. Hence increased the wait
to 1 second.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
For ARC MPU version 3, the defined partitions are not added to MPU
when appmem_init_app_memory is doning app_bss_zero().
So need to disable mpu first to allow appmem_init_app_memory to
access all partitions.
Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
Add more stack for this test, it was failing and hidden by sanitycheck
(which needs to be fixed somewhere else).
Fixes#9664
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added couple of negative tests for osSemaphoreWait
and osSemaphoreRelease to increase code coverage.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
Add additional test usecases in cmsis mutex to check
maximum number of mutexes allowed at a time. Also, add
couple of negative tests for invalid parameter check.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
The test errors on Arduino_101 due to
limitations in power management driver
on the platform. Hence excluding this.
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
The stack size was way too less. Increasing the size to minimum
of 512 for all platforms.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Remove this feature specific to QMSI and available through samples only
to allow for migration to tracing hooks.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This patch provides support needed to get timing related
information from riscv32 based SOC.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch provides support needed to get timing related
information from nios2 based SOC.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch provides support needed to get timing related
information from xtensa based SOC.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Discard selected measurements that occur immediately before and
after the timer interrupt occurs. This causes fluctuations in the
time measured.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Add implementation of timestamp_serialize() for xtensa, nios2
and riscv. The implementation for the above architectures is an
empty function.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
This patch provides support needed to get timing related
information from ARC based SOC.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
Added new KPIs for the userspace benchmarks.
1. Drop to user mode.
2. User thread Creation.
3. Syscall overhead.
4. Validation overhead k object init.
5. Validation overhead k object permission.
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
WDT_NRFX is now enabling by default. Its configuration from proj.conf
files was removed.
Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
Assisning system heap to the current thread.
And validate allocation and free memory from the same system
heap memory pool.
Signed-off-by: Ajay Kishore <ajay.kishore@intel.com>
Add checks so that we do not overflow the network interface
array. Similar issues was fixed in commit b4dae00741 for
TX timestamp tests.
Fixes#9465
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Refactor usage of net_sprint_ip*() where multiple
invocations are needed per single log call.
Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
Fixes#9462
Coverity ID: 187670
Attempts to recalculate deltaBandwidth with no link lead to division by
zero.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
irq_lock returns an unsigned int, though, several places was using
signed int. This commit fix this behaviour.
In order to avoid this error happens again, a coccinelle script was
added and can be used to check violations.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Add testcase for validating poll events by manipultaing thread
state to improve code coverage. Also, add multiple threads to
wait on same event.
Signed-off-by: Praful Swarnakar <praful.swarnakar@intel.com>
Add tests for kernel managament APIs and enhance memory
pool tests with bulk allocation, free and negative cases.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
PTS test cases MESH/NODE/TNPT/BV-07-C, MESH/NODE/TNPT/BV-12-C, requires
to receive 8 segment of data which summary requires 108 bytes of SDU.
This patch make test cases PASSing.
Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>