bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Refactor and merge child_execute_job() code


From: Pavel Fedin
Subject: [PATCH] Refactor and merge child_execute_job() code
Date: Thu, 30 Jan 2014 01:16:34 +0400

 Hello!  This is my long-promised refactor. After this it's much easier
to  apply  runtime  selection  between  spawn()  and fork() on Cygwin,
because  all  differences  are  now  consolidated  in  two  functions:
child_execute_process() and exec_command().
 In    some   critical   POSIX-specific   places   i   have   expanded
CLOSE_ON_EXEC()   macro   in   order to provide reliable build problem
tracking.  As  far  as  i  understand,  even  very  old  POSIX systems
implement this flag, so this should be OK. I've  done  it  in  order  to  
prevent theoretical problems with e. g.
forgotten  #include somewhere, or some problems with headers. Old code
in this case would silently define CLOSE_ON_EXEC() to empty.
 Test results:
 --- cut ---
 $ ./run_make_tests.pl -make /usr/src/make/make.exe
------------------------------------------------------------------------------
  Running tests for GNU make on CYGWIN_NT-5.1 netbook 1.7.27(0.271/5/3) i686
                               GNU Make 4.0.90
------------------------------------------------------------------------------

Clearing work...
Finding tests...

features/archives ....................................... ok     (10 passed)
features/comments ....................................... ok     (1 passed)
features/conditionals ................................... ok     (4 passed)
features/default_names .................................. ok     (2 passed)
features/double_colon ................................... ok     (11 passed)
features/echoing ........................................ ok     (4 passed)
features/errors ......................................... ok     (2 passed)
features/escape ......................................... ok     (8 passed)
features/export ......................................... ok     (12 passed)
features/include ........................................ ok     (10 passed)
features/jobserver ...................................... ok     (2 passed)
features/load ........................................... N/A
features/loadapi ........................................ N/A
features/mult_rules ..................................... ok     (2 passed)
features/mult_targets ................................... ok     (2 passed)
features/order_only ..................................... ok     (10 passed)
features/output-sync .................................... ok     (14 passed)
features/override ....................................... ok     (4 passed)
features/parallelism .................................... ok     (9 passed)
features/patspecific_vars ............................... ok     (10 passed)
features/patternrules ................................... ok     (10 passed)
features/quoting ........................................ ok     (1 passed)
features/recursion ...................................... ok     (2 passed)
features/reinvoke ....................................... ok     (5 passed)
features/rule_glob ...................................... ok     (3 passed)
features/se_explicit .................................... ok     (10 passed)
features/se_implicit .................................... ok     (11 passed)
features/se_statpat ..................................... ok     (4 passed)
features/shell_assignment ............................... ok     (4 passed)
features/statipattrules ................................. ok     (8 passed)
features/targetvars ..................................... ok     (25 passed)
features/utf8 ........................................... ok     (1 passed)
features/varnesting ..................................... ok     (2 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 ....................................... ok     (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     (3 passed)
functions/dir ........................................... ok     (1 passed)
functions/error ......................................... ok     (5 passed)
functions/eval .......................................... ok     (9 passed)
functions/file ..........................................
*** Test died (functions/file): Opened read-only file!

FAILED (2/2 passed)
functions/filter-out .................................... ok     (5 passed)
functions/findstring .................................... ok     (1 passed)
functions/flavor ........................................ ok     (1 passed)
functions/foreach ....................................... ok     (4 passed)
functions/guile ......................................... N/A
functions/if ............................................ ok     (1 passed)
functions/join .......................................... ok     (1 passed)
functions/notdir ........................................ ok     (1 passed)
functions/origin ........................................ ok     (1 passed)
functions/realpath ...................................... ok     (1 passed)
functions/shell ......................................... ok     (2 passed)
functions/sort .......................................... ok     (2 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     (6 passed)
functions/word .......................................... ok     (16 passed)
misc/bs-nl .............................................. ok     (20 passed)
misc/close_stdout ....................................... ok     (1 passed)
misc/fopen-fail ......................................... ok     (1 passed)
misc/general1 ........................................... ok     (1 passed)
misc/general2 ........................................... ok     (1 passed)
misc/general3 ........................................... ok     (10 passed)
misc/general4 ........................................... ok     (6 passed)
misc/utf8 ............................................... ok     (1 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 (no tests 
found!)
options/dash-n .......................................... ok     (6 passed)
options/dash-q .......................................... ok     (8 passed)
options/dash-t .......................................... ok     (2 passed)
options/eval ............................................ ok     (3 passed)
options/general ......................................... ok     (1 passed)
options/print-directory ................................. ok     (4 passed)
options/symlinks ........................................ N/A
options/warn-undefined-variables ........................ ok     (2 passed)
targets/DEFAULT ......................................... ok     (1 passed)
targets/FORCE ........................................... ok     (1 passed)
targets/INTERMEDIATE .................................... ok     (8 passed)
targets/ONESHELL ........................................ ok     (6 passed)
targets/PHONY ........................................... ok     (1 passed)
targets/POSIX ........................................... ok     (4 passed)
targets/SECONDARY ....................................... ok     (12 passed)
targets/SILENT .......................................... ok     (1 passed)
targets/clean ........................................... ok     (2 passed)
variables/CURDIR ........................................ ok     (1 passed)
variables/DEFAULT_GOAL .................................. ok     (5 passed)
variables/GNUMAKEFLAGS .................................. ok     (3 passed)
variables/INCLUDE_DIRS .................................. ok     (2 passed)
variables/LIBPATTERNS ................................... ok     (2 passed)
variables/MAKE .......................................... ok     (1 passed)
variables/MAKECMDGOALS .................................. ok     (3 passed)
variables/MAKEFILES ..................................... ok     (2 passed)
variables/MAKEFLAGS ..................................... ok     (3 passed)
variables/MAKELEVEL ..................................... ok     (1 passed)
variables/MAKE_RESTARTS ................................. ok     (3 passed)
variables/MFILE_LIST .................................... ok     (1 passed)
variables/SHELL ......................................... ok     (8 passed)
variables/automatic ..................................... ok     (7 passed)
variables/define ........................................ ok     (16 passed)
variables/flavors ....................................... ok     (8 passed)
variables/negative ...................................... ok     (4 passed)
variables/private ....................................... ok     (10 passed)
variables/special ....................................... ok     (2 passed)
variables/undefine ...................................... ok     (4 passed)

512 Tests in 114 Categories Complete ... No Failures :-)
--- cut ---

-- 
С уважением,
 Pavel                          mailto:address@hidden

Attachment: make-merge-child_execute_job-code.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]