Commit Graph

15 Commits

Author SHA1 Message Date
Emil Velikov efc2e4b467 treewide: add some static const notations
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
2023-02-09 07:15:56 -08:00
Jan Engelhardt 16c086f48c testsuite: repair read of uninitialized memory
Function ``test_backoff_time`` does not initialize ``delta``, and
``get_backoff_delta_msec`` then performs a read from uninitialized
memory with the ``!*delta`` expression.

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
2022-06-30 09:54:23 -07:00
Lucas De Marchi b253f4c835 testsuite: Add tests for sleep calculation
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
2022-06-26 23:23:46 -07:00
Torge Matthies 3821e1971e add Zstandard compression support
I changed the style of the hackargs variable in autogen.sh to multiline
because said line was becoming a bit long with the new --with-zstd arg
added.

A previous version of this patch has been running on my two Arch Linux
installations (with an accompanying mkinitcpio patch) for several months
over many kernel updates without any issues.
Any additional testing and/or patch review would of course be appreciated.

Signed-off-by: Torge Matthies <openglfreak@googlemail.com>
2020-09-10 21:55:01 -07:00
Lucas De Marchi aac5f4514f shared: add helper function to add and check for overflow
Use _builtin_uaddll_overflow/_builtin_uaddl_overflow when available,
abstracting the type to use it with uint64_t.

Otherwise fallback to the implementation as added in 67466f2 ("Prevent
offset + size overflow.").

This also adds the tests for this new helper in the testsuite.
2015-02-10 10:43:44 -02:00
Lucas De Marchi 9c6084d90c testsuite: improve coverage of shared/util.h
Add tests to improve coverage of shared/util.h functions.
2015-01-14 17:26:36 -02:00
Lucas De Marchi dea2dfee9b Remove FSF mailing address
It has changed in the past, and these days, anyone can get a copy of the
LGPL via the web rather than by post.

Like 657a122 (Remove FSF mailing address) in libabc by Josh Tripplet,
but let the FSF website in which the license can be found.
2014-12-25 23:41:34 -02:00
Lucas De Marchi 4328982058 testsuite: remove now unused array of tests
Remove the arrays and let each test with a guaranteed unique name.
2014-10-09 14:29:04 -03:00
Lucas De Marchi f1155c1574 Move static keyword to DEFINE_TEST macro 2014-10-09 13:00:30 -03:00
Lucas De Marchi 2b0104fe3c Move alias_normalize() to shared 2014-10-09 01:26:39 -03:00
Lucas De Marchi aafd38359a Rename getline_wrapped() to freadline_wrapped() 2014-10-03 03:25:06 -03:00
Lucas De Marchi c2e4286bb9 Reorder and reorganize header files
Let the includes in the following order:

< system headers >
< libkmod >
< tool >
< local headers >
2014-10-03 01:43:15 -03:00
Lucas De Marchi 96573a0220 Move generic util functions to shared directory 2014-10-03 00:33:25 -03:00
Lucas De Marchi 1dda626f6b testsuite: add basic test for getline_wrapped 2013-11-18 11:01:16 -02:00
Lucas De Marchi 807c601df2 testsuite: Move test-alias to test-util
Move file so we can use the same file to test other functions from
libkmod-util.c
2013-11-18 04:35:03 -02:00