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

23 Commits

Author SHA1 Message Date
Gunar Schorcht
99e07a6786 tests/malloc: remove 0x prefix for %p in printf 2023-02-17 07:48:08 +01:00
d645ea89e9
tests/malloc: increase test timeout for very large mems 2021-12-23 11:04:42 +01:00
Marian Buschsieweke
a6ceeec29f
tests/malloc: fix counting bug
There is a corner cases in which the counting of allocated memory
previously was wrong: When the allocation of the chunk succeeded but the
allocation of the next struct  node fails. This was relatively unlikely
to happen, as the chunk size was much bigger than the memory required by
the struct node. But it happens on the ESP32 boards resulting in failing
nightlies. This fixes the issue.
2021-12-03 10:09:46 +01:00
Erik Ekman
c0004920ec tests/malloc: Fix cppcheck error
tests/malloc/main.c:123: error (preprocessorErrorDirective): Bad suppression attribute '(should'.
You can write comments in the comment after a ; or //. Valid suppression attributes; symbolName=sym
2021-11-25 11:13:30 +01:00
Marian Buschsieweke
8c31227060
tests/malloc: test for correct calloc() behavior 2021-05-10 18:04:53 +02:00
Francisco Molina
2d690ee05a
tests/malloc: refactor test
Matching on every free leads to flimsy test results where all memory
is freed but one line fails to be matched by pexpect, instead, match
the final count.
2021-05-03 17:17:49 +02:00
Benjamin Valentin
ebdcacc1a8 tests/malloc: fail if allocation count does not match
If we can't allocate the same amount of buffers in the second run,
fail the test. This indicates that not all buffers have been properly
freed.
2020-11-19 21:59:14 +01:00
Francisco Molina
2ddd369ce9
tests/malloc: increase timeout, for larger BOARDs
The test timeouts on nucleo-f767zi.
2020-10-07 18:16:23 +02:00
da898e649c tests/malloc: reduce chunk size to 128b
Otherwise, the test fails on z1 (with no allocations).
2020-07-23 12:50:32 +02:00
fb8428cb6d tests/malloc: fix test regexp to consider whole line 2019-11-27 10:41:33 +01:00
561daaab81
tests/malloc: reduce defaut chunk size
This allows to automatically run the test on very constrained platforms such as arduino-uno (2KB RAM)
2019-11-26 15:21:47 +01:00
070c6603a0
tests/malloc: add Python script for automatic test 2019-11-20 06:50:34 +01:00
254f6ff9f9
tests/malloc: cleanup in test application
The idea is not fill the memory on the computer running a native instance and to be able to test on hardware. The test application is reworked similarly as the memarray test application. Macro are now overridable and printed at the beginnined of the test: this allows easier automatic testing
2019-11-20 06:44:30 +01:00
Benjamin Valentin
769fe44f6d tests/malloc: cleanup
- make local functions / variables static
- adhere to the 80 column limit
- don't increment total if head could not be allocated
- allow to overwrite CHUNK_SIZE
2019-09-13 00:35:47 +02:00
Gunar Schorcht
136849661a tests/malloc: fix of dereferencing a NULL pointer
If the memory is exhausted during the allocation of the new `head` structure, subsequent accesses to `head` will result in dereferencing of a NULL pointer.
2019-03-23 14:01:28 +01:00
smlng
6f67e75f90 tests: remove DEVELHELP from per test Makefiles 2017-12-14 17:54:13 +01:00
fc2eff9fba tests: remove redundant APPLICATION defines 2017-12-01 11:03:39 +01:00
smlng
3d12edfd7f tests: cleanup, remove RIOTBASE, already defined in Makefile.tests_common 2017-03-28 10:48:27 +02:00
smlng
52fadaf23a tests: remove redundant board and quiet statements 2017-01-20 19:36:04 +01:00
smlng
f84e8a37e2 tests: add missing include for Makefile.tests_common 2017-01-20 17:24:56 +01:00
smlng
6a037ad004 tests: add prefix to Makefile.tests_common
- fixes name clash on macOS
    - correct naming of test coap to pkg_libcoap
2017-01-19 15:20:37 +01:00
Joakim Gebart
7b0ade0b75 tests/malloc: Replace tabs by spaces 2015-05-19 12:26:34 +02:00
Benjamin Valentin
39d73d753c resurrect malloc test 2014-11-05 12:11:24 +01:00