Check the interaction with a board through make term.
It is using a shell without echo or prompt for reference.
It currently checks that there is no local echo.
Rename TMP006 to TMP00x
Add TMP007 sensor support to TMP00X
Change uint8_t reg to uint16_t
Add to doxygen documentation group
Expose compile time configurations
Move defines from .c to .h
Change double to float, because double is not needed
Add TMP007 register information
This moves 'unittests/tests-cpp_ctors' to its own test.
It prevents requiring 'cpp' in the 'unittests' that forced almost all
architectures to link the unittests with `g++`.
It also removes the need to have disabled tests for architectures.
Some boards were actually not big enough to compile unittests.
But were hidden by the 'cpp' missing feature.
Blacklist boards that were disabled for cpp test even though they
provide the 'cpp' feature.
* use names with RFC
* add terminating comma
* remove newlines between tests values
This prepares for the format of the next commit adding all RFC tests.
This will reduce the number of changes in upcoming commit.
The test assumes that 'printf/puts' are non interruptible operations.
Use a mutex to guarantee it.
Without this, the automated test was failing in some configurations with
lines being cut by others.
Reduce the amount of tested values by a 100.
This makes the testing time go from 3 minutes to 2 seconds on
`frdm-kw41z`.
Testing that the integer calculation matches the float one does not need
to be performed on the full range on boards. Checking some values should
be enough to detect overflow issues.
The full range checking is kept on native.
The test fails on both murdock and on my machine due to the process
exiting directly.
pexpect.exceptions.EOF: End Of File (EOF). Exception style platform.
HACK, the test currently fails in CI for `native` due to `utf-8` handling.
HACK, the test implementation can fail due being de-scheduled during printf.
The test application provides:
- RIOT's basic network utilities such as `ping6`
- A custom `cc110x` shell command that can be used print the low level device
and driver state. This is mostly useful for debugging.
- Removed cc110x driver
- Updated all makefiles
- Kept both board specific configurations and support for it in RIOT's
upper layers, so re-implementations don't need to start from zero
Python dictionaries are not guaranteed to be ordered until version
3.7. In 3.6 they are ordered too, but that is an implementation
detail. riotdocker seems to be using 3.5.
As it stands now, it would not be a problem if the test commands
are run in a random order, except that:
- It would result in non-reproduceable tests.
- It hinders testing other functionality, such as exiting the shell.
For test scripts, a terminal that does not modify the input and output
streams, configured without local echo, is preferred as it ensures the
test setup is introducing as little noise as possible.
Use test_utils_interactive_sync for synchronizing some case treat
the output before `reset` as the start of the test,
which fails for some boards/configurations.
Remove unconditionally setting 'BOARD' to an hardwritten value.
The definition must be moved before including 'Makefile.tests_common' as
it defines 'BOARD ?= native'.
Changes the test so that EVENT_QUEUE_INIT_DETACHED is used for the initialization of detached event queue. Without this change, a compilation problem was not recognized for ESP8266, MSP430 and MIPS.
Previously this was not tested and excepted KERNEL_PID_UNDEF == 0 as
legal value for received `gnrc_netif_hdr`s (which except for the
loopback interface is wrong)
The evtimer_msg test is expanded to also delete entries.
Furthermore the messages that are printed should now show
numbers that are very close (if not equal). Something like
this:
At 740 ms received msg 0: "#2 supposed to be 740"
At 1081 ms received msg 1: "#0 supposed to be 1081"
At 1581 ms received msg 2: "#1 supposed to be 1581"
At 4035 ms received msg 3: "#3 supposed to be 4035"
The function evtimer_print is also called to show the
intermediate status of evtimer entries.
The mips-malta board is a maintainance burden, has no working UART input
and is unobtainable and thus must be removed.
1. Unobtainable board
=====================
The mips-malta board is not an off-the-shelf part. A quick web
search only show the MIPS website where one is told to "contact sales".
I could find it on ebay, used, at €155 and from single seller.
Not having access to the board means:
a. We cannot maintain it. In fact it could be broken right now.
b. Potential RIOT uses have not access to the board either. In other
words, it is pointless to run on hardware nobody has.
2. No working UART input
========================
Not all applications need UART input, but that is no excuse for not supporting
it:
a. Makes development & debugging way harder.
b. It is impossible to run interactive tests.
b.1. Constrains the rest of the platforms by providing an incentive to not
make tests interactive.
c. The lack of UART is a witness to the poor quality of the port.
I want to stress point (c). If something as basic as a serial port cannot work,
how can we expect more complex fucntionality to work. The answer is impossible
to know, because of point (1).
3. Maintainance burden
======================
The RIOT project has limited time and human resources which can be better spent.
a. Compiling for mips-malta wastes CPU time.
b. Blacklisting the board in the test wastes contributor's time.
c. Adapting the board's makefile during build system rework takes time and makes
the reworks harder.
c.1. Add to that that the changes are most of the time not even tested on the board
because of (1). Look at the github issues/PRs and you will see it.
d. Developers usually stick to the lowest common denominator. Issue (2) sets this
denominator unacceptably low.
MIPS platform in general
========================
In commits I will address general issues in the MIPS platform and why it should all
be removed.
Adding saml1[01]-xpro, nucleo-f302r8|f334r8 to
BOARDS_INSUFFICIENT_MEMORY.
The riotboot build fails because it only offers half the flash size (per
slot), compared to before where the default build would not use riotboot
at all, thus have double the flash (but being useless).
... if the riotboot feature is used.
Previously, even an application that had "FEATURES_REQUIRED += riotboot"
set would still flash the non-riotboot binary on "make flash".
This is usualy not what the user wants.
This commit set's the FLASHFILE variable to the combined "riotboot
bootloader + slot0 + empty slot1" binary. This has the effect that make
all, flash and flash-only will compile and/or flash a working riotboot
setup.
tests/riotboot and tests/riotboot_flashwrite now default to flashing the
riotboot-extended binary. tests/riotboot was previously configured to
use the riotboot-combined binary. This has been changed in order to not
behave differently than how usual riotboot applications do.
When subscribing to IPv6 packets on a router for sniffing, the NETIF
header is released prematurely, because of a wrong
`gnrc_pktbuf_start_write()` call. This test aims to reproduce this
error case.
Summary for Users
=================
Deprecation is scheduled for 2020.01.
Users which depend on this module and cannot switch libraries may copy
the code into to their own application.
As expressed in PR #11724, the UBJSON module has issues which are not easy
or worth fixing.
Before removing the module, it should be marked as deprecated to give users
time to either migrate to another library, or copy the code to their own
private repo.
The deprecation warning has been supressed from the unit tests. This has the
ugly side-effect of supressing deprecation warning in other unit tests too,
but that should not last long, only until the module is finally deleted.
Blacklist native for the xtimer tests that have timing issues.
This also enables running the test on `nrf52dk` as I think it was
forgotten when adding the support.
New test function cmd_test_xtimer_mutex_lock_timeout_long_locked.
In this test the mutex is locked and the timeout is long.
When it works the thread continues running and stops waiting for the mutex and
the function will return that it did not get the mutex.
Adding a first normal test case where the mutex is unlocked and the timeout is long.
The timer will not trigger in this test and instead wil be removed after getting the mutex.
The test target is now defined in the common `Makefile.include`.
This removes the warning
Makefile: warning: overriding recipe for target 'test'
Makefile.include: warning: ignoring old recipe for target 'test'
The existing periph_uart test depends on having more than one UART.
This test allows for manual testing with the use of a probe
on-behalf-of: @sparkmeter <ben.postman@sparkmeter.io>
When using BUILD_IN_DOCKER only make 'all' execute 'mcuboot' target when
inside the container. Otherwise it will execute it using your host
toolchain.
This is a hack and could be prevented by having a file target put in
FLASHFILE.
This does currently not allow flashing after building in docker as
flashing should be done with `mcuboot-flash` which will not be done in
docker. It would require the `FLASHFILE` fix to be done properly.
For the RIOT port of Lua, the module loader has been more or less
rewritten to allow for easily integrating source modules defined in static
arrays and C modules embedded in the application.
So far the loader had not been tested (and a bug was found). This test
should give a bit more certainty that the RIOT integration works as it
should.
Now that tests with packages have been moved out of `unittests`
re-enable boards with enough memory.
The removed boards list matches the boards that now compiled locally
with `BUILD_IN_DOCKER=1 make buildtest` and also the output of murdock
for boards that were able to link despite being in the list:
avsextrem:gnu
cc2538dk:gnu
firefly:gnu
mbed_lpc1768:gnu
msba2:gnu
openmote-b:gnu
openmote-cc2538:gnu
remote-pa:gnu
remote-reva:gnu
remote-revb:gnu
seeeduino_arch-pro:gnu
Take into account stack buffers and printf for allocating the default
stack size.
This solves stack size issues with `wsn430-v1_3b` and `z1`.
It now have a main stack usage of 514 bytes out of 768 on `wsn430-v1_3b`.
Be more pedantic in expected output for shell commands.
For slow boards, `ws430-v1_3b/arduino-mega2560/msba2`, some commands
were sent before the output of the previous command.
Newlib-nano does not seem to support hexadecimal floats or the %a
specifier. What is even weirder, it reports a successful conversion
anyways.
Tests for these two cases have been commented out.
Update the 'code' section detection to also work on kinetis.
The boards using 'cortexm.ld' have the code section starting with
'.text'. For the 'cpu/kinetis/kinetis.ls' the first section is '.vector'.
Update the 'awk' matching pattern to correctly detect the kinetis boards.
It is a dependency to allow testing upcoming offset support with kinetis.
I am not 100% sure about the pattern for awk.
With `newlib-nano` and other smaller `libc`s the output of floats does
not work with `printf()`. Since minmea uses floating point operations
I used `fmt` instead.
The Arduino Leonardo requires - like the other ATmega based Arduinos - a
different frequency than the default 1000000, as this frequency cannot be
achieved on a 16MHz ATmega with any available prescaler.
When `ds18_read` returns -2506, DS18 test print `Temperature [ºC]: -25.-6`
whereas it should print `Temperature [ºC]: -25.06. This commit fixes this
issue.
Previously, there was a very tight allowed margin (100us), then some
special cases for platforms for which the test would otherwise fail,
increasing the margin.
This turned out to be a maintanance burden, as each slightly special
board needed a PR adding the special case.
This commit sets a quite large margin (1000us, 0.1% of total delay),
which should be large enough to not trip over platform-induced timer
inaccuracies, but still verify that the module is using timers
correctly.
(This is not a timer accuracy test.)
`tests/gnrc_udp` was specifically introduced for testing the release
specs. All of them ask the tester to check the packet buffer after the
test. So it makes sense to include the module that allows for that per
default for this test so the tester does not forget to include it ;-).
The hifive1 has only 16kB of memory. The tests tries to allocate 12
thread stacks with 1kB (default) stacksize each. The corresponding
malloc() fails for the last two threads, making the test fail silently.
Set a delay of three seconds at the beginning of the test. Otherwise,
the node will send a neighbour solicitation with a blank link local
address, it won't receive a reply, and the test will fail.
This patch is a reduced version of an earlier one, with the bare minimum
required to be able to run the test and get the release going.
Original description:
atoi() cannot detect errors. Many implementation return zero on error
and that is what was being checked here, making the "udp send" command
unable to parse integer values of zero. On top of this, the behavior on
errors does not seem to be specified in the standard (so it is not even
correct to check for zero even when zero is not an accepted value, like
for a port number).
The result of all this is that sending UDP packets of zero length (as
required by the Release Specs) was not possible.
This patch replaces atoi by strlen, which allows for robust error detection.
Sending zero length packets is possible.