This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/3] Fix windres.exp test on Cygwin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]