[bug #15947] tests/features/escape - 'path=p\:' test fails on Cygwin - cannot stat illegal filename

2006-03-10 Thread Paul D. Smith

Update of bug #15947 (project make):

  Status:None = Fixed  
 Assigned to:None = psmith 
 Open/Closed:Open = Closed 
   Fixed Release:None = CVS

___

Follow-up Comment #4:

I resolved this bug by simply changing the value of the path variable from
p:, which might be a drive letter on DOS, to pre: which never will be.

The purpose of this test is to make sure that escaping : in a target name
works properly; it has nothing to do with DOS drive letter paths.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

___
  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


[bug #15947] tests/features/escape - 'path=p\:' test fails on Cygwin - cannot stat illegal filename

2006-03-06 Thread Agent Zhang

Follow-up Comment #2, bug #15947 (project make):

On Cygwin 1.5.17-1, I can't reproduce your `escape' failure against GNU make
3.81rc1.

 make: stat: p:foo: No medium found

I was really amazed when I saw this. I don't think make should even *try* to
read the status info of `p:foo' according to the contents of
tests/scripts/features/escape.

I wonder if it's a bug in your build of Cygwin. Well, I could be wrong. :=)

 Here is the relevant section of my revised
 tests/features/escape, complete file also attached

I'm worried when I see the test suit getting messier and messier. Can't we
devise a more elegant and more portable testing framework for our GNU make?
:(

Agent


___

Reply to this item at:

  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

___
  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


[bug #15947] tests/features/escape - 'path=p\:' test fails on Cygwin - cannot stat illegal filename

2006-03-04 Thread greg keranen

Follow-up Comment #1, bug #15947 (project make):

In rethinking my proposed solution, I don't like the idea of 
simply skipping the test. Instead, I thought a better solution would be to
try it with .PHONY : $(path)foo

But, unfortunately, this gives the same error as original: 
make: stat: p:foo: No medium found

Should make really be trying to stat $(path)foo when it has been declared as
.PHONY?

Here is the relevant section of my revised tests/features/escape, complete
file also attached:
[...]
print MAKEFILE 'EOF';
$(path)foo : ; @echo cp $^ $@

foo\ bar: ; @echo 'touch $@'

sharp: foo\#bar.ext
foo\#bar.ext: ; @echo foo\#bar.ext = '$@'
# for bug #15947:
ifdef port_type
.PHONY : $(path)foo
endif
#$(warning path=$(path))
#$(warning port_type=$(port_type))
EOF
[...]
# TEST 3: This one should work, since we escape the :.

if (false){
#  2006.03.01 [EMAIL PROTECTED] - avoid test entirely? - poor 'fix' for bug
#15947:
# CAVEAT: this may also fail on other systems. May need to filter out 
other
$port_type values
if ($port_type != 'W32'  $port_type != 'DOS')
{
# TEST 3: This one should work, since we escape the :.
run_make_with_options($makefile, 'path=p\\:', get_logfile, 
0);
$answer = cp p:foo\n;
compare_output($answer,get_logfile(1));
}
} else {
# 2006.03.01 [EMAIL PROTECTED] - shouldn't this should work using .PHONY ?
# - fails to fix error of 'make: stat: p:foo: No medium found' in Cygwin
$escape_options = 'path=p\\:';

if ($port_type == 'W32' || $port_type == 'DOS')
{
# for bug #15947:
$escape_options .=  'port_type=$port_type';
} 
run_make_with_options($makefile, $escape_options, get_logfile, 0);
$answer = cp p:foo\n;
compare_output($answer,get_logfile(1));

}

--- RESULT:
[EMAIL PROTECTED] tests]$ ./run_make_tests features/escape
[...]
features/escape . FAILED (5/6
passed)

1 Test in 1 Category Failed (See .diff files in work dir for details) :-(

--- FILE: escape.diff.2:

*** work/features/escape.base.2 Wed Mar  1 12:13:52 2006
--- work/features/escape.log.2  Wed Mar  1 12:13:52 2006
***
*** 1 
--- 1,3 
+ make: stat: p:foo: No medium found
  cp p:foo
+ make: stat: p:foo: No medium found

___

Additional Item Attachment:

File name: escape Size:2 KB
attempt to run test using .PHONY : $(path)foo
http://savannah.gnu.org/bugs/download.php?item_id=15947item_file_id=3463

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

___
  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


[bug #15947] tests/features/escape - 'path=p\:' test fails on Cygwin - cannot stat illegal filename

2006-03-04 Thread greg keranen

Follow-up Comment #3, bug #15947 (project make):

Thanks Agent,
You spurred me to think again and to better understand the problem.

This bug is wrongly titled and I cannot edit the title now.

I originally thought that make was trying to stat a local file named 'p:foo'
and having a problem with ':' being an illegal character but now I realize
this is not the case.

The reason I am having the problem and you are not has nothing to do with
Cygwin, or with illegal filenames - it is because I have a P: drive mapping
on my system (a VirtualCD, in fact, with no disc inserted) and you don't.

Now I understand the message makes perfect sense:
 make: stat: p:foo: No medium found

I now realize that there is any reason to bother with special-case $port_type
clauses - what is needed, however, is a .PHONY rule.

This this should apply for ALL systems :

.PHONY : $(path)foo foo\ bar sharp foo\#bar.ext

Complete file is attached.

Unfortunately, make is still trying to stat $(path)foo and I have found no
way to fix or workaround this problem so it is still failing on Cygwin - but
there is no easy way to reproduce the failure unless your particular system
has a P: drive mapped as a removable drive.

I don't understand why make tries to stat a .PHONY : p:foo so I am creating a
separate bug.

___

Additional Item Attachment:

File name: escape Size:1 KB
modified escape script with .PHONY rule
http://savannah.gnu.org/bugs/download.php?item_id=15947item_file_id=3468

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

___
  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


[bug #15947] tests/features/escape - 'path=p\:' test fails on Cygwin - cannot stat illegal filename

2006-03-02 Thread greg keranen

URL:
  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

 Summary: tests/features/escape - 'path=p\\:' test fails on
Cygwin - cannot stat illegal filename
 Project: make
Submitted by: gkeranen
Submitted on: Wed 03/01/06 at 14:12
Severity: 3 - Normal
  Item Group: Bug
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
   Component Version: CVS
Platform Version: MS Windows
   Fixed Release: None

___

Details:

--- TEST ENVIRONMENT:
GNU Make 3.81rc1 on CYGWIN_NT-5.1 x2 1.5.19(0.150/4/2) i686

--- STEPS TO REPRODUCE
[EMAIL PROTECTED] tests]$ ./run_make_tests features/escape
--
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/escape . FAILED (5/6
passed)

1 Test in 1 Category Failed (See .diff files in work dir for details) :-(

--- FILE: work/features/escape.diff.2

*** work/features/escape.base.2 Wed Mar  1 05:59:37 2006
--- work/features/escape.log.2  Wed Mar  1 05:59:37 2006
***
*** 1 
--- 1,3 
+ make: stat: p:foo: No medium found
  cp p:foo
+ make: stat: p:foo: No medium found

--- ANALYSIS:
':' is an illegal filename character on W32 filesystem
make tries to stat the target and fails on W32

--- PROPOSED FIX:
File attached: tests/features/escape - added $port_type != 'W32'

Wrap test in test for filesystem compatibility: $port_type != 'W32'

# 2006.03.01 [EMAIL PROTECTED] - fix error of 'make: stat: p:foo: No medium 
found'
in Cygwin
# CAVEAT: this may also fail on other systems. May need to filter out other
$port_type values
if ($port_type != 'W32'  $port_type != 'DOS')
{
# TEST 3: This one should work, since we escape the :.
run_make_with_options($makefile, 'path=p\\:', get_logfile, 0);
$answer = cp p:foo\n;
compare_output($answer,get_logfile(1));
}

--- REGRESSION TEST: SUCCESSFUL
[EMAIL PROTECTED] tests]$ ./run_make_tests features/escape
[...]
features/escape . ok (5 passed)

--- CAVEAT: 
This may also fail on other systems where ':' is illegal filename char
May need to filter out other $port_type values






___

File Attachments:


---
Date: Wed 03/01/06 at 14:12  Name: escape  Size: 1.94KB   By: gkeranen
tests/features/escape - added $port_type != 'W32' amp;amp; $port_type !=
'DOS'
http://savannah.gnu.org/bugs/download.php?item_id=15947item_file_id=3460

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?func=detailitemitem_id=15947

___
  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