Skip to content

Comments

Deterministic time#25

Merged
wolfcw merged 9 commits intowolfcw:masterfrom
rbalint:deterministic-time
Aug 29, 2013
Merged

Deterministic time#25
wolfcw merged 9 commits intowolfcw:masterfrom
rbalint:deterministic-time

Conversation

@rbalint
Copy link
Collaborator

@rbalint rbalint commented Aug 27, 2013

Please test it on Apple. There were many changes but I could not test them.

@wolfcw
Copy link
Owner

wolfcw commented Aug 28, 2013

Some comments w.r.t. Mac OS X:

ft_shm_init and next_time are declared within #ifdef FAKE_STAT, which is not set in the Mac OS X Makefile by default, and therefore libfaketime/deterministic-time cannot be compiled on OS X at the moment (it's certainly also broken on other OS when compiled without FAKE_STAT). I think I fixed this for the master branch after merging your last commit by moving both functions (as well as ft_cleanup and the two new global ticks-variables) in front of the offending #ifdef (line 92), and did so again for my tests. With these minor changes, the library compiles cleanly and its basic functionality still works.

Could you please fix the #ifdef FAKE_STAT issue? It also seems to prevent automatic merging.

Also, do you have a list of tests, which you perform on Linux for your new features? I can try the same on OS X then.

@rbalint
Copy link
Collaborator Author

rbalint commented Aug 28, 2013

I have fixed the FAKE_STAT issue, sorry for not rebasing my branch earlier.

I only performed manual testing trying the commands listed in --help.
I compile with PREFIX set to the development dir and tested the file loading/saving like this:
FAKETIME_SAVE_FILE=/home/.../asdfasdf ./faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do date; sleep 1 ; done'
FAKETIME_LOAD_FILE=/home/.../asdfasdf ./faketime -f '+2,5y i2,0' /bin/bash -c 'date; while true; do date; sleep 1 ; done'

I think automatic test coverage could be extended by adding faketime [-l lib-path] parameter and running faketime from the test scripts instead of setting up environment variables as new features require faketime to set up shared memory.

@wolfcw wolfcw merged commit 6f83e22 into wolfcw:master Aug 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants