diff options
author | alaviss <leorize+oss@disroot.org> | 2020-06-04 06:25:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 13:25:38 +0200 |
commit | c1ca06b4525b12022a5f8368582549e5bb01a438 (patch) | |
tree | 34f96b76c4d13f77f2f4b4b9759cbfeb0aeecb2e /examples | |
parent | 01f6e505c8b23fa55506d39864f6353e2a10a276 (diff) | |
download | Nim-c1ca06b4525b12022a5f8368582549e5bb01a438.tar.gz |
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>
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions