This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 1/3] Fix windres.exp test on Cygwin
- From: Jon Turney <jon dot turney at dronecode dot org dot uk>
- To: binutils at sourceware dot org
- Cc: Jon Turney <jon dot turney at dronecode dot org dot uk>
- Date: Mon, 6 Jun 2016 16:17:02 +0000
- Subject: [PATCH 1/3] Fix windres.exp test on Cygwin
- Authentication-results: sourceware.org; auth=none
- References: <56E13B1B dot 1010803 at redhat dot com>
I'm guessing that Cygwin's Tcl is built with the default FD_SETSIZE of 64 or
otherwise has some issue with fds greater than 64. windres.exp's main test
leaks 2 fds per iteration, for 31 files currently. This seems to cause the
following objdump -p test to fail. Workaround this by closing fds which are
finished with.
I haven't audited the rest of the tests to see if there are any other
instances of this problem.
before:
Running /wip/binutils-gdb/binutils/testsuite/binutils-all/windres/windres.exp ...
FAIL: objdump -p
=== binutils Summary ===
# of expected passes 104
# of unexpected failures 1
# of expected failures 1
# of unsupported tests 4
after:
=== binutils Summary ===
# of expected passes 105
# of expected failures 1
# of unsupported tests 4
binutils/ChangeLog:
2016-03-10 Jon Turney <jon.turney@dronecode.org.uk>
* testsuite/binutils-all/windres/windres.exp : Work around a
Cygwin tcl issue with more than 64 fds open by closing fds when
finished with them.
---
binutils/ChangeLog | 6 ++++++
binutils/testsuite/binutils-all/windres/windres.exp | 2 ++
2 files changed, 8 insertions(+)
diff --git a/binutils/testsuite/binutils-all/windres/windres.exp b/binutils/testsuite/binutils-all/windres/windres.exp
index fc29dfe..e37fb33 100644
--- a/binutils/testsuite/binutils-all/windres/windres.exp
+++ b/binutils/testsuite/binutils-all/windres/windres.exp
@@ -89,6 +89,7 @@ foreach res $res_list {
}
continue
}
+ close $rc
pass "windres/$broot (parse)"
set rc [open $res]
@@ -141,6 +142,7 @@ foreach res $res_list {
file delete "tmpdir/$broot.res"
file delete "tmpdir/$broot.dump"
}
+ close $rc
}
# Test objdump -p
--
2.8.3