This test case is so timing sensitive that gathering code
coverage data screws up the results.
Since this is an abnormal execution environment anyway,
just skip the assertions if CONFIG_COVERAGE=y.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We didn't have any coverage of the system call handlers for
k_wakeup() and k_is_preempt().
Increase RAM requirements due to stack alignment constraints
on MPU platforms when user mode is enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fix how the tstacks array was declared extern so this
actually compiles on all platforms with user mode enabled.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
The start of generated/cfb_font_dice.h looked like this:
/*
* This file was automatically generated using the following command:
* /home/john/zephyrproject/zephyr/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* /home/john/tmp/build/zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
For build reproduction and "privacy" reasons, change it to this:
/*
* This file was automatically generated using the following command:
* ${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py
* --input fonts/dice.png --output
* zephyr/include/generated//cfb_font_dice.h
* --width 32 --height 32 --first 49 --last 54
*/
Test with:
sanitycheck -p reel_board \
-T $ZEPHYR_BASE/samples/display/cfb_custom_font/
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add __ASSERT() for coverity issue CID: 198874. Assert is used instead
of check since this is callback we get from stm32cube.
Fixes#16573
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
YAML document separators are needed e.g. when doing
$ cat doc1.yaml doc2.yaml | <parser>
For the bindings, we never parse concatenated documents. Assume we don't
for any other .yaml files either.
Having document separators in e.g. base.yaml makes !include a bit
confusing, since the !included files are merged and not separate
documents (the merging is done in Python code though, so it makes no
difference for behavior).
The replacement was done with
$ git ls-files '*.yaml' | \
xargs sed -i -e '${/\s*\.\.\.\s*/d;}' -e 's/^\s*---\s*$//'
First pattern removes ... at the end of files, second pattern clears a
line with a lone --- on it.
Some redundant blank lines at the end of files were cleared with
$ git ls-files '*.yaml' | xargs sed -i '${/^\s*$/d}'
This is more about making sure people can understand why every part of a
binding is there than about removing some text.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
When advertising with different identities we need to flag any
programmed RPA as invalid if it was generated using a different
identity.
Fixes#16893
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This array was created because more than 4 bytes were needed, however
now the minimum is 8 bytes, so we can use the net_buf user data
directly.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Commit b65fe62719 updated the minimum
required net_buf user data to 8 bytes, so increase this define as
well. It has no other practical purpose except to trigger build
asserts if the user data is for some reason ever decreased below this
minimum.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Some MPU systems require region power-of-two alignment
and can't automatically use remaining RAM for the newlib
heap. Set it for this case. Fixes this test on mps2_an385.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
pyocd 0.21.0 provides pack support 'pack support' functionality,
as opposed to current 'buitlin support'.
This new feature enables the possibility to add pyocd support
for any chip that is documented in Keil database. Then one doesn't
need anymore to wait pyocd is updated with a new target to use
pyocd with his target, as long as it is populated in Keil database.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
The zephyr-file role creates a link to the GitHub copy of a file. Some
files have been moved so update the file references in the documentation
(found by scanning for uses of :zephyr-file:)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Fix misspellings and doc issues missed during regular reviews (including
some files without a trailing newline)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
split ext/hal/st into two modules:
- hal_stm32: For the code meant to run on STM32
- hal_st: For the code meant to drive ST components
Fixes#16316
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add an option that only invokes the cmake phase of sanitycheck. This
can be useful for any testing that only needs to initial generation
phase of cmake, for example device tree. Also useful if we want to
just generate compile_commands.json files from cmake via:
./sanitycheck -xCMAKE_EXPORT_COMPILE_COMMANDS=1 --cmake-only
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This updates all client modules to const char processing of
setting names.
Update of peripheral_dis sample
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
The settings module processes the variable name by splitting it up in
a set of variables. This PR removes the splitting up and keeps the
variable name as one string.
It is an alternative to #16609
The possibility is introduced to register handler including a
separator, or to register a handler for each variable.
The ability is introduced to load a subtree from flash or even to load
a single item.
Two ways to operate on variable and settings_handler names are provided:
settings_name_steq(const char *name, const char *key, const char **next)
which checks if name starts with key, returns 1/0 if it does/does not
the remaining part of name is in next.
settings_name_split(const char *name, char *argv, const char **next)
which splits up name in a part before "/"" that is found in argv and
the remaining part that is in next.
A mutex is added to make settings thread-safe
The settings_handlers list is stored in reverse alphabetical order, this
allows registration of e.g. bt and bt/mesh in separate handlers, the bt
handler itself should not contain any handling of bt/mesh.
A settings_deregister() method is added. Settings_handlers can now be
added/removed when required. This saves RAM when settings_handlers are
not needed.
Tests have been updated to reflect changes in the settings api.
Updates after meeting:
1. Removed settings_deregister
2. Changed settings_name_split() in settings_name_next:
int settings_name_next(const char *name, const char **next): returns
the number of characters before the first separator. This can then be
used to read the correct number of characters from name using strncpy
for processing.
3. New functional test added
Update in settings.h: settings_name_next() changed position -> index
Added some comments in settings.h (settings_name_steq())
Updated tests to reflect change to settings_name_next() and pointer
value comparison. The functional test can now also run on qemu_x86.
Corrected some documentation in header.
Changed registration of handlers to be non ordered.
Changed handler lookup to handle non ordered list of handlers, this
improves handler matching in case different length names are compared
and also makes it easier to add rom based handlers as they will not be
ordered.
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
This is done only for testing purposes, in real life the socket
would be closed if it is not used or needed.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If the socket is closed, then do CAN detach if that is needed.
This way the CAN interrupts are not received if there are no
CAN sockets listening the data.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
At the moment there is no real address for local CANBUS socket,
but we can still set protocol family of local socket to AF_CAN
so that for example net-shell "net conn" command can show
information about it.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We need to dispatch the received CAN frame if there are multiple
sockets interested in the same CAN-IDs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The syscall handler for k_poll() returns error values
instead of killing the caller for various bad arguments,
cover these cases.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
If multithreading is disabled, thread_entry() never runs
since we cannot create threads; the non-multithreading case
was simply dead code.
Indicate to code coverage that CODE_UNREACHABLE should be
skipped.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
These were never getting called anywhere from user mode,
except for k_queue_alloc_append(), but only by virtue of
some workqueue tests.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Threads that are sleeping forever may be woken up with
k_wakeup(), this shouldn't fail assertions.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
LCOV/gcovr doesn't understand what CODE_UNREACHABLE means.
Adding LCOV_EXCL_LINE to the macro definition unfortunately
doesn't work.
Exclude a bit of code which spins endlessly when multi-
threading is disabled that runs after the coverage report
is dumped.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We don't get any coverage past when we dump the coverage data,
so exclude the end of the function and move setting the main
thread as nonessential to immediately before the coverage dump.
The comment was also amended.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
data copying and bss zero are called from arch code
before z_cstart(), and coverage data gathering doesn't
work properly at that point. Not all arches use this
code anyway, some do it in optimized assembly instead.
Weak main() is also excluded; it does nothing and every
test overrides it.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Addresses coverage gaps. Some changes were made so that exited
threads do not have k_thread_abort() called on them.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Reversed revised ticker implementation pending new design which resolves
the issues described in GH issues #16830.
Signed-off-by: Morten Priess <mtpr@oticon.com>
stm32wb is not yet supported on openocd.
But support on pyocd can be enabled thanks to "pack" feature.
Configure board runner with pyocd and provide guidelines
to configure pyocd.
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
Swap_type field implementation is the new mcuboot's trailer field.
This patch makes using of it optional which keeps possibility of being
compatible with older versions of MCUBoot.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Mcuboot changed TLV in PR: Fix double swap on interrupted revert
(https://github.com/JuulLabs-OSS/mcuboot/pull/485)
Above bugfix changes a little way for upgrade request.
This path introduces re-formatted original mcuboot bootutil_misc.c
code as much as it was reasonable which includes the bugfix
adaptation and support for devices witch have bite erased sate different
than 1 as well.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
TEST configurations don't need to be warned that they're using test
techniques with some side-effects.
On a typical sanitycheck invocation, this warning is one of the only two
that appears in most test runs. In other words this commit gets rid of
half of the entire grep -ri '[[:blank:]]warn' noise that obscures any
work-in-progress warnings or platform specific warnings in the
logs (typically: device tree warnings).
Signed-off-by: Marc Herbert <marc.herbert@intel.com>