45 Commits

Author SHA1 Message Date
Wolfgang Hommel
3123ad7fe2 Revert "Automake branch" 2019-11-30 09:36:46 +01:00
Michael D. Stemle, Jr
f92d919fb0 Merged master in and cleaned up.
We no longer need the OSX-specific test. Tests are passing, too.
2019-11-27 14:32:15 -05:00
Wolfgang Hommel
a238cfa2b6 Added FAKETIME_COMPILE_CFLAGS to Makefiles 2019-08-23 11:38:35 +02:00
Wolfgang Hommel
ba32d1b01c Added FORCE_MONOTONIC_FIX CFLAG to avoid hangs on timedwait (#202 #142) 2019-08-23 10:29:53 +02:00
Wolfgang Hommel
5ddb237842 Adjusted tests on macOS based on compilation defaults 2019-08-21 18:42:05 +02:00
Wolfgang Hommel
d923612c2b Improved cross-platform compatibility defaults 2019-08-19 19:16:07 +02:00
Mathis Beer
5c4fdb5173 Rename DONT_FAKE_MONOTONIC to FAKETIME_DONT_FAKE_MONOTONIC for consistency.
The old variable still works.
2019-02-05 07:45:31 +01:00
Michael D. Stemle, Jr
39a85e380c Fixed a _bunch_ of autotools bugs. 2018-10-07 22:38:55 -04:00
Michael D. Stemle, Jr
825043515f Applying fixes for GNU/Linux, and the MT variant of the library. 2018-10-03 22:17:28 -04:00
Michael D. Stemle, Jr
24fd806e6b Added GNU autotools support. 2018-10-02 22:02:30 -04:00
Michael D. Stemle, Jr
39c6872f6d Removing old makefiles. 2018-10-01 20:08:27 -04:00
Daniel Kahn Gillmor
b3a2667e9f fix spelling :) 2018-01-16 14:21:36 -05:00
Matthias Liertzer
fb91c4fcde Implement a fix for pthread_cond_timedwait with faketime
pthread_cond_timedwait takes an absolute time as an argument, which
the function directly passes on to the kernel via the futex
syscall. In an application this absolute time argument is calculated
via the fake times provided by libfaketime. Since the kernel has no
knowledge of the fake time, pthread_cond_timedwait must be redefined
such that it converts the fake time back to real time before passing
it on.
2018-01-02 02:22:59 +01:00
Matthias Liertzer
d117ad79a2 Fix spelling of positive 2018-01-02 01:42:41 +01:00
Adam Borowski
cc4c1c3a29 Fix build failure on x32 (printf warnings).
On x32, time_t is 64-bit to avoid Y2038 problems.  This doesn't play well
using printf("%ld"), and -Werror turns this into a build failure.
2015-03-09 08:39:06 +01:00
Julien Gilli
95b70c7acc Make libfaketime build, run and pass tests on SmartOS.
Since SmartOS is close to SunOS, it's possible that these changes make
libfaketime build and run on other SunOS-like platforms.

These changes were tested on MacOS X and Ubuntu 12.04, and no regression
appeared during testing.
2014-08-06 11:29:02 -07:00
Julien Gilli
d19da98bb4 Add --exclude-monotonic command line option.
--exclude-monotonic prevents faketime from overriding
the clock with id CLOCK_MONOTONIC when using clock_gettime.

Add DONT_FAKE_MONOTONIC env variable to libfaketime that
has the same effect.

Add functional test for DONT_FAKE_MONOTONIC support.
2014-07-25 15:43:38 -07:00
Wolfgang Hommel
106818614d Minor source code style fixes 2013-11-07 19:35:18 +01:00
Balint Reczey
1f938d9642 Use SIGUSR1 instead of SIGRTMIN in tests
This will probably fix compilation on Debian GNU/Hurd
2013-10-20 17:28:29 +02:00
Balint Reczey
23200c4321 Fix tests on libc 2.17 2013-10-20 16:43:10 +02:00
Wolfgang Hommel
a8f8378e77 MacPorts changeset 112093 by ryandesign 2013-10-13 12:24:52 +02:00
Wolfgang Hommel
a0987efa5c renamed library name from libfaketime.dylib.1 to libfaketime.1.dylib based on Apple design guidelines. Thanks to ryandesign at MacPorts 2013-10-11 16:33:37 +02:00
Wolfgang Hommel
cee051c2bc avoid unused variables warnings 2013-10-06 13:12:39 +02:00
Balint Reczey
7d13d305c9 Add -Wextra and -Werror CFLAGS and also fix compile errors 2013-10-04 22:54:07 +02:00
Wolfgang Hommel
bb87fb619e improved readability of test script output 2013-10-02 15:32:46 +02:00
Wolfgang Hommel
b9ba8ab444 uniform test output style 2013-10-01 13:15:34 +02:00
Wolfgang Hommel
8c1ba7899d improved output readability for timer tests 2013-10-01 13:12:34 +02:00
Balint Reczey
50c6ad4dc2 Provide timer related functions compatible with GLIBC 2.2 and >= 2.3.3 [pr32 @8615959] 2013-09-30 16:36:13 +02:00
Wolfgang Hommel
ae6af2eea9 fixed missing blank line before last timetest call 2013-09-05 11:16:57 +02:00
Balint Reczey
545685e5a8 Use nanosleep() in faked sleep() and usleep() to avoid rounding issues [rbalint/pr28] 2013-09-05 10:26:57 +02:00
Wolfgang Hommel
227ebff470 testing Makefile adapted for OSX 2013-09-02 14:38:43 +02:00
Wolfgang Hommel
568fef7228 Makefiles and test suite improved for OS X 2013-09-02 14:32:44 +02:00
Wolfgang Hommel
aef788c795 Revert "merged rbalint's pr27"
This reverts commit 5283614bec, reversing
changes made to 4ecef4db08.
2013-09-01 16:04:21 +02:00
Wolfgang Hommel
8b67256736 Revert 30dd22e..bdac73e
This rolls back to commit 30dd22e157.
2013-08-29 10:08:32 +02:00
Balint Reczey
6fa8be96fc Fake sleep() and friends
This speeds up testing ;-)
2013-08-28 18:41:54 +02:00
Wolfgang Hommel
946f8e2378 GNU/kFreeBSD fix by Petr Salinger, fixes Bug#712709 2013-06-20 20:42:44 +02:00
Tomi Ollila
b648b7712d whitespace cleanup
Used (emacs) M-x untabify for whole faketime.c as the prevailing
style in that file used spaces for indentation.

Used M-x delete-trailing-whitespace to all files that had either
trailing whitespace or empty lines at the end of file to remove
those.
2012-08-30 10:46:58 +03:00
Wolfgang Hommel
f07939d948 Minor adaptions for Mac OS X 2011-07-30 10:58:12 +02:00
don fong
54bc41ffaf compute pow() with shell only, in case we don't have bc, dc, perl 2011-07-26 12:54:42 -07:00
don fong
ea15324e30 add support for new framework for functional tests 2011-07-25 17:04:09 -07:00
Lukas Fleischer
8c6c487b24 Tell the compiler to be C99 compliant, enable all warnings.
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2011-05-10 21:43:23 +02:00
Lukas Fleischer
5fa942b4cf Cast time_t to unsigned integer when using printf().
Suppress compiler warnings when using "-Wformat".

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2011-05-10 21:43:23 +02:00
Lukas Fleischer
d2108361c0 timetest.c: Add "sys/time.h" include (required for gettimeofday()).
Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2011-05-10 21:43:23 +02:00
Lukas Fleischer
9b62bb4f38 Test suite Makefile overhaul.
* Use variables for compiler and linker flags.

* Use variables for source/object files and binaries.

* Use proper targets instead of phony targets to build the timetest
  program.

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2011-05-10 21:43:23 +02:00
Lukas Fleischer
cf0ccef687 Move test suite to a separate subdirectory.
* Move test suite related stuff from "src/" to "test/".

* Fix "test.sh" to search for libfaketime libraries in the right place.

* Split up Makefile into two separate Makefiles (one for the main
  program and one for the test suite).

Test cases should go in another directory for the sake of clean code
separation. This will also facilitate the creation of proper Makefiles.

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2011-04-27 18:50:40 +02:00