Nim/tests/stdlib
alaviss c1ca06b452
tfdleak: fix flakyness on Windows (#14550)
* tfdleak_multiple: introduce stress tester for tfdleak

Imported from #14548 and tweaked for consumption by testament.

This test seems to be really good at bringing out the flakyness of
tfdleadk.

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* tfdleak: increase accuracy of the test on Windows

This commit implements a new testing strategy for Windows:
1. We duplicate the handle that will be tested and enable inheritance.
   This duplicate will serve as a reference handle.
2. In addition to checking whether the handle is valid, we also verify
   whether the handle is the same as the reference. This gives us
   complete certainty on whether the handle in question is inherited
   from the parent.
   A side effect is that this uses Windows 10+ APIs. But since
   this is just for the test, we don't have to be picky about it.

Ideally we would want to do something like this for other POSIX-based
system, but most of them lack a facility to do this, and as of writing
there isn't any false positive for them, so we won't need the additional
checks.

MemFile.fHandle will also no longer be tested, as this handle defaults
to being invalid.

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2020-06-04 13:25:38 +02:00
..
nre Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
genericstrformat.nim Strformat symbol binding (#10927) 2019-04-05 15:27:04 +02:00
mjsonexternproc.nim Reorder json add and %, fixes #6385 (#6388) 2017-09-16 19:09:44 +01:00
mstackframes.nim stacktraces can now show custom runtime msgs per frame (#13351) 2020-03-30 13:45:32 +02:00
osproctest.nim Add workingDir parameter to execProcess and test (#9549) 2018-11-26 10:28:44 +01:00
somesql.sql Parse the usage of the SQL in operator properly (#9527) 2018-10-28 13:34:57 +01:00
t8925.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
t10231.nim fixes #10273 execShellCmd now returns nonzero when child killed with signal + other fixes (#10274) 2019-01-13 09:00:39 +01:00
tasynchttpserver.nim Add barebones asynchttpserver tests (#13883) 2020-04-05 21:16:13 +02:00
tbase64.nim fixes #13722 (#13729) 2020-03-23 15:47:10 +01:00
tbitops.nim Added bitslice operations for bitops (#14016) 2020-05-06 12:21:49 +02:00
tbitops.nim.cfg add bitops module for optimized bit manipulation. (#5201) 2017-03-14 21:32:54 +01:00
tcgi.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tdecls.nim std/byaddr => std/decls (#13847) 2020-04-03 09:03:13 +02:00
tfdleak.nim tfdleak: fix flakyness on Windows (#14550) 2020-06-04 13:25:38 +02:00
tfdleak_multiple.nim tfdleak: fix flakyness on Windows (#14550) 2020-06-04 13:25:38 +02:00
tfrexp1.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tgetaddrinfo.nim Fix #14091 and #14093 - test failures on NetBSD (#14096) 2020-04-24 09:18:44 +02:00
tgetfileinfo.nim Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
thashes.nim Add hashWangYi1 (#13823) 2020-04-15 20:11:18 +02:00
thtmlparser.nim StringStream & more stdlib modules support for JS/NimScript (#14095) 2020-04-28 19:44:52 +02:00
thttpclient.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
thttpclient_ssl.nim fix nim CI; fix local testament (#14102) 2020-04-24 10:24:30 +02:00
thttpclient_ssl_cert.pem SSL certificate verify GitHub action (#13697) 2020-03-20 17:11:39 +01:00
thttpclient_ssl_key.pem SSL certificate verify GitHub action (#13697) 2020-03-20 17:11:39 +01:00
thttpcore.nim Fix #13573 and #13574 (#13575) 2020-03-06 18:38:56 +00:00
tintsets.nim tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport] 2020-02-26 22:07:09 +01:00
tjson_unmarshall.nim fix #13531 by adding a test (#13581) 2020-03-04 10:25:59 +01:00
tjsonexternproc.nim updated tests to be executed 2018-11-23 11:58:28 +01:00
tjsonmacro.nim Extent json.to testing to VM, add workrounds for VM bugs. (#12493) 2019-10-28 10:06:16 +01:00
tjsonmacro_reject.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tjsontestsuite.nim updated tests to be executed 2018-11-23 11:58:28 +01:00
tlists.nim add SinglyLinkedList.append procs 2018-11-27 10:34:34 +01:00
tlocks.nim fixes #6049 add mixin release, acquire to withLock (#6113) 2017-07-16 16:54:09 +02:00
tmarshal.nim fixes #8916 by fixing typeinfo and marshal. (#9341) 2018-10-13 08:47:58 +02:00
tmath.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tmemfiles1.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tmemfiles2.nim Merge branch 'araq-devel' of github.com:nim-lang/Nim into araq-devel 2018-07-06 17:27:02 +02:00
tmemlines.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tmemlinesBuf.nim eyewash 2018-11-23 11:58:31 +01:00
tmemmapstreams.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
tmemslices.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tmget.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tmitems.nim Added deques module, deprecating queues 2016-11-24 19:11:51 +07:00
tnet.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tnet_ll.nim Fixed tests to expect [Suite] output from unittest 2016-08-24 22:32:29 +02:00
tnetbind.nim Handle IPv6 in bindAddr #7633 2019-02-23 13:06:26 +00:00
tnetdial.nim fix deprecations and other warnings (#13748) 2020-03-25 19:15:34 +01:00
tnre.nim Testament pre parallel (#9137) 2018-10-12 17:27:47 +02:00
tos.nim fix #13222: make relativePath more robust and flexible (#13451) 2020-04-21 23:53:55 +02:00
tos_unc.nim fixes #10952, UNC paths (#11260) 2019-05-16 21:06:04 +02:00
tosproc.nim trunner was not actually being tested in non-CTFFI mode; minor testament cleanups (#14377) 2020-05-19 09:41:31 +02:00
tosprocterminate.nim #12103 - CI for OpenBSD (#12105) 2020-04-21 15:05:21 +02:00
tparscfg.nim StringStream & more stdlib modules support for JS/NimScript (#14095) 2020-04-28 19:44:52 +02:00
tparsecfg.nim fixes #6046 parsecfg failed to parse negative int (#6097) 2017-07-14 16:28:39 +02:00
tparseipv6.nim added IP v6 parsing tests 2017-05-04 22:25:29 +02:00
tparsesql.nim StringStream & more stdlib modules support for JS/NimScript (#14095) 2020-04-28 19:44:52 +02:00
tparseuints.nim Fixed tests to expect [Suite] output from unittest 2016-08-24 22:32:29 +02:00
tparsopt.nim more tests fixed 2018-11-23 11:58:29 +01:00
tpegs.nim StringStream & more stdlib modules support for JS/NimScript (#14095) 2020-04-28 19:44:52 +02:00
tposix.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tquit.nim testament: joinable is now an explicit concept of a test spec 2018-12-11 21:23:24 +01:00
tre.nim close #14284 document semantics for start for re,nre; improve examples (#14483) 2020-05-28 20:43:36 +02:00
tregex.nim require errormsg to be specified before file. 2018-12-11 21:23:21 +01:00
trepr.nim fixes #7878 2019-01-14 12:36:34 +01:00
trst.nim Rst parser respect :start-after: and :end-before: in include directive (#12972) 2020-01-05 10:01:21 +01:00
trstgen.nim rst: parse brackets individually, fixes #10475 (#10997) 2019-04-10 15:55:57 +02:00
tsharedtable.nim tables/sharedtables/intsets/etc: fix #13496, #13504, #13505; add lots of tests (#13498) [backport] 2020-02-26 22:07:09 +01:00
tsince.nim move since from inclrtl to std/private/since (#14188) 2020-05-02 23:51:59 +02:00
tsortcall.nim activated more tests, allow input in test spec 2018-11-23 11:58:28 +01:00
tsqlparser.nim megatest can be executed 2018-12-11 21:23:21 +01:00
tstackframes.nim trunner was not actually being tested in non-CTFFI mode; minor testament cleanups (#14377) 2020-05-19 09:41:31 +02:00
tstdlib_issues.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
tstdlib_various.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
tstreams.nim faster CIs (#13803) 2020-03-30 13:18:12 +02:00
tstrformat.nim fixes #14054 [backport:1.2] (#14061) 2020-04-30 06:48:57 +02:00
tstring.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
tstrscans.nim Fix strscans.scanp (#9518) 2018-10-28 13:35:30 +01:00
tstrset.nim the parser finally parses 'echo {1,2}' as it should 2017-09-30 21:35:30 +02:00
tstrtabs.nim add a StringTable.clear that requires no mode specification (#12853) 2019-12-09 06:58:36 +01:00
tstrutil.nim parseEnum_regression (#14150) 2020-04-28 19:56:50 +02:00
ttimes.nim Make the fields of times.DateTime private (#14197) 2020-05-06 12:20:34 +02:00
tunidecode.nim fixes #14112, tests for #12892, #12671, #11697 (#14125) 2020-04-26 10:12:16 +02:00
tunittest.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
tunittestexceptiontype.nim Added: type name output when exception raised from unittest (#7869) 2018-05-28 05:24:04 +03:00
tunittesttemplate.nim fix several bugs with repr (#13386) 2020-02-11 21:33:06 +01:00
tvarints.nim Make unused code into actual test, replace echo with doassert (#13952) 2020-04-11 22:16:26 +02:00
twchartoutf8.nim make more tests green 2018-04-30 11:16:56 +02:00
twrapnils.nim Error -> Defect for defects (#13908) 2020-04-28 19:56:01 +02:00
uselocks.nim fixes #6049 add mixin release, acquire to withLock (#6113) 2017-07-16 16:54:09 +02:00