Wed 01 Mar 2006 11:14:02 AM UTC, original submission:
--- TEST ENVIRONMENT:
GNU make on CYGWIN_NT-5.1 x2 1.5.19(0.150/4/2) i686
GNU Make 3.81rc1
--- STEPS TO REPRODUCE:
1. Create condition for default_names to fail:
Edit tests/run_make_tests.pl, as follows - omitting CYGWIN_NT from 'W32' port_type assignment:
# This is probably not specific enough.
#
if ($osname =~ /Windows/i || $osname =~ /MINGW32/i) {
$port_type = 'W32';
}
2. Run test
[greg@x2 tests]$ ./run_make_tests features/default_names
------------------------------------------------------------------------------
Running tests for GNU make on CYGWIN_NT-5.1 x2 1.5.19(0.150/4/2) i686
GNU Make 3.81rc1
------------------------------------------------------------------------------
Clearing work...
Making work dirs...
features/default_names ..................................
- Test died (features/default_names): test_driver.pl: 453: abort at test_drive
r.pl line 638.
1 Test in 1 Category Failed (See .diff files in work dir for details) :-(
[greg@x2 tests]$ ls
COPYING README run_make_tests scripts
ChangeLog makefile run_make_tests.pl test_driver.pl
NEWS mkshadow run_make_tests.pl.orig work
[greg@x2 tests]$ cat makefile
THIRD: ; @echo It chose Makefile
--- ANALYSIS:
makefile is left behind in tests directory when test dies.
toplevel cannot cleanup since test files are not in correct directory (work)
Note that default_names is unusual in its need to create 2 or 3 makefiles, AND DELETE THEM in order to perform subsequent tests in the suite - must create its own makefile and cleanup too since it doesn't (cannot?) take advantage of the preferred top level routines to coordinate all this: for example, test_driver.pl creates makefiles with &get_tmpfile() and passes filename to make with explicit -f option. Obviously, default_names cannot use this technique.
--- PROPOSED FIX:
I have re-written default_names script to handle errors correctly, and creating makefiles under work directory, using absolute path from global vars: $pwd . $pathsep . $workpath
New default_names file is attached.
--- BUG REGRESSION OUTPUT:
I have tested this on Cygwin under the original 'abort' conditions (using 3.81rc1 run_make_tests.pl, prior to applying my fix for BUG #15937) and verified that this version correctly handles the error and leaves no makefiles behind.
I have also tested under success conditions (#15937 fix applied) and it works the same as previous version of the script.
|