test


Log

Author Commit Date CI Message
Guillem Jover 736e12e8 2017-06-19T21:32:01 test: Handle libtool executable names in getprogname() unit test Sometimes libtool will prefix the test programs with "lt-", we should handle these and strip the prefix. Fixes: https://bugs.debian.org/865090
Guillem Jover cdbb9d05 2017-06-18T20:30:40 test: Add new strnstr() unit test
Guillem Jover 79386192 2017-06-14T02:45:13 Update .gitignore for headers generator
Guillem Jover 0365d0ef 2017-06-18T20:30:19 test: Add new setprogname() and getprogname() unit test
Guillem Jover 10b13285 2017-06-18T20:29:52 test: Add new setmode() and getmode() unit test
Guillem Jover 922eff5c 2017-06-14T01:52:12 test: Add new nlist() unit test
Guillem Jover f1dd5f2e 2017-06-09T05:13:32 test: Add unit test for strlcpy() and strlcat()
Guillem Jover f3b566bd 2016-03-27T12:31:58 test: Add a unit test for md5
Hanno Boeck 008316aa 2016-01-27T15:06:50 test: Add missing <sys/stat.h> include The test in test/strmode.c can fail to compile depending on the optimization flags used. The constants that are used in this file (S_IFREG etc.) come from the <sys/stat.h> include file. It seems gcc ignores this error if one compiles with "-O2" (default), but if one uses no optimization it fails. Add the missing include and it works all the time. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93880 Signed-off-by: Guillem Jover <guillem@hadrons.org>
Guillem Jover e4ab2c62 2016-01-11T02:21:15 test: Fix success return code for arc4random unit test
Lukas Fleischer bf5573f8 2016-01-07T17:26:12 test: Fix race condition in headers-*.sh When running tests in parallel (e.g. using `make -j4 check`), the header tests currently fail due to headers-overlay.sh and headers-system.sh both generating headers-gen.c simultaneously, resulting in garbled output. Fix this by using separate C files for the tests. Signed-off-by: Lukas Fleischer <lfleischer@lfos.de> Signed-off-by: Guillem Jover <guillem@hadrons.org>
Guillem Jover f84004ba 2015-12-12T14:26:50 test: Add new unit tests for individual headers usage
Guillem Jover da137a09 2015-12-07T01:53:49 Add missing copyright and license headers
Guillem Jover 877732ef 2015-11-30T23:48:17 test: Check asprintf() return code
Guillem Jover 02bccb0a 2015-09-30T04:17:15 test: Add unit test for strmode()
Guillem Jover 58bef83f 2015-11-16T01:12:24 test: Add unit test for arc4random()
Guillem Jover 02c33d50 2015-11-30T02:48:23 build: Move proctitle_LDFLAGS inside BUILD_LIBBSD_CTOR conditional
Guillem Jover 45443583 2015-09-23T19:37:37 Add explicit_bzero() function from OpenBSD
Guillem Jover 151bc71d 2015-09-22T16:22:56 Add compile and link-time deprecation warnings for fgetln() Although the current implementation in libbsd is probably one of the safest ones around, it still poses some problems when used with many file streams. This function has now a replacement, that is both more standard and portable. Ask users to switch to getline(3) instead.
Guillem Jover f50b197e 2015-09-22T22:30:17 test: Add fparseln() unit test
Guillem Jover 54f15341 2015-09-22T20:56:15 test: Refactor stream testing functions into a new module
Guillem Jover 32388fe5 2014-11-03T23:21:52 Use reallocarray() instead of malloc() or realloc()
Guillem Jover 3a3d87d7 2015-09-23T04:40:21 test: Add closefrom() unit test
Guillem Jover d62f7d8f 2014-11-01T00:55:55 test: Add test case for fpurge(NULL)
Guillem Jover cfb4d462 2014-11-01T00:54:09 test: Move and activate fpurge() test case from module to a dedicated file
Guillem Jover 205827a2 2014-11-01T00:52:42 build: Centralize testsuite LDADD setting in a single variable
Guillem Jover e8d3d041 2014-07-20T01:48:20 build: Remove hard requirement for GNU .init_array section support In case the support is not available, just stop building the libbsd-ctor.a library, which is a nice to have thing, but should not have been a hard requirement from the start. This should allow to build libbsd on non-glibc based systems using another libc.
Guillem Jover f41fdcf1 2013-10-21T05:07:56 Add funopen() function This is a wrapper over the glibc fopencookie() function. We diverge from the FreeBSD, OpenBSD and DragonFlyBSD declarations, because seekfn() there wrongly uses fpos_t, assuming it's an integral type, and any code using that on a system where fpos_t is a struct (such as GNU-based systems or NetBSD) will fail to build. In which case, as the code has to be modified anyway, we might just as well use the correct declaration.
Guillem Jover 61b2dbb8 2013-07-15T01:44:30 Fix dehumanize_number() to correctly detect overflows Do not allow numbers greated than INT64_MAX and smaller than INT64_MIN. Clarify the positive sign value by prefixing it with an explicit +. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66909
Guillem Jover c5b95902 2013-07-11T12:25:54 Move setproctitle() automatic initialization to its own library The automatic initialization cannot be part of the main shared library, because there is no thread-safe way to change the environ global variable. This is not a problem if the initializaion happens just at program load time, but becomes one if the shared library is directly or indirectly dlopen()ed during the execution of the program, which could have either kept references to the old environ or could change it in some other thread. This has been observed for example on systems using Samba NSS modules. To avoid any other possible fallout, the constructor is split into a new static library that needs to be linked explicitly into programs using setproctitle(). As an additional safety measure the pkg-config linker flags will mark the program as not allowing to be dlopen()ed so that we avoid the problem described above. Reported-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66679
Guillem Jover 367e0365 2013-06-08T08:15:21 test: Try setting and getting an environment variable after setproctitle()
Guillem Jover df5aebd7 2013-05-27T06:49:57 test: Mark a literal integer as long long This fixes build failures on 32-bit architectures.
Guillem Jover 330b569f 2013-05-26T04:34:57 test: Add new humanize unit test
Guillem Jover 8c26c40a 2012-11-27T14:23:26 test: Add setproctitle() unit test
Guillem Jover 7196b4dc 2013-05-23T02:05:19 test: Add new fgetln() and fgetwln() unit test
Guillem Jover 14524b54 2012-06-03T07:39:42 build: Set default compiler variables from configure This centralizes the setting so there's no duplication anymore, makes sure the user supplied variables are never overridden, and are only set when using gcc. Reported-by: Samuli Suominen <ssuominen@gentoo.org>
Guillem Jover 34bf1068 2012-03-23T10:43:33 test: Add a unit test for endian encoder/decoder
Guillem Jover 786d1439 2012-03-24T20:37:55 test: Add new overlay unit test
Guillem Jover abf14c39 2012-03-24T20:37:55 test: Add new headers unit test
Guillem Jover 23973e22 2012-03-23T10:43:33 build: Add a test suite infrastructure