X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Authenticated: #27081556 X-Provags-ID: V01U2FsdGVkX19xsTd3qjlx8TP0MTTeyNhIQMeY+eP67hqnQVlmxj 0QZHYKb6rhel8s From: Juan Manuel Guerrero To: djgpp AT delorie DOT com Subject: May be redir or bash genertes "Cannot duplicate fd 0: Bad file descriptor (EBADF)" error Date: Mon, 2 Aug 2010 22:03:28 +0200 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201008022203.28239.juan.guerrero@gmx.de> X-Y-GMX-Trusted: 0 While I was trying to port Make-3.82 I have observed that the testsuite produces different amount of errors depending what options I use with redir. I usualy run redir like this: redir -eo make check > eo.txt and this lets the testsuite pass with very little amount of errors (5 Tests in 3 Categories). But if I run redir like this: redir -o o.txt make check or if I run the testsuite like this: make check > o.txt I get a lot more of errors (24 Tests in 14 Categories). I have replaced perl 5.8.8 witch perl 5.6.1 but nothing changed. I use bsh205bbr3. I do not remember that I have observed this behaviour before. If I run the same code and testsuite using djdev203 there is no difference in the output produced by the testsuite no mather wich output redirection I use. I use bsh205bbr3 there too. I compiled the code with djdev204 and with djdev203 on WinXP Prof SP3 sytem (installed on VMware on OpenSUSE). The question arises, can I trust the port? This means is the failure probably originated by redir and/or bash? Almost all testcases that fail produces diff files that contains lines like this: + c:/TMP/dj720000: line 1: Cannot duplicate fd 0: Bad file descriptor (EBADF) I am aware that there will be no fast way to solve this issue. The only issue important to me is to identify the culprit to be able to decide if it is worth to upload the make-3.82 port or not. Below I append both versions of the output produced by the testsuite. The first output is produced by the "redir -eo" version and the second one is produced by the "redir -o". Regards, Juan M. Guerrero Making all in doc e:/m/make-3.82/make.exe -C doc -f ../Makefile VPATH=./doc make.info make.exe[1]: Entering directory `e:/m/make-3.82/doc' make.exe[1]: `make.info' is up to date. make.exe[1]: Leaving directory `e:/m/make-3.82/doc' Making check in glob e:/m/make-3.82/make.exe -C glob -f ../Makefile check-am make.exe[1]: Entering directory `e:/m/make-3.82/glob' make.exe[1]: Nothing to be done for `check-am'. make.exe[1]: Leaving directory `e:/m/make-3.82/glob' Making check in doc e:/m/make-3.82/make.exe -C doc -f ../Makefile check-am make.exe[1]: Entering directory `e:/m/make-3.82/doc' make.exe[1]: Nothing to be done for `check-am'. make.exe[1]: Leaving directory `e:/m/make-3.82/doc' If Make says Error -1, you do not have Unix-style shell installed cd tests && perl ./run_make_tests.pl -make ../make.exe ------------------------------------------------------------------------------ Running tests for GNU make on MS-DOS MEIN_COM 5 i786 GNU Make 3.82 ------------------------------------------------------------------------------ Finding tests... features/comments ....................................... ok (1 passed) features/conditionals ................................... ok (4 passed) features/default_names .................................. ok (2 passed) features/double_colon ................................... ok (6 passed) features/echoing ........................................ ok (4 passed) features/errors ......................................... ok (2 passed) features/escape ......................................... ok (6 passed) features/export ......................................... ok (12 passed) features/include ........................................ ok (10 passed) features/mult_rules ..................................... ok (2 passed) features/mult_targets ................................... ok (2 passed) features/order_only ..................................... ok (10 passed) features/override ....................................... ok (4 passed) features/parallelism .................................... N/A features/patspecific_vars ............................... ok (10 passed) features/patternrules ................................... ok (10 passed) features/quoting ........................................ ok (1 passed) features/recursion ...................................... ok (2 passed) features/reinvoke ....................................... ok (4 passed) features/se_explicit .................................... ok (9 passed) features/se_implicit .................................... ok (9 passed) features/se_statpat ..................................... ok (4 passed) features/statipattrules ................................. ok (8 passed) features/targetvars ..................................... ok (23 passed) features/varnesting ..................................... ok (1 passed) features/vpath .......................................... ok (2 passed) features/vpath2 ......................................... ok (1 passed) features/vpath3 ......................................... ok (1 passed) features/vpathgpath ..................................... ok (1 passed) features/vpathplus ...................................... ok (4 passed) functions/abspath ....................................... FAILED (0/1 passed) functions/addprefix ..................................... ok (1 passed) functions/addsuffix ..................................... ok (2 passed) functions/andor ......................................... ok (2 passed) functions/basename ...................................... ok (1 passed) functions/call .......................................... ok (2 passed) functions/dir ........................................... ok (1 passed) functions/error ......................................... ok (5 passed) functions/eval .......................................... ok (9 passed) functions/filter-out .................................... ok (1 passed) functions/findstring .................................... ok (1 passed) functions/flavor ........................................ ok (1 passed) functions/foreach ....................................... ok (4 passed) functions/if ............................................ ok (1 passed) functions/join .......................................... ok (1 passed) functions/notdir ........................................ ok (1 passed) functions/origin ........................................ ok (1 passed) functions/realpath ...................................... Error running e:/m/make-3.82/tests/../make.exe (expected 0; got 512): e:/m/make-3.82/tests/../make.exe -f work/functions/realpath.mk Error running e:/m/make-3.82/tests/../make.exe (expected 0; got 512): e:/m/make-3.82/tests/../make.exe -f work/functions/realpath.mk.1 FAILED (0/2 passed) functions/shell ......................................... ok (2 passed) functions/sort .......................................... ok (1 passed) functions/strip ......................................... ok (2 passed) functions/substitution .................................. ok (3 passed) functions/suffix ........................................ ok (1 passed) functions/value ......................................... ok (1 passed) functions/warning ....................................... ok (4 passed) functions/wildcard ...................................... ok (4 passed) functions/word .......................................... ok (16 passed) misc/close_stdout ....................................... ok (0 passed) misc/general1 ........................................... ok (1 passed) misc/general2 ........................................... ok (1 passed) misc/general3 ........................................... ok (10 passed) misc/general4 ........................................... ok (6 passed) options/dash-B .......................................... ok (8 passed) options/dash-C .......................................... ok (2 passed) options/dash-I .......................................... ok (3 passed) options/dash-W .......................................... ok (10 passed) options/dash-e .......................................... ok (1 passed) options/dash-f .......................................... ok (4 passed) options/dash-k .......................................... ok (3 passed) options/dash-l .......................................... ok (1 passed) options/dash-n .......................................... ok (4 passed) options/dash-q .......................................... ok (8 passed) options/dash-t .......................................... ok (2 passed) options/eval ............................................ ok (2 passed) options/general ......................................... ok (1 passed) options/symlinks ........................................ N/A options/warn-undefined-variables ........................ ok (2 passed) targets/INTERMEDIATE .................................... ok (8 passed) targets/SECONDARY ....................................... ok (8 passed) targets/clean ........................................... ok (2 passed) targets/default ......................................... ok (1 passed) targets/force ........................................... ok (1 passed) targets/oneshell ........................................ N/A targets/phony ........................................... ok (1 passed) targets/posix ........................................... Error running e:/m/make-3.82/tests/../make.exe (expected 512; got 0): e:/m/make-3.82/tests/../make.exe -f work/targets/posix.mk FAILED (0/2 passed) targets/silent .......................................... ok (1 passed) variables/DEFAULT_GOAL .................................. ok (5 passed) variables/INCLUDE_DIRS .................................. ok (2 passed) variables/LIBPATTERNS ................................... ok (2 passed) variables/MAKECMDGOALS .................................. ok (3 passed) variables/MAKEFILES ..................................... ok (2 passed) variables/MAKEFLAGS ..................................... ok (2 passed) variables/MAKELEVEL ..................................... ok (1 passed) variables/MAKE_RESTARTS ................................. ok (3 passed) variables/MFILE_LIST .................................... ok (1 passed) variables/automatic ..................................... ok (7 passed) variables/curdir ........................................ ok (1 passed) variables/define ........................................ ok (15 passed) variables/flavors ....................................... ok (6 passed) variables/make .......................................... ok (1 passed) variables/negative ...................................... ok (4 passed) variables/private ....................................... ok (8 passed) variables/shell ......................................... N/A variables/special ....................................... ok (2 passed) variables/undefine ...................................... ok (4 passed) 5 Tests in 3 Categories Failed (See .diff files in work dir for details) :-( make.exe: *** [check-regression] Error 1 Making all in doc e:/m/make-3.82/make.exe -C doc -f ../Makefile VPATH=./doc make.info make.exe[1]: Entering directory `e:/m/make-3.82/doc' make.exe[1]: `make.info' is up to date. make.exe[1]: Leaving directory `e:/m/make-3.82/doc' Making check in glob e:/m/make-3.82/make.exe -C glob -f ../Makefile check-am make.exe[1]: Entering directory `e:/m/make-3.82/glob' make.exe[1]: Nothing to be done for `check-am'. make.exe[1]: Leaving directory `e:/m/make-3.82/glob' Making check in doc e:/m/make-3.82/make.exe -C doc -f ../Makefile check-am make.exe[1]: Entering directory `e:/m/make-3.82/doc' make.exe[1]: Nothing to be done for `check-am'. make.exe[1]: Leaving directory `e:/m/make-3.82/doc' If Make says Error -1, you do not have Unix-style shell installed cd tests && perl ./run_make_tests.pl -make ../make.exe ------------------------------------------------------------------------------ Running tests for GNU make on MS-DOS MEIN_COM 5 i786 GNU Make 3.82 ------------------------------------------------------------------------------ Clearing work... Finding tests... features/comments ....................................... ok (1 passed) features/conditionals ................................... ok (4 passed) features/default_names .................................. ok (2 passed) features/double_colon ................................... FAILED (5/6 passed) features/echoing ........................................ ok (4 passed) features/errors ......................................... ok (2 passed) features/escape ......................................... FAILED (3/6 passed) features/export ......................................... ok (12 passed) features/include ........................................ ok (10 passed) features/mult_rules ..................................... ok (2 passed) features/mult_targets ................................... ok (2 passed) features/order_only ..................................... ok (10 passed) features/override ....................................... ok (4 passed) features/parallelism .................................... N/A features/patspecific_vars ............................... ok (10 passed) features/patternrules ................................... FAILED (9/10 passed) features/quoting ........................................ ok (1 passed) features/recursion ...................................... ok (2 passed) features/reinvoke ....................................... ok (4 passed) features/se_explicit .................................... ok (9 passed) features/se_implicit .................................... ok (9 passed) features/se_statpat ..................................... ok (4 passed) features/statipattrules ................................. ok (8 passed) features/targetvars ..................................... ok (23 passed) features/varnesting ..................................... ok (1 passed) features/vpath .......................................... ok (2 passed) features/vpath2 ......................................... ok (1 passed) features/vpath3 ......................................... ok (1 passed) features/vpathgpath ..................................... ok (1 passed) features/vpathplus ...................................... FAILED (0/4 passed) functions/abspath ....................................... FAILED (0/1 passed) functions/addprefix ..................................... ok (1 passed) functions/addsuffix ..................................... ok (2 passed) functions/andor ......................................... ok (2 passed) functions/basename ...................................... ok (1 passed) functions/call .......................................... ok (2 passed) functions/dir ........................................... ok (1 passed) functions/error ......................................... ok (5 passed) functions/eval .......................................... ok (9 passed) functions/filter-out .................................... ok (1 passed) functions/findstring .................................... ok (1 passed) functions/flavor ........................................ ok (1 passed) functions/foreach ....................................... ok (4 passed) functions/if ............................................ ok (1 passed) functions/join .......................................... ok (1 passed) functions/notdir ........................................ ok (1 passed) functions/origin ........................................ ok (1 passed) functions/realpath ...................................... Error running e:/m/make-3.82/tests/../make.exe (expected 0; got 512): e:/m/make-3.82/tests/../make.exe -f work/functions/realpath.mk Error running e:/m/make-3.82/tests/../make.exe (expected 0; got 512): e:/m/make-3.82/tests/../make.exe -f work/functions/realpath.mk.1 FAILED (0/2 passed) functions/shell ......................................... ok (2 passed) functions/sort .......................................... ok (1 passed) functions/strip ......................................... ok (2 passed) functions/substitution .................................. ok (3 passed) functions/suffix ........................................ ok (1 passed) functions/value ......................................... ok (1 passed) functions/warning ....................................... ok (4 passed) functions/wildcard ...................................... ok (4 passed) functions/word .......................................... ok (16 passed) misc/close_stdout ....................................... ok (0 passed) misc/general1 ........................................... ok (1 passed) misc/general2 ........................................... ok (1 passed) misc/general3 ........................................... ok (10 passed) misc/general4 ........................................... FAILED (5/6 passed) options/dash-B .......................................... ok (8 passed) options/dash-C .......................................... ok (2 passed) options/dash-I .......................................... ok (3 passed) options/dash-W .......................................... ok (10 passed) options/dash-e .......................................... ok (1 passed) options/dash-f .......................................... ok (4 passed) options/dash-k .......................................... ok (3 passed) options/dash-l .......................................... FAILED (0/1 passed) options/dash-n .......................................... ok (4 passed) options/dash-q .......................................... ok (8 passed) options/dash-t .......................................... ok (2 passed) options/eval ............................................ FAILED (0/2 passed) options/general ......................................... FAILED (0/1 passed) options/symlinks ........................................ N/A options/warn-undefined-variables ........................ ok (2 passed) targets/INTERMEDIATE .................................... FAILED (6/8 passed) targets/SECONDARY ....................................... ok (8 passed) targets/clean ........................................... ok (2 passed) targets/default ......................................... ok (1 passed) targets/force ........................................... ok (1 passed) targets/oneshell ........................................ N/A targets/phony ........................................... ok (1 passed) targets/posix ........................................... Error running e:/m/make-3.82/tests/../make.exe (expected 512; got 0): e:/m/make-3.82/tests/../make.exe -f work/targets/posix.mk FAILED (0/2 passed) targets/silent .......................................... ok (1 passed) variables/DEFAULT_GOAL .................................. ok (5 passed) variables/INCLUDE_DIRS .................................. ok (2 passed) variables/LIBPATTERNS ................................... ok (2 passed) variables/MAKECMDGOALS .................................. ok (3 passed) variables/MAKEFILES ..................................... FAILED (1/2 passed) variables/MAKEFLAGS ..................................... ok (2 passed) variables/MAKELEVEL ..................................... ok (1 passed) variables/MAKE_RESTARTS ................................. ok (3 passed) variables/MFILE_LIST .................................... ok (1 passed) variables/automatic ..................................... ok (7 passed) variables/curdir ........................................ ok (1 passed) variables/define ........................................ ok (15 passed) variables/flavors ....................................... ok (6 passed) variables/make .......................................... ok (1 passed) variables/negative ...................................... FAILED (2/4 passed) variables/private ....................................... ok (8 passed) variables/shell ......................................... N/A variables/special ....................................... ok (2 passed) variables/undefine ...................................... ok (4 passed) 24 Tests in 14 Categories Failed (See .diff files in work dir for details) :-(