Commit Graph

19 Commits

Author SHA1 Message Date
Lucas De Marchi a6ede6c7ad util: fix warning of equal values on logical OR
shared/util.c: In function ‘read_str_safe’:
shared/util.c:211:24: warning: logical ‘or’ of equal expressions [-Wlogical-op]
    if (errno == EAGAIN || errno == EWOULDBLOCK ||
                        ^~
shared/util.c: In function ‘write_str_safe’:
shared/util.c:237:24: warning: logical ‘or’ of equal expressions [-Wlogical-op]
    if (errno == EAGAIN || errno == EWOULDBLOCK ||
                        ^~

This is because EAGAIN and EWOULDBLOCK have the same value. Prefer
EAGAIN, but add a static assert to catch if it's not the same in another
architecture.
2016-08-10 12:45:36 -03:00
Lucas De Marchi 5c42c5fced testsuite: prefer the use of streq() 2015-01-14 14:32:09 -02:00
Lucas De Marchi f357866d97 Fix includes after change to build-sys
Make the includes be libkmod/libkmod.h for code outside of library. This
fixes the broken build after 1315123 ('build-sys: Don't add libkmod
subdirectory to include path').
2015-01-02 12:41:01 -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 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 d96ca9c429 Use C11's noreturn
Also define noreturn w/o <stdnoreturn.h> and move it to macro.h instead
of in the testsuite.

Based on similar commit on systemd by Shawn Landden
<shawn@churchofgit.com>.
2013-12-17 19:10:16 -02:00
Lucas De Marchi e6b0e49b4e Update copyright notices 2013-01-16 11:27:45 -02:00
Lucas De Marchi e1b1ab24ab testsuite: re-license under LGPL 2012-07-10 10:31:57 -03:00
Lucas De Marchi 32d29b3523 Mark functions with attribute noreturn
Functions that always call exit() should be marked with attribute
noreturn. With glibc this is not necessary, but it fails to compile with
uClibc otherwise.
2012-02-08 20:32:31 -02:00
Lucas De Marchi c5d81989bc testsuite: macronify test definitions 2012-02-07 10:46:46 -02:00
Lucas De Marchi e9fa9de3c9 testsuite: macronify main function 2012-02-07 10:09:20 -02:00
Lucas De Marchi e701e381fa testsuite: add GPL license 2012-01-26 17:02:05 -02:00
Lucas De Marchi 4e36cb18e1 testsuite: add trap to opendir() including tests 2012-01-26 16:05:04 -02:00
Lucas De Marchi 1426a613fa testsuite: add trap to stat() and friends including tests
Add trap to stat(): we need to trap other functions too, depending on
stat.h, the function from glibc that is actually called may be stat64 or
__xstat() too.
2012-01-26 16:05:04 -02:00
Lucas De Marchi 7fa8c2d2df testsuite: add trap to open() including tests 2012-01-26 16:05:04 -02:00
Lucas De Marchi 6afc9cd616 testsuite: add trap to fopen() including tests 2012-01-26 16:05:04 -02:00
Lucas De Marchi ab25311072 testsuite: fake kernel 4.0.20-kmod is out
Go get it while it's fresh :-). Test fake results of "uname -r" by
LD_PRELOAD'ing uname.so.
2012-01-26 16:05:04 -02:00