tests/threads/diff.c


Log

Author Commit Date CI Message
Edward Thomson d1919485 2018-08-05T11:01:14 threads::diff: use separate git_repository objects Our thread policies state that we cannot re-use the `git_repository` across threads. Our tests cannot deviate from that.
Patrick Steinhardt 13c275ab 2017-04-21T07:49:08 tests: threads::diff: fix warning for unused variable The threads::diff test suite has a static variable `_retries`, which is used on Windows platforms only. As it is unused on other systems, the compiler throws a warning there. Fix the warning by wrapping the declaration in an ifdef.
Edward Thomson 48f09c6c 2017-04-05T11:59:03 win32: only set `git_win32__retries` where it exists
Edward Thomson 7ece9065 2017-04-03T23:07:16 win32: make posix emulation retries configurable POSIX emulation retries should be configurable so that tests can disable them. In particular, maniacally threading tests may end up trying to open locked files and need retries, which will slow continuous integration tests significantly.
Carlos Martín Nieto 905fb592 2014-07-03T05:47:34 Move yield to the tests and enable for FreeBSD Move the definition of git_thread_yield() to the test which needs it and add the correct definition for it for FreeBSD and derivatives. Original patch adding FreeBSD and derivatives by @jacquesg.
Russell Belfer 83038272 2014-04-17T14:35:29 Some memory leak fixes
Russell Belfer ea642d61 2014-04-14T12:29:27 Fix race checking for existing index items In the threading tests, I was still seeing a race condition where the same item could end up being inserted multiple times into the index. Preserving the sorted-ness of the index outside of the `index_insert` call fixes the issue.
Russell Belfer 7d490872 2014-04-10T22:31:01 Attribute file cache refactor This is a big refactoring of the attribute file cache to be a bit simpler which in turn makes it easier to enforce a lock around any updates to the cache so that it can be used in a threaded env. Tons of changes to the attributes and ignores code.
Russell Belfer 3816debc 2014-03-14T14:51:04 Fix threading tests when threads disabled
Russell Belfer 8a2834d3 2014-03-14T13:20:51 Index locking and entry allocation changes This makes the lock management on the index a little bit broader, having a number of routines hold the lock across looking up the item to be modified and actually making the modification. Still not true thread safety, but more pure index modifications are now safe which allows the simple cases (such as starting up a diff while index modifications are underway) safe enough to get the snapshot without hitting allocation problems. As part of this, I simplified the allocation of index entries to use a flex array and just put the path at the end of the index entry. This makes every entry self-contained and makes it a little easier to feel sure that pointers to strings aren't being accidentally copied and freed while other references are still being held.
Russell Belfer 40ed4990 2014-02-11T14:45:37 Add diff threading tests and attr file cache locks This adds a basic test of doing simultaneous diffs on multiple threads and adds basic locking for the attr file cache because that was the immediate problem that arose from these tests.