summaryrefslogtreecommitdiff
path: root/src/test/test_workqueue.c
AgeCommit message (Collapse)Author
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-07-27Add support for multi-priority workqueuesNick Mathewson
Each piece of queued work now has an associated priority value; each priority goes on a separate queue. With probability (N-1)/N, the workers will take work from the highest priority nonempty queue. Otherwise, they'll look for work in a queue of lower priority. This behavior is meant to prevent starvation for lower-priority tasks.
2017-03-15Run the copyright update script.Nick Mathewson
2016-07-04Raise libevent dependency to 2.0.10-stable or newerSebastian Hahn
Only some very ancient distributions don't ship with Libevent 2 anymore, even the oldest supported Ubuntu LTS version has it. This allows us to get rid of a lot of compat code.
2016-06-08Add several test scripts wrapping test_workqueueNick Mathewson
This is a fairly easy way for us to get our test coverage up on compat_threads.c and workqueue.c -- I already implemented these tests, so we might as well enable them.
2016-02-27Update the copyright year.Nick Mathewson
2015-11-25Add crypto-initializer functions to those whose return values must be checkedNick Mathewson
2015-11-25Make crypto_seed_rng() and crypto_rand() less scary.Nick Mathewson
These functions must really never fail; so have crypto_rand() assert that it's working okay, and have crypto_seed_rng() demand that callers check its return value. Also have crypto_seed_rng() check RAND_status() before returning.
2015-08-21Fix a bunch of check-spaces complaintsSebastian Hahn
2015-08-21Ensure worker threads actually exit when it is timeSebastian Hahn
This includes a small refactoring to use a new enum (workqueue_reply_t) for the return values instead of just ints.
2015-08-20New testcase exposing bug during threadpool shutdownSebastian Hahn
We don't want to accept any work after one of our worker functions has returned WQ_RPL_SHUTDOWN. This testcase currently fails, because we do not actually stop any of the worker threads.
2015-08-05Let's try to get test_workqueue working on windowsNick Mathewson
2015-07-21Improve the workqueue test help message.cypherpunks
The workqueue test help message has two issues. First, the message uses 4 space indentation when 2 space indentation seems more common. Second, the help message misses some options. This commit fixes both issues.
2015-07-21Limit the number of inflight items to the number of items.cypherpunks
2015-07-03Make test_workqueue.c faster, and on-by-default.Nick Mathewson
Instead of having a 30-second timer be the only way to end the test, add a 2 second shutdown timer when the test is actually about to be over.
2015-05-20Merge branch 'bug16034_no_more_openssl_098_squashed'Nick Mathewson
Conflicts: src/test/testing_common.c
2015-05-20Now that OpenSSL 0.9.8 is dead, crypto_seed_rng() needs no argsNick Mathewson
It needed an argument before because it wasn't safe to call RAND_poll() on openssl 0.9.8c if you had already opened more fds than would fit in fd_set.
2015-03-24Put an upper bound on test_workqueue -I argumentNick Mathewson
This makes coverity happy, since it doesn't like us looping against a value which might be INT_MAX. This is CID 1268069
2015-01-21Fix: change copyright year in workqueue and thread testsDavid Goulet
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-15Update workqueue implementation to use a single queue for the workNick Mathewson
Previously I used one queue per worker; now I use one queue for everyone. The "broadcast" code is gone, replaced with an idempotent 'update' operation.
2015-01-14Fix check-spacesNick Mathewson
2015-01-14Test and fix workqueue_entry_cancel().Nick Mathewson
2015-01-14Add shutdown and broadcast support to test_workqueue.Nick Mathewson
2015-01-14Test a little more of compat_threads.cNick Mathewson
2015-01-14Rename bench_workqueue -> test_workqueue and make it a unit test.Nick Mathewson