Commit Graph

16 Commits

Author SHA1 Message Date
matt335672 2f46ef27a2 Add support for cppcheck 2.17.0
cppcheck 2.17.0 adds checks that a NULL pointer returned from malloc() and
calloc() is not used.

We do this quite a lot.

I've addressed this by adding functions g_malloc_nofail() and
g_calloc_nofail() which either allocate memory or abort.
functions are now called in places where we are not making these
checks.

Many of these checks are in test programs or example programs.

I've modified the list16 module to handle out-of-memory conditions.
2025-02-27 15:04:11 +00:00
firewave fb9c175b11 enabled and fixed -Wmissing-prototypes compiler warnings
Co-authored-by: matt335672 <30179339+matt335672@users.noreply.github.com>
2024-04-23 18:38:20 +02:00
matt335672 57bd1be5b1 Disable stdout buffering for LOG() when running tests
Normally the test runners run in 'forking mode'. When a lot of
messages are logged to stdout, the child process can still be writing
data when the parent writes 'ok' or 'not ok'. This can confuse
the tap-driver.sh process.
2023-01-30 14:31:16 +00:00
matt335672 e79bc7f181 Fix banner comments in test results 2022-01-28 12:23:40 +00:00
matt335672 52a52daddd Split development option into separate things 2021-05-28 10:57:12 +01:00
Koichiro IWAO 55f57e5a5d make distcheck should only succeed if check is installed 2021-04-24 23:38:40 +09:00
matt335672 cb0ab0d0d3 Merge branch 'devel' into add_logging_session_c 2021-04-14 10:26:48 +01:00
Alexandre Quesnel 09174ccd4d Adding g_strnjoin() with units tests 2021-04-14 04:41:53 +00:00
Koichiro IWAO 1637c38cba do not install test & development tool
These tools shouldn't be delivered to end-users, included in distro
packages. Also the execuable names "memtest" and "tcp_proxy" are too
general to install into sbin dir.
2021-04-13 18:43:33 +09:00
Alexandre Quesnel 6479d54eaa Migrating logging to LOG() and LOG_DEVEL() in tests/* 2021-03-26 13:58:27 +00:00
Alexandre Quesnel ec52c6466d Adding self-contained tests to be built during make all 2021-03-26 00:59:16 +00:00
Alexandre Quesnel 5810cd9fe9 Fixing formatting with astyle in tests/* 2021-03-26 00:59:16 +00:00
Jay Sorg 1c3d23da37 tests: add get_alloced_bytes function 2013-08-23 17:03:55 -07:00
Jay Sorg 110edd31c8 fix Makefile error, fix for warnings 2013-07-08 12:46:31 -07:00
Jay Sorg bddf48602d optimize libmem.c 2013-06-28 22:11:15 -07:00
Jay Sorg a330226dd9 added libmem and a test 2013-06-28 19:37:03 -07:00