Commit Graph

3 Commits

Author SHA1 Message Date
Cory Benfield fd35cd9e52
Extend the integration test harness to track FDs (#2411)
* Extend the integration test harness to track FDs

Motivation

This patch extends the NIO integration test harness to track
file descriptors, in particular to search for leaks. This
change has been validated on Linux and Darwin, and in both cases
correctly diagnoses FD leaks.

The goal is to enable us to regression test for things like

Modifications

- Add support for hooking socket and close calls.
- Wire up this support into the test harness.
- Extend the test harness to handle the logging.
- Add new regression test for #2047.

Results

We can write regression tests for FD leaks.

* Disable FD checking in most builds.

I'm doing this for speed reasons

* Always print the leaked fds number
2023-04-26 08:38:18 -07:00
Johannes Weiss 3a2fc0d39b
alloc tests: implement malloc_zone_* (#1569)
Motivation:

The Swift runtime is now using malloc_zone_*, we need to implement
replacements for these too. This is just a first pass, eventually, we
should implement _all_ replacements as `malloc_zone_memalign` which is
powerful enough to implement all others.

Modifications:

Provide new replacements.

Result:

Alloc tests work again on macOS.

Co-authored-by: Cory Benfield <lukasa@apple.com>
2020-06-26 11:04:37 +01:00
Johannes Weiss 5d1d59868d new alloc counter tests (#996) 2019-05-09 14:27:29 +01:00