Closed sveyret closed 2 years ago
Thanks, your PR with updating shared memory on reset looks good, and I will merge it. Sorry for the delay.
Also, I didn't quite understand whether your testing procedure restarts the application under test over and over again, or whether it is started only once and then the environment variable is updated for the child process. It might also be worth trying to not run the testing process under libfaketime, but only LD_PRELOAD libfaketime when the application under test ist started.
Yes, we need to restart the application under test in order to test different scenarios at different times. We thought about not running the testing procedure under libfaktime, but this procedure needs to check at what time the tested application reacts, and it would be far more complicated to calculate that time instead of simply have it simulated also.
Thank you for merging the PR.
Hi,
I have an issue using
libfaketime
. My use case is the following:FAKETIME
environment variable in order to test the app at different dates. The speed is also adjusted.The problem is that I don’t manage times to be synchronized:
FAKETIME_DONT_RESET
, the app time is based on the start of the testing process, but because the time and speed changed since then, the time is not the same in both processes.FAKETIME_DONT_RESET
globally, times are sync’d, but it is not possible to change the time in the testing process.FAKETIME_DONT_RESET
only for the app, the time is not the same either because counted from the beginning of the testing process.The only solution I found was to set
FAKETIME_DONT_RESET
in the app only, and update the library for it also reset the shared memory when start time is reset in the testing process. I can provide a PR.