Commit Graph

7 Commits

Author SHA1 Message Date
Siddharth Agarwal
e60aaeccf1 test-lock.py: fix testing for forks
The earlier test worked only because the held count went up to 2, so the first
release brought it down to 1. Making a copy of the lock fixes that issue.
2015-09-24 22:00:51 -07:00
Siddharth Agarwal
1d157c4b16 test-lock.py: allow PID to be changed in test state
This will be used in upcoming patches to create locks that appear as if they're
being created by child processes.
2015-09-24 20:40:00 -07:00
Siddharth Agarwal
e006a50c9b test-lock.py: add a lock wrapper that allows faking the PID
This will be used in upcoming patches to create locks that appear as if they're
being created by child processes.
2015-09-24 20:22:59 -07:00
Siddharth Agarwal
14584f8c1d test-lock.py: move temp dir generation to testcase
In upcoming patches we'll want to create multiple test state objects with a
common test directory.
2015-09-24 19:52:34 -07:00
Siddharth Agarwal
abec122d89 test-lock.py: copy-edit assertions about file existing
Before: expected lock to exists but actually did not exists
After:  expected lock to exist but actually did not exist
2015-09-24 17:33:13 -07:00
Siddharth Agarwal
0edaba580a lock: move acquirefn call to inside the lock
We're going to need to call it again as part of reinitialization after a
subprocess inherits the lock.
2015-09-22 14:09:42 -07:00
Siddharth Agarwal
3896b66e0f tests: add unit tests for locking code
We're going to make significant changes to lock behavior soon.
2015-09-17 15:38:00 -07:00