URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15941>
Summary: features/default_names test creates makefiles in the wrong directory (tests); fails to cleanup Project: make Submitted by: gkeranen Submitted on: Wed 03/01/06 at 11:14 Severity: 3 - Normal Item Group: Bug Status: None Privacy: Public Assigned to: None Open/Closed: Open Component Version: CVS Platform Version: Any Fixed Release: None _______________________________________________________ Details: --- 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 [EMAIL PROTECTED] 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) :-( [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Wed 03/01/06 at 11:14 Name: default_names Size: 3.02KB By: gkeranen default_names file - fixed to handle errors correctly and cleanup <http://savannah.gnu.org/bugs/download.php?item_id=15941&item_file_id=3457> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=15941> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-make mailing list Bug-make@gnu.org http://lists.gnu.org/mailman/listinfo/bug-make