kc3-lang/libevent/test

Branch :


Log

Author Commit Date CI Message
a969f7e7 2012-04-09 08:40:45 Merge pull request #50 from rosslagerwall/simplify-test Simplify test.sh code significantly.
3aa44159 2012-04-09 11:30:46 Tweak the new evutil_weakrand_() code Make its state actually get seeded. Document it more thoroughly. Turn its state into a structure. Fix a bug in evutil_weakrand_range_() where it could return the top of the range. Change its return type to ev_int32_t. Add a quick unit test to make sure that the value of evutil_weakrand_range_() is in range.
e86af4b7 2012-04-09 10:46:32 Change evutil_weakrand_() to avoid platform random() This change allows us to avoid perturbing the platform's random(), and to avoid hitting locks on random() in the platform's libc. evutil_weakrand_() is, well, weak, so we choose here an algorithm that favors speed over a number of other possibly desirable properties. We're using a linear congruential generator, and taking our parameters from those shared by the OpenBSD random() implementation, and Glibc's fastest random() implementation. The low bits of a LCG of modulus 2^32 are (notoriously) less random than the higher bits. So to generate a random value in a range, using the % operator is no good; we ought to divide. We add an evutil_weakrand_range_() function to do that. This code also changes the interface of evutil_weakrand_() so that it now manipulates an explicit seed, rather than having the seed in a static variable. This change enables us to use existing locks to achieve thread-safety, rather than having to rely on an additional lock. (Patch by Nicholas Marriott; commit message by Nick Mathewson.)
9b856fd5 2012-04-07 17:32:00 Simplify test.sh code significantly. Also make it easier to add new tests/backends.
2449e0c5 2012-04-03 16:15:49 Fix some compilation warnings with msvc
6c95c6c8 2012-04-03 15:43:40 Decrease MAX_REQUESTS in test-fdleak We've got to do this because doing otherwise seems to freak out windows XP.
14eb28a3 2012-04-03 15:41:12 Include util-internal.h earlier in test-dumpevents to fix solaris build See 95e2455cdbf840b for rationale.
e78baf4a 2012-04-03 14:54:39 Fix compilation with mm-replacement disabled.
55e8dc1b 2012-04-03 14:51:51 Make check-dumpevents work with out-of-tree builds
f7b8200c 2012-04-03 12:36:51 Make check-dumpevents.py actually get included in the tarballs