18 Commits

Author SHA1 Message Date
Mike Rushe
6c7aa3966c Implement FAKETIME_FOLLOW_ABSOLUTE feature
See README for feature intent.
Simple regression test at test_follow_absolute.sh.
2026-02-17 12:17:48 -05:00
Andrij Abyzov
e21bf3017a Fix cross-arch shared memory struct layout and ftruncate/munmap sizes
Replace struct timespec (arch-dependent long/time_t) with fixed-width
int64_t pairs in ft_shared_s so that 32-bit and 64-bit processes
interpret the same shared memory layout identically.

Fix ftruncate calls that allocated sizeof(uint64_t) (8 bytes) instead
of sizeof(struct ft_shared_s) (64-80 bytes) for the shared memory
region. Fix munmap in ft_cleanup using the wrong size.

Add struct layout test and cross-process shared memory functional test.
2026-01-26 13:31:55 +01:00
Bjørn Forsman
9d63a80062 tests: replace /bin/bash with bash
For portability.
2025-09-24 15:03:34 +02:00
Wolfgang Hommel
8853afb509 Added optional FAKETIME_TESTLIB environment variable for make test (#288) 2021-02-04 21:30:01 +01:00
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
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
Daniel Kahn Gillmor
b3a2667e9f fix spelling :) 2018-01-16 14:21:36 -05: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
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
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