Tests for descriptor leaks