develooper Front page | perl.perl5.porters | Postings from September 2017

[perl #132139] 'make minitest' non-zero error code ignored

Thread Previous
From:
James E Keenan
Date:
September 20, 2017 23:33
Subject:
[perl #132139] 'make minitest' non-zero error code ignored
Message ID:
rt-4.0.24-12746-1505950412-1681.132139-75-0@perl.org
# New Ticket Created by  James E Keenan 
# Please include the string:  [perl #132139]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=132139 >


As documented in https://rt.perl.org/Ticket/Display.html?id=132138, 
't/run/switches.t' fails when run under 'miniperl', probably because it 
'require's module File::Spec.

I stumbled upon this by accident today.  Following up on a discussion on 
IRC #p5p and in https://rt.perl.org/Ticket/Display.html?id=132092, when 
testing the perl-5.27.4 tarball provided by John SJ Anderson on 
FreeBSD-11.0, instead of saying, as I normally would:

#####
$ regular_configure && make test_harness
#####

... (where 'regular_configure' is a shell script that, on FreeBSD, 
builds a threaded perl very close to the 'system perl'), I said:

#####
$ regular_configure && make minitest && make test_harness
#####

I guessed that if 'make minitest' were to FAIL, then 'make test_harness' 
would never be run and my attention would immediately be drawn to 
failing tests.

I sat watching the terminal and thought I saw a test failure during 
'make minitest'.  But it quickly became apparent that this failure -- 
subsequently confirmed as being in 't/run/switches.t' did not prevent 
'make test_harness' from starting to run.

So I then cleaned the directory, re-configured and then said 'make 
minitest'.  'make minitest' did find and report the error in 
't/run/switches.t' but its error code is ignored!  (See gzipped 
attachment for complete output as reproduced on Linux.)

#####
...
t/run/switchd .................. ok
t/run/switches ................. Can't locate File/Spec.pm in @INC (you 
may need to install the File::Spec module) (@INC contains: ../lib) at 
run/switches.t line 424.
# Looks like you planned 137 tests but ran 111.
FAILED--expected 137 tests, saw 111
t/run/switchn .................. ok
...
t/perf/taint ................... skipped
Failed 1 test out of 343, 99.71% okay.
	run/switches.t
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
###   ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
###   setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness
###   LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness
###   export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
Elapsed: 124 sec
u=1.69  s=0.24  cu=39.93  cs=1.73  scripts=343  tests=348120
makefile:824: recipe for target 'minitest' failed
make: [minitest] Error 1 (ignored)
#####

Ignoring this error code, IMO, diminishes the value of 'make minitest' 
to an author or committer trying to evaluate the correctness of a patch.

Is there a rationale for ignoring this error code?

If not, what is the recommended fix?

Thank you very much.
Jim Keenan

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About