summaryrefslogtreecommitdiff
path: root/test/tinytest.c
Commit message (Collapse)AuthorAgeFilesLines
* test: handle -v as --verbose for regressAzat Khuzhin2023-02-121-2/+2
|
* test: retriable tests are marked failed only when all attempts have failedThomas Perrot2021-10-021-7/+6
| | | | Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
* test: add --retries-delay (and set to 1 second by default)Azat Khuzhin2021-09-191-2/+23
| | | | | | In attemp to address failures of dns/tcp_* tests under windows [1]. [1]: https://github.com/azat/libevent/runs/3644218468?check_suite_focus=true
* test: add --retries argumentAzat Khuzhin2021-09-191-4/+12
|
* test: detect test failures if atexit handler calls _exit(!0) (sanitizers)Azat Khuzhin2020-06-251-2/+10
| | | | | | | | | | tinytest uses another way of detecting test failures, it uses pipe between child and parent, and if the test function in child returns OK it writes OK flag into pipe, and reads it in parent. However sanitizers uses atexit handlers to detect leaks, and this will not detect failures in case of exit() will be called from the atexit handlers, fix this by checking status after waitpid().
* tinytest: support timeout on Windowsyuangongji2019-09-261-31/+82
|
* tinytest: fix parsing --timeout argumentAzat Khuzhin2019-03-241-2/+3
| | | | Fixes: 15b2f41d ("tinytest: implement per-test timeout (via alarm() under !win32 only)")
* tinytest: implement per-test timeout (via alarm() under !win32 only)Azat Khuzhin2019-03-241-2/+38
|
* regress: introduce TT_RETRIABLEAzat Khuzhin2018-11-201-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some tests that has false-positive due to real/CPU time bound, but they are pretty generic and we do not want to skip them by default. TT_RETRIABLE is the flag that will indicate tinytest to retry the test in case of failure, use it to avoid next possible false-positives: - real time-related - CPU time-related Since I guess it is better to see/grepping RETRYING messages over ignoring completely failed builds. No configuration switch for number of retries was done on purpose (only 3 retries and no more). And this is how it looks BTW: $ gcc ../test/tinytest_demo.c ../test/tinytest.c $ ./a.out --verbose --no-fork demo/timeout_retry demo/timeout_retry: FAIL ../test/tinytest_demo.c:201: assert(i != 1): 1 vs 1 [timeout_retry FAILED] [RETRYING timeout_retry (3)] demo/timeout_retry: OK ../test/tinytest_demo.c:201: assert(i != 1): 2 vs 1 OK ../test/tinytest_demo.c:213: assert(t2-t1 >= 4): 5 vs 4 OK ../test/tinytest_demo.c:215: assert(t2-t1 <= 6): 5 vs 6 1 tests ok. (0 skipped)
* Update to the latest version of tinytestNick Mathewson2014-03-061-0/+33
| | | | This brings us up to tinytest 709a36ba63ff16d8
* Update to latest tinytest (911b4f0349377)Nick Mathewson2012-06-281-22/+83
|
* Work-around a stupid gcov-breaking bug in OSX 10.6Nick Mathewson2012-04-111-0/+12
| | | | | | This only affects the unit tests. Fix found at http://rachelbythebay.com/w/2011/07/12/forkcrash/
* Synchronize with upstream tinytestNick Mathewson2012-02-131-15/+15
|
* Merge remote-tracking branch 'origin/patches-2.0'Nick Mathewson2012-02-101-1/+1
|\ | | | | | | | | | | | | Conflicts: Makefile.am WIN32-Code/event2/event-config.h configure.in
| * Update copyright notices to 2012Nick Mathewson2012-02-101-1/+1
| |
* | When including an -internal.h header outside the main tree, do so earlyNick Mathewson2012-01-241-4/+3
| | | | | | | | | | | | | | | | | | | | Some of our unit tests and sample code need functions and structures defined in an -internal.h header. But that can freak out OpenSolaris, where stdio.h wants to define _FILE_OFFSET_BITS unless it's already defined, and then evconfig-internal.h defines it. Regular users should never ever use our -internal.h headers, so the solution is to make sure that if we're going to use them ourselves, we do so before system headers.
* | Merge remote-tracking branch 'origin/patches-2.0'Nick Mathewson2011-10-261-1/+1
|\ \ | |/
| * Update copyright dates to 2011.Nick Mathewson2011-10-241-1/+1
| |
* | Merge remote-tracking branch 'origin/patches-2.0'Nick Mathewson2011-06-111-3/+8
|\ \ | |/ | | | | | | Conflicts: test/tinytest.c
| * Simplify windows commandname logic in tinytestNick Mathewson2011-06-111-19/+8
| | | | | | | | | | | | Instead of using a dup'd pointer, let's use a static array, so we don't need to free it. This patch also makes tinytest build on non-windows again.
| * Fix tinytest invocation from windows shellEd Day2011-06-111-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original post: This post is in response to a posting last December on a Windows regression fork failure ([Libevent-users] Re: Libevent 2.0.10-stable is released by Dongsheng Song). I noticed the question was not answered and I recently experienced the same error myself when trying to run the Windows regression tests myself. I checked the return status from the CreateProcess call and found it was "file not found". This led me to look at the command-line I was using which was .\regress in a Visual Studio 2008 command prompt window. Windows could not find the file because it did not have the .exe extension on the end. The code that builds the command should be modified to ensure the extension is present.
* | Use "_WIN32", not WIN32: it's standard and we don't need to fake itNick Mathewson2011-05-251-4/+4
|/ | | | | | This patch was automatically generated with perl. Based on a patch by Peter Rosin.
* Fix some irix compilation warnings spotted by Kevin BowlingNick Mathewson2010-11-221-0/+2
|
* Fixes for MSVC compilationNick Mathewson2010-10-141-3/+4
|
* Bump to the latest version of tinytestNick Mathewson2010-09-091-11/+26
| | | | | | This lets us do without libevent-specific code in tinytest.c, and lets us add a feature to skip individual tests from the command line.
* Update all our copyright notices to say "2010"Nick Mathewson2010-03-041-1/+1
|
* Clean up formatting: use tabs, not 8-spaces, to indent.Nick Mathewson2010-02-181-3/+3
|
* Fix some additional -DUNICODE issues on win32.Nick Mathewson2010-02-031-2/+2
| | | | Brodie's patch didn't catch the ones that were new since 1.4.
* Various MSVC cleanups from Brodie Thiesfield.Nick Mathewson2009-07-281-2/+5
| | | | svn:r1385
* Add a tinytest flag to initialize threading.Nick Mathewson2009-07-171-0/+2
| | | | svn:r1357
* Stop using C++ style comments.Nick Mathewson2009-07-141-1/+0
| | | | svn:r1343
* Fix win32 compilation issues.Nick Mathewson2009-04-231-1/+1
| | | | svn:r1234
* Even _more_ recent tinytest, designed to give better help output.release-2.0.1-alphaNick Mathewson2009-04-171-4/+10
| | | | svn:r1192
* Add the latest tinytest. This one supports a --terse flag and a --no-fork ↵Nick Mathewson2009-04-171-25/+44
| | | | | | flag, and outputs nicer. svn:r1190
* Tinytest update: mostly just to allow test skipping.Nick Mathewson2009-01-311-14/+36
| | | | svn:r1080
* Refactor unit tests using my spiffy new "tinytest" framework.Nick Mathewson2009-01-291-0/+314
The big win here is that we can get process-level isolation. This has been tested to work okay on at least Linux and Win32. Only the tests in regress.c have been converted wrapped in the new wrapper functions; the others are still on the old system. svn:r1073