1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

6761 Commits

Author SHA1 Message Date
Marian Buschsieweke
754bbe4e6d
tests/sys/psa_crypto_se_cipher: disable test on esp32-wroom-32
The test fails systematically on the CI and prevents merging PRs.
2023-12-05 16:49:30 +01:00
Marian Buschsieweke
167a70cd0f
tests/sys/psa_crytpo_se: disable test on esp32-wroom-32 2023-12-05 15:09:01 +01:00
Marian Buschsieweke
82d98ed377
examples, tests: update Makefile.ci for AVR8
Ran dist/tools/insufficient_memory for all AVR8 boards.
2023-12-01 19:37:05 +01:00
834e2a5fe4
Merge pull request #20124 from chrysn-pull-requests/allow-all-clean
tests/touch_dev_gestures: Fix default board
2023-12-01 09:32:22 +00:00
MrKevinWeiss
98e9016baa
tests/sys/psa_crypto_*: Update BOARD_INSUFFICIENT_MEMORY 2023-11-30 21:02:47 +01:00
Lena Boeckmann
de09b2a0b4
sys/psa_crypto: Build PSA Crypto functions based on module selection 2023-11-30 21:02:42 +01:00
chrysn
bf77808ea6 tests/touch_dev_gestures: Fix default board 2023-11-30 16:17:08 +01:00
Marian Buschsieweke
0887218224
Merge pull request #20118 from maribu/tests/periph/spi
tests/periph/spi: allow use on more boards
2023-11-30 11:11:54 +00:00
Marian Buschsieweke
b90f985d47
tests/periph/spi: allow use on more boards
- Disable the benchmark on low memory boards
- Reduce the help message length on low memory boards
- Update to new shell command interface using XFA
2023-11-30 11:10:04 +01:00
Mikolai Gütschow
6935ea21e7
sys/hashes: add SHA-512 support 2023-11-29 19:18:51 +01:00
Benjamin Valentin
b8ec36aef3 tests/unittests: coap_get_code() -> coap_get_code_decimal() 2023-11-28 13:11:11 +01:00
benpicco
c93a5b84a3
Merge pull request #20020 from gompper/periph/freqm
drivers/include/periph: add FREQM peripheral driver
2023-11-27 16:06:52 +00:00
Urs Gompper
4a9ae47499 tests/periph: add test-application for peripheral freqm 2023-11-23 20:53:14 +01:00
Marian Buschsieweke
fb9abe3626
tests/periph/selftest_shield: fix a misplaced comment
Move it to the correct place
2023-11-22 10:29:33 +01:00
Marian Buschsieweke
64b95a34e9
tests/periph/selftest_shield: improve output on error
Use `tiny_strerror()` to report back errors when calling initialization
functions.
2023-11-22 10:29:33 +01:00
Marian Buschsieweke
57488a57ab
tests/periph/selftest_shield: timer allocation conflict
- Detect when the same timer is used by `ztimer` (pulled in as
  dependency for a peripheral driver, e.g. `periph_adc` on STM32F3) and
  the test application
- Try to provide a better default (e.g. `TIMER_DEV(1)` when
  `ztimer_periph_timer` is in use, `TIMER_DEV(0)` otherwise)
2023-11-20 17:17:26 +01:00
Marian Buschsieweke
4e7f972303
Merge pull request #20089 from maribu/tests/periph/selftest_shield2
tests/periph/selftest_shield: improve SPI test
2023-11-16 14:39:38 +00:00
Karl Fessel
8a9fdf4661
Merge pull request #20062 from derMihai/at_fix_pr
drivers/at: fix URC collision with command response
2023-11-16 12:04:48 +00:00
Marian Buschsieweke
14ff958659
Merge pull request #20083 from maribu/tests/periph/selftest_shield
tests/periph/selftest_shield: re-enable ADC test
2023-11-16 12:04:00 +00:00
Marian Buschsieweke
66d38101d8
tests/periph/selftest_shield: Consistently use DETAILED_OUTPUT
There already is `DETAILED_OUTPUT` to trade ROM size for more verbose
error messages, no need to abuse `DEBUG()` for the same as well.
2023-11-16 12:59:50 +01:00
Marian Buschsieweke
f51ca593ba
tests/periph/selftest_shield: re-enable ADC test
The R-2R resistor ladder dac --> ADC test was disabled due to a bug in
the v0.1 version of the shield. Since this has been fixed in v0.2 and
v0.3 of the shield, it can be re-enabled.

The comment regarding the high accuracy of the resistor is dropped, as
v0.3 has been ordered with cost efficient resistors rather than with
accurate ones. As a result, the tolerance for error has been increased
to 10%. This quite a bit more lax than I have hoped for, but false
positives would be something to avoid.
2023-11-16 12:59:50 +01:00
Marian Buschsieweke
af6bb03bc7
tests/periph/selftest_shield: improve SPI test
- fix a copy-paste error (`TIMER_FREQ_UART_TEST` was used in the SPI
  test, but that should be `TIMER_FREQ_SPI_TEST`)
- use 400 kHz as slow SPI frequency, as faster STM32 MCUs just cannot
  divide the APB clock down to 100 kHz
- when detailed output is enabled, print the SPI clock in addition to
  the SPI mode to ease figuring out what went wrong
- only have one `FAILURE` message for a too fast byte transfer per
  check, rather than per transmitted byte, to reduce the noise
- work around a bug of `periph_timer` on STM32 by reducing the clock
  speed of the timer for the SPI test
2023-11-15 20:29:53 +01:00
benpicco
a24066be93
Merge pull request #20082 from maribu/board/nucleo-f030r8
boards/nucleo-f030r8: enable SPI and I2C
2023-11-14 13:18:35 +00:00
Marian Buschsieweke
6b30f5cd1b
tests: add nucleo-f030r8 to Makefile.ci where needed 2023-11-14 12:55:28 +01:00
Marian Buschsieweke
d6dac4bee2
tests/periph/selftest_shield: Fix copy-paste error in comment 2023-11-13 15:53:58 +01:00
Marian Buschsieweke
b6252b334d
tests/periph/selftest_shield: fix integration
The test should execute only with `make test-with-config` and not with
`make test`, as boards without the shield cannot pass the test.

For some reason I accidentally added both variants, which makes no
sense. This drops the `make test` variant.

Finally, the `README.md` is updated to refer to `make test-with-config`
instead of `make test`.
2023-11-13 14:17:03 +01:00
benpicco
5e0968a6f6
Merge pull request #20075 from krzysztof-cabaj/nucleo-f070-SPI
boards/nucleo-f070rb: add SPI configuration
2023-11-10 23:06:38 +00:00
benpicco
5d54e89a17
Merge pull request #20078 from benpicco/mtd_dev_get
drivers/mtd: rename mtd_default_get_dev() -> mtd_dev_get()
2023-11-10 21:36:19 +00:00
krzysztof-cabaj
744f3ecbbb tests/drivers/cc110x: add nucleo-f070rb to Makefile.ci 2023-11-10 21:39:31 +01:00
Benjamin Valentin
c2f93c05f1 treewide: mtd_default_get_dev() -> mtd_dev_get() 2023-11-10 19:53:48 +01:00
Marian Buschsieweke
bf582b0d68
Merge pull request #19932 from maribu/peripheral-selftest
tests/periph: Add test using the Peripheral Selftest Shield
2023-11-10 18:12:42 +00:00
Mihai Renea
e99cafba33 drivers/at: fix URC collision with command response 2023-11-10 15:26:47 +01:00
Marian Buschsieweke
d7cf39551f
tests/periph/selftest_shield: add test application
This test application makes use of the RIOT Peripheral Selftest Shield,
which connects e.g. PWM to ADC or SPI MOSI to SPI MISO, UART TXD to RXD,
etc. This provides quick and fully automated self testing capabilities.

Please note that the simplicity and ease of use of the hardware comes
with a prices: There are whole classes of issues that cannot be detected
automatically. This test cannot replace other testing approaches
(such as manual testing or PHiLIP on the HiL), but only complement them.
2023-11-10 15:13:23 +01:00
Benjamin Valentin
d3dfd4baf0 periph/adc_continous: add test for ADC continous API 2023-11-10 12:10:49 +01:00
bors[bot]
60d6decbd7
Merge #20022 #20025
20022: pkg/lwip: add support for slipdev r=benpicco a=benpicco



20025: tests/drivers/at: fix device table overflow r=benpicco a=krzysztof-cabaj

### Contribution description

This PR fix device table overflow in `tests/driver/at`, which could lead to device crash.

### Testing procedure

PR was tested on two nucleo boards with 2 and 3 UARTs (nucleo-l476rg and nucleo-l496zg).
Flash `tests/driver/at` with and without this PR.

Output with this PR:

```
> main(): This is RIOT! (Version: 2022.07-devel-5083-g2b9e8-tests-drivers-at)
AT command test app
> init 5 9600

Wrong UART device number - should by in range 0-2.
>
```

Output without this PR:

```
> main(): This is RIOT! (Version: 2022.07-devel-5083-g2b9e8)
AT command test app
> init 5 9600

8001afd
*** RIOT kernel panic:
FAILED ASSERTION.

*** halted.


Context before hardfault:
   r0: 0x0000000a
   r1: 0x00000000
   . . . 
```

### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: krzysztof-cabaj <kcabaj@gmail.com>
2023-10-27 14:54:54 +00:00
Jan Mohr
0f27efb98d tests/pkg/minmea: fixing RMC timestamp 2023-10-27 10:43:41 +03:00
krzysztof-cabaj
a32dbbfe0d tests/drivers/at: fix device table overflow 2023-10-26 19:48:28 +02:00
Marian Buschsieweke
ba44bb93d7
tests/core/thread_cooperation: clean up test
- add `static` qualifiers where sensible
- drop `volatile` qualifier that was incorrectly used
- add a comment on use of shared memory for inter-thread communication
2023-10-26 10:34:01 +02:00
bors[bot]
a1e19312a3
Merge #19990
19990: sys/psa_crypto: allow repeated initialization r=benpicco a=mguetschow

### Contribution description

- simple unit test which calls `psa_crypto_init()` twice
- fix to no re-initialize key slots (which left them in a broken state)

### Testing procedure

- `make -C tests/sys/psa_crypto all test` succeeds
- `git checkout HEAD~1 && make -C tests/sys/psa_crypto all test` fails



Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
2023-10-23 16:32:14 +00:00
bors[bot]
d8b8f4e066
Merge #20011
20011: tests/unittests: add a unit test for ztimer r=benpicco a=maribu

### Contribution description

This adds test coverage for removing ztimers with focus on ensuring that offsets are correctly updated on subsequent timers (e.g. not having timers fire too early).

### Testing procedure

Run the unit tests (will be done by the CI as well). Maybe also introduce a random bug in `ztimer_remove()` and check if this is indeed caught by the unit tests.

### Issues/PRs references

Prompted by https://github.com/RIOT-OS/RIOT/pull/18977#issuecomment-1764258356

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-10-23 16:12:41 +00:00
Marian Buschsieweke
e5725f2194
tests/unittests: add a unit test for ztimer
This adds test coverage for removing ztimers with focus on ensuring that
offsets are correctly updated on subsequent timers (e.g. not having
timers fire too early).
2023-10-23 15:44:52 +02:00
Mikolai Gütschow
ceda440031
add Makefile.ci 2023-10-23 14:18:21 +02:00
Jan Mohr
bdb1bc3018 tests/pkg/minmea: exclude boards with small memory 2023-10-23 12:30:52 +02:00
Jan Mohr
d569cdf4f0 tests/pkg/minmea: adapting test file 2023-10-23 10:32:31 +02:00
Jan Mohr
1bfe45e785 tests/pkg/minmea: adding GGA, GSA and RMC sentences to test application 2023-10-23 10:32:31 +02:00
bors[bot]
eee4ce1050
Merge #19958
19958: tests/unittests: blacklist LLVM on native r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-10-23 07:24:36 +00:00
bors[bot]
03d3874e51
Merge #19465 #19981 #19995
19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht

### Contribution description

This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.

### Testing procedure

To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.

### Porting Guide

For external boards:
 - remove the `MTD_NUMOF` definition from `board.h`
 - add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
 - `MTD_0`, `MTD_1`, … defines are no longer needed.

### Issues/PRs references

 Related to PR #19443

19981: Fletcher32: Add incremental API r=benpicco a=bergzand

### Contribution description

This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.

I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.

### Testing procedure

The test has been extended


### Issues/PRs references

None

19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool

### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by  #19954
Fixed conditions for key size macros in `crypto_sizes.h`.

#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.

### Testing procedure
Build `example/psa_crypto` for secure elements and run application

Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 # 
2023-10-19 14:33:24,373 # *** rebooting...

```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-10-19 19:01:12 +00:00
Mikolai Gütschow
7479728200
sys/psa_crypto: add test for double initialization 2023-10-19 11:20:27 +02:00
31df2ba0aa
Fletcher32: Add incremental API 2023-10-18 13:22:44 +02:00
bors[bot]
910e0e28ed
Merge #19963 #19971 #19974 #19975 #19976
19963: sys/event/timeout: add event_timeout_is_pending() r=benpicco a=benpicco



19971: sys/shell/gnrc_netif: Fix a few blockers for sharing ifconfig shell r=benpicco a=yarrick



19974: gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked for NULL pointer dereference r=benpicco a=miri64

 


19975: pkg/nanocbor: Bump to latest commit r=benpicco a=bergzand

### Contribution description

Not much to see here

Important changes:
- Add stream-like interface for encoder
- Separate functions for number of items left in arrays and maps

### Testing procedure

The usual test should still work

### Issues/PRs references

None

19976: core: Express -1 as ~0 in thread_status_t cast r=benpicco a=SimonIT



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Erik Ekman <eekman@google.com>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: SimonIT <simonit.orig@gmail.com>
2023-10-16 15:31:25 +00:00