shell_exec expects a string that is null-terminated but if line passed
to strncpy is equal or bigger than the buffer it will not produce a
null-terminated command.
Jira: ZEP-2474
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The API name space for Bluetooth is bt_* and BT_* so it makes sense to
align the Kconfig name space with this. The additional benefit is that
this also makes the names shorter. It is also in line with what Linux
uses for Bluetooth Kconfig entries.
Some Bluetooth-related Networking Kconfig defines are renamed as well
in order to be consistent, such as NET_L2_BLUETOOTH.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Print the entire memory areas of interest on error, instead of
stopping at the first null character.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This includes files for both polled and IRQ-driven I/O. The log level
is deliberately kept to ERROR to try to shake out any timing-dependent
bugs which go away with extra logging.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
k_thread_cancel() is replaced with k_thread_abort() because
k_thread_cancel() is used to cancel threads that have not started yet.
Canceling asynchronous thread was returning an error.
Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- sha256.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- mbedtls.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- hmac_prng.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- hmac.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- ecc_dsa.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- ecc_dh.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- ctr_prng.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- ctr_mode.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- cmac_mode.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- ccm_mode.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- cbc_mode.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced test points with ztest APIs wherever possible
- replaced CONFIG_MAIN_STACK_SIZE with CONFIG_ZTEST_STACKSIZE
in the config file
- split the main file into two files:
- main.c has ztest entry and runs separate functions for ztest
- aes.c has the original routines
JIRA: ZEP-2449
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- replaced a test point with ztest API
- separated the main file into two:
- main.c, which has ztest entry
- xip.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- added a ztest test point
- separated the main file into two files:
- main.c, which has ztest entry
- multilib.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file already had ztest functions
- separated the main file into two:
- main.c, which has the ztest entry
- libraries.c, which has the original routines
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file does not use ztest asserts
- separated the main file into two files:
- main.c, which has ztest entry
- arm_runtime_nmi.c, which has the original routine
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
- file already had ztest functions
- separated the main file into two:
- main.c, which has the ztest entry
- arm_irq_vector_table.c, which has the original routines
JIRA: ZEP-2382
Signed-off-by: Niranjhana N <niranjhana.n@intel.com>
This enables IPSP node role which requires IPSS GATT service to be
registered.
Jira: ZEP-2451
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
As luck would have it, the TSS for the main IA task has
all the information we need, populate an exception stack
frame with it.
The double-fault handler just stashes data and makes the main
hardware thread runnable again, and processing of the
exception continues from there.
We check the first byte before the faulting ESP value to see
if the stack pointer had run up to a non-present page, a sign
that this is a stack overflow and not a double fault for
some other reason.
Stack overflows in kernel mode are now recoverable for non-
essential threads, with the caveat that we hope we weren't in
a critical section updating kernel data structures when it
happened.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Historically, stacks were just character buffers and could be treated
as such if the user wanted to look inside the stack data, and also
declared as an array of the desired stack size.
This is no longer the case. Certain architectures will create a memory
region much larger to account for MPU/MMU guard pages. Unfortunately,
the kernel interfaces treat both the declared stack, and the valid
stack buffer within it as the same char * data type, even though these
absolutely cannot be used interchangeably.
We introduce an opaque k_thread_stack_t which gets instantiated by
K_THREAD_STACK_DECLARE(), this is no longer treated by the compiler
as a character pointer, even though it really is.
To access the real stack buffer within, the result of
K_THREAD_STACK_BUFFER() can be used, which will return a char * type.
This should catch a bunch of programming mistakes at build time:
- Declaring a character array outside of K_THREAD_STACK_DECLARE() and
passing it to K_THREAD_CREATE
- Directly examining the stack created by K_THREAD_STACK_DECLARE()
which is not actually the memory desired and may trigger a CPU
exception
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These tests have been copied over from TinyCrypt and modified slightly
so that they compile on a non-POSIX system, with a minimal C library:
that's why it doesn't comply with Zephyr's coding style.
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This sensor was made dependent on certain boards, so building it with
all boards fails now. Disable until proper fix exists.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Use net app API since we want to enable MQTT with TLS.
mqtt_connect() and mqtt_close() are added to build and close the
connection to the broker. The caller doesn't need to deal with
the net context anymore and the most of network setup code in
mqtt_publisher is removed.
Signed-off-by: Aska Wu <aska.wu@linaro.org>
Change the common "init with 0" + "give" idiom to "init with 1". This
won't change the behavior or performance, but should decrease the size
ever so slightly.
This change has been performed mechanically with the following
Coccinelle script:
@@
expression SEM;
expression LIMIT;
expression TIMEOUT;
@@
- k_sem_init(SEM, 0, LIMIT);
- k_sem_give(SEM);
+ k_sem_init(SEM, 1, LIMIT);
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
When an app uses a construct such as:
obj-y = main.o ../../../../samples/bluetooth/gatt/hrs.o
in its makefile, it causes said object module to be built in the
source tree, not in the object tree.
When building massively parallel, this usually resuls on the files
getting corrupted, leading to bugs such as:
https://jira.zephyrproject.org/browse/ZEP-2316https://jira.zephyrproject.org/browse/ZEP-2317
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:3: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:4: warning: NUL character seen; rest of line ignored
src/../../../../samples/bluetooth/gatt/.gap.o.cmd:5: *** missing separator. Stop.
as multiple build are trying to touch the same file in the source tree
and of course, race and causes a build bug.
We have known about this issue for a long time, but it requires
modifications in the build system that there is no time to tackle.
A suggested workaround is to include the source files into a local .c
file, so this is what this patch does, to remove the random noise.
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
This is a configuration that is unrealistic and used only to verify
Kconfig dependencies, trying to build this for every board fails due to
size limitations and due to unavailable device support on some of those
boards, building for qemu targets should be good enough.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
In many networking tests we had to configure SLIP in the prj.conf
leaving those configurations Qemu specific. This change enables SLIP for
QEMU targets automatically and allows reuse of prj.conf for multiple
boards.
Additionally, the TUN options is removed. This option was not used
anywhere.
To enable self-contained networking tests that do not depend on SLIP, we
introduce the new option NET_TEST which disables TAP and allows testing
in QEMU without the need for a host interface.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The Imax doublings value was too large which caused overflow
of Imax_abs value, which then could cause Trickle test to fail.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The majority of these fixes adjust the memory limit needed to build the
various tests on systems with and without BLE support. We also fixup
one test case that was able to run on platforms with 16k of memory.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
A number of the network tests have minimal memory requirements that not
all boards are able to meet. Add in those memory requirements so we
don't attempt to build these tests for those platforms. Utilized the
frdm_kl25z (with 16K of memory) and cc2650_sensortag (with 20K) to test
the limits.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>