Wolfgang Hommel
8853afb509
Added optional FAKETIME_TESTLIB environment variable for make test ( #288 )
2021-02-04 21:30:01 +01:00
Wolfgang Hommel
47e6f5f33d
Merge pull request #283 from dkg/update-version-number
...
fix embedded version number
2021-02-03 19:53:49 +01:00
Wolfgang Hommel
e4e5ea6211
Merge pull request #286 from dkg/speling
...
Fix spelling
2021-02-03 19:51:19 +01:00
Daniel Kahn Gillmor
cce377b371
Fix spelling
2021-02-03 11:55:28 -05:00
Daniel Kahn Gillmor
55e634a6ca
fix embedded version number
2021-02-02 19:23:13 -05:00
Wolfgang Hommel
532816864e
Merge pull request #278 from oxan/prefix-error-messages
...
faketime: Prefix error messages with faketime
2020-12-08 19:14:47 +01:00
Oxan van Leeuwen
4564afb924
faketime: Prefix error messages with faketime
2020-12-08 17:27:06 +01:00
Wolfgang Hommel
5b8673df54
Updated macOS-specific documentation, especially regarding SIP issues
2020-11-16 17:05:17 +01:00
Wolfgang Hommel
e00ba47ca9
Preliminary documentation related to #275 changes
2020-11-16 16:56:47 +01:00
Wolfgang Hommel
ca2f3fefa1
Preliminary support to intercept getrandom() #275
2020-11-15 21:57:10 +01:00
Wolfgang Hommel
dacc5866a7
Merge pull request #270 from sanjaymsh/ppc64le
...
Travis-ci: added support for ppc64le
2020-10-07 19:52:48 +02:00
sanjay-cpu
b35e7c8ca6
Travis-ci: added support for ppc64le
2020-10-07 08:28:41 +00:00
Wolfgang Hommel
25a60d0292
Merge pull request #261 from WayneD/master
...
Some fixes and improvements for utime functions.
2020-07-29 08:11:58 +02:00
Wayne Davison
d90c8c26d3
Some fixes and improvements for utime functions.
...
- Fix the utime() and utimes() functions to work with a NULL arg
(which is a request for "now").
- Add missing utimensat() & futimens() functions.
- Add support for a FAKE_UTIME define and enable it by default. This
is like defining FAKE_FILE_TIMESTAMPS except that the code defaults
to NO utime faking unless FAKE_UTIME environment var enables it.
- When utime values are not being faked, the use of a NULL arg or a
UTIME_NOW nsec value gives the user NOW translated into their fake
current time. This is because the caller's fake times are otherwise
being preserved, so we should help their NOW request also be handled
as a fake time.
- Mention FAKE_FILE_TIMESTAMPS & FAKE_UTIME in the src/Makefile.
- Move a sanity check in fake_clock_gettime() to where it is actually
prior to all the pointer dereferences it should protect.
- Get rid of an errant tab in the src/Makefile's comments.
2020-07-28 18:04:11 -07:00
Wolfgang Hommel
c683c81417
Merge pull request #257 from robinlinden/deprecated-func-warning
...
Fix make test build failure on gcc 9.3
2020-05-29 06:35:51 +02:00
Robin Linden
f19d68ea32
Fix make test build failure on gcc 9.3
...
On Ubuntu 20.04 using gcc 9.3, make test fails due to a deprecated
function (ftime) warning in combination with -Werror in timetest.c.
Since the warning is from a test testing that the deprecated function
can be replaced using LD_PRELOAD, I think it's reasonable to just
silence the warning in that case.
2020-05-28 23:26:25 +02:00
Wolfgang Hommel
c36674c27f
remote automake branch workflow until work on it continues
2020-05-10 13:28:30 +02:00
Wolfgang Hommel
112809f986
Merge branch 'master' of github.com:wolfcw/libfaketime
2020-04-10 13:28:05 +02:00
Wolfgang Hommel
9498b2cacc
add ./configure step to action for automake branch
2020-04-10 13:27:51 +02:00
Wolfgang Hommel
c9a3b1bace
Merge pull request #248 from sdettmer/fix_settime_when_using_rcfile
...
Fixes #247 , FAKE_SETTIME has effect even if rcfile is present
2020-04-09 19:53:06 +02:00
Wolfgang Hommel
834953480e
Merge pull request #249 from sdettmer/settime_update_timestamp_file
...
settime functions support FAKETIME_UPDATE_TIMESTAMP_FILE (for #239 ).
2020-04-09 19:47:06 +02:00
Steffen Dettmer
c1d10321a7
settime functions support FAKETIME_UPDATE_TIMESTAMP_FILE (for #239 ).
...
When the environment variable FAKETIME_TIMESTAMP_FILE is set, points to
a writeable (creatable) custom config file and the environment variable
FAKETIME_UPDATE_TIMESTAMP_FILE is "1", then the file also is updated on
each call. By this, a common "virtual time" can be shared by several
processes, where each can adjust the time for all.
2020-04-09 16:06:32 +02:00
Steffen Dettmer
58ccfb6c27
Fixes #247 , FAKE_SETTIME has effect even if rcfile is present
2020-04-09 13:04:40 +02:00
Wolfgang Hommel
1e25e1f042
fix for github action for automake branch
2020-04-09 11:41:01 +02:00
Wolfgang Hommel
690ed3f158
github action for automake branch
2020-04-09 06:41:10 +02:00
Wolfgang Hommel
d2f0daf092
Merge pull request #246 from sdettmer/dev/sde/pthread_cond_init_232_lazy_init
...
Add lazy ftpl_init() to pthread_cond_init_232(), fixes #245 .
2020-04-08 20:11:57 +02:00
Steffen Dettmer
c5b5d0b56e
Add lazy ftpl_init() to pthread_cond_init_232(), fixes #245 .
2020-04-08 19:57:14 +02:00
Wolfgang Hommel
f8a0ad2496
Merge pull request #244 from sdettmer/dev/sde/faketime_link_flags
...
Added support for FAKETIME_LINK_FLAGS for #243 .
2020-04-08 19:47:46 +02:00
Steffen Dettmer
0e3269efdc
Added support for FAKETIME_LINK_FLAGS for #243 .
2020-04-08 19:40:31 +02:00
Wolfgang Hommel
04e78e67bf
Unskip file parsing on improper initialization #240
2020-03-26 20:07:24 +01:00
Wolfgang Hommel
0e798503a4
Merge pull request #237 from FeepingCreature/fix/use-pthread-mutex-initializer-again
...
replace global state struct with local state struct holding a pointer to the global mutex variable
2020-03-16 13:45:37 +01:00
Mathis Beer
a7f7a54e1d
replace global state struct with local state struct holding a pointer to the global mutex variable
...
this fixes the `{ 0 }` initializer not compiling on some platforms
fix issue 231
fix issue 235
2020-03-16 07:57:07 +01:00
Wolfgang Hommel
8075c2e250
Merge pull request #234 from FeepingCreature/fix/use-appropriate-mask-function
...
Fix timing issue with multiple threads
2020-03-12 21:39:17 +01:00
Mathis Beer
a12ca58dfa
fix threading issue: don't assign to the global lock state struct until we're safely inside the mutex.
...
Otherwise, we might be overwriting the global lock state from two different
threads at once.
2020-03-12 06:49:29 +01:00
Mathis Beer
b4dea2ef9b
Unlock faketime lock on all return paths from libfaketime.c.
...
These gymnastics are necessary because pthread_cleanup_push
and pthread_cleanup_pop must match exactly 1:1 and appear at
the same level of indentation.
This is because pthread_cleanup_push/pop are implemented in
such a way that pthread_cleanup_push opens a scope and
pthread_cleanup_pop closes it.
They're macros with unbalanced brackets.
C, ladies and gentlemen.
So instead of returning, we have to set a field indicating our
intent to return and then jump to the unlock site.
2020-03-12 06:45:43 +01:00
Mathis Beer
796b30bebf
use pthread_sigmask instead of sigprocmask
...
pthread_sigmask is the one meant for threaded programs.
2020-03-12 06:43:33 +01:00
Wolfgang Hommel
70d26ec15c
Merge pull request #230 from FeepingCreature/fix/block-signals-while-locked
...
Fix deadlock issues with signals: block all signals while inside mutex.
2020-03-03 19:47:49 +01:00
Mathis Beer
052239d828
Fix deadlock issues with signals: block all signals while inside mutex.
2020-03-03 17:22:52 +01:00
Wolfgang Hommel
fe8c0acee6
Merge pull request #229 from FeepingCreature/fix/dont-allocate-stack-buffers
...
fake_clock_gettime: avoid placing large buffers on the stack
2020-02-20 21:10:19 +01:00
Mathis Beer
c44a332e0e
fake_clock_gettime: avoid placing large buffers on the stack
2020-02-20 12:14:14 +01:00
Wolfgang Hommel
a54f204209
Merge pull request #227 from wolfcw/develop
...
Refresh the monotonic faketime setting envvar when cache expires.
2020-02-14 19:42:23 +01:00
Wolfgang Hommel
195888434a
Merge pull request #225 from tjhowse/develop
...
Refresh the monotonic faketime setting envar when cache expires.
2020-02-14 19:36:06 +01:00
thowse
f7de52c07b
Refresh the monotonic faketime setting envar when cache expires.
2020-02-14 10:36:29 +10:00
Wolfgang Hommel
0efe7b3e3e
Merge pull request #220 from aristanemi/mul_overflow_fix
...
timespec multiplication overflow fix
2019-12-17 18:55:20 +01:00
Abhishek Sunkum Rammurthy
b542e14959
time multiplication overflow fix
...
In 32 bit platforms, timespecmul2() macro function, overflow occurs during multiplication.
Size of `long` type in 32 bit platform is 4 bytes, but the size of `long` type in 64 bit platform is 8 bytes.
2019-12-17 15:16:38 +01:00
Wolfgang Hommel
78385ba8b7
Use -DFAKE_FILE_TIMESTAMPS to intercept utime[s](), by @speq, #183
2019-12-14 21:49:23 +01:00
Wolfgang Hommel
b3dcef470e
fix #ifndef for timermul, @speq, #183
2019-12-14 21:30:31 +01:00
Wolfgang Hommel
90f11685b5
wrap nanosec ops in #ifndef, patch by @paul-j-lucas, #219
2019-12-14 19:49:04 +01:00
Wolfgang Hommel
d7ef17a0de
Merge pull request #218 from wolfcw/revert-178-automake-branch
...
Revert "Automake branch"
2019-11-30 09:37:00 +01:00
Wolfgang Hommel
3123ad7fe2
Revert "Automake branch"
2019-11-30 09:36:46 +01:00