Re: make check under Cygwin

2013-10-05 Thread Paul Smith
On Wed, 2013-09-25 at 11:30 +0200, Denis Excoffier wrote:
 Still experimenting 'make check' with Cygwin (without the spawn-patch,
 with --disable-load):
 
 1) In test_driver.pl, line 486 (look for Test returned), a comparison
 of $code against the value -1 is performed. However, 3 lines above the 
 same test is done. This looks strange.

It's not beautiful code, but it's not wrong.  However I rewrote this
function to be more clear.

 2) In connection with (1) above, the category 'default_names' produces
 '*** Test returned 0' and this is considered to be $suite_passed = 0
 (no deletion of files, no incrementation of categories_passed etc.),
 however the category seems to pass since the ok string is printed.
 
 If i apply (1) above, all is ok.
 I don't understand why this Test returned 0 does not show up
 on other (eg Linux) platforms.

There is a bug in default_names; it's missing the final 1;.  That
means that the result of the last thing in that file will be used as the
return.  For case-sensitive filesystem versions of make that's an
unlink() which succeeds.  For case-insensitive filesystem versions of
make it's the if-statement test, which is false.

I've fixed default_names.

 3) If the HOME env var is not set, one of the jobserver tests fails.
 Perhaps this test should not be launched if HOME is not set.

I changed this test to not require $HOME.



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


RE: make check under Cygwin

2013-10-03 Thread Pavel Fedin
 Hello!

 Please take a look at the change I made, it takes care of all those
 things at a price of only 5 changed lines.

 I see. Should work, indeed. I'd say the resulting code is less optimal
(repeated conditions, strncpy() with length = 1) and a bit more difficult to
understand. But, after all, it's a matter of personal taste, so feel free to
ignore it. ;)
 One more small note. Since EMX is an environment similar to Cygwin in
purpose (according to the description), i suggest that it has the same
property and should also understand both forms of path.
 So, ok, i promise to take a look at my spawn patch on weekend. I remember
about env-variable agreement. :)

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: make check under Cygwin

2013-10-02 Thread Eli Zaretskii
 From: Pavel Fedin p.fe...@samsung.com
 Cc: bug-...@denis-excoffier.org, bug-make@gnu.org
 Date: Thu, 26 Sep 2013 10:47:15 +0400
 
  There must be a better way, since the only difference between Posix and
 Windows file
  names is the X: prefix of every absolute file name.
 
  Yes. But in certain cases (Cygwin and may be EMX) absolute file names can
 take both forms. For example:
 
 1. /foo/bar - absolute POSIX path. But NOT absolute on a pure Windows, would
 be transformed to X:/foo/bar.
 2. C:/foo/bar - absolute Windows path, nonsense for POSIX. But still
 perfectly valid on Cygwin.
 3. foo/bar - non-absolute path. Should be converted to absolute.
 
  Consequently, Cygwin version should recognize both (1) and (2) as absolute
 paths. This is why i made two branches. The idea is:
 
 #ifdef HAVE_NATIVE_DOS_PATHS
 
  ... DOS absolute path recognition. Included into DOS, Windows and Cygwin
 versions ...
 
 #endif
 #ifndef NATIVE_DOS_PATHS
 
  ... POSIX absolute path recognition. Included into UNIX and Cygwin versions
 ...
 
 #endif
 
  On Cygwin both branches should coexist, hence the original section:
 --- cut ---
   strncpy (apath, name, root_len);
   apath[root_len] = '\0';
   dest = apath + root_len;
   /* Get past the root, since we already copied it.  */
   name += root_len;
 --- cut ---
  got duplicated. It just got a bit transformed for root_len = 1 (strncpy
 turned into single assignment).
 
  Well, perhaps it's really possible to permute some parts in order to move
 final:
 --- cut ---
 dest = apath + root_len;
 name += root_len;
 --- cut ---
  out of #ifdef's... But, oops, you can screw up if (DOS absolute) ... else
 if (POSIX absolute) ... else (relative) sequence. Perhaps does not worth
 it. Actually when i made my implementation i took care about making the code
 clear to read and understand since it can be tricky.

Please take a look at the change I made, it takes care of all those
things at a price of only 5 changed lines.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


RE: make check under Cygwin (3.99.93)

2013-10-01 Thread Pavel Fedin
 Hello!

 Also, for information with the spawn-patch, the output-sync test still
 fails (like for 3.99.92, this is not unexpected), but now (with
 3.99.93)
 the GNUMAKEFLAGS test also fails.

 Thank you very much for testing. I will really try to apply my hands to it
this weekend.

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: make check under Cygwin (3.99.93)

2013-10-01 Thread Paul Smith
On Tue, 2013-10-01 at 11:04 +0200, Denis Excoffier wrote:
 Hello,
 
 Thank you for this new RC.
 
 I have tested make-3.99.93 under cygwin 32 bits with --disable-load
 (and without the spawn-patch).
 
 Several items that i had reported in
 http://lists.gnu.org/archive/html/bug-make/2013-09/msg00110.html
 (and for which i didn't get any feedback) are still there.

Yes, sorry, this one got lost.

 I'm especially asking for
 - item 1 (duplication of $code != -1) and
 - item 3 (jobserver test fails if HOME is not set)
 - and, if possible, implementation of ${abspath /foo} == /foo

I'll look at the first two.  Eli said yesterday he will look at the last
one.



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


RE: make check under Cygwin

2013-09-25 Thread Pavel Fedin
 Hello!

 I think the problem is abspath, which fails on Cygwin with DOS-style
 file names with a drive letter.  Fixing that function on Cygwin is a
 priority for this release, if possible.  The patch you suggest, OTOH,
 entirely disables support for DOS-style file names in the Cygwin build,
 which is a much worse alternative.

 Just a reminder. I have followed your suggestion and fixed this a month
ago. Please try this:
http://lists.gnu.org/archive/html/bug-make/2013-08/msg00031.html

Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia



___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: make check under Cygwin

2013-09-25 Thread Eli Zaretskii
 From: Pavel Fedin p.fe...@samsung.com
 Cc: bug-make@gnu.org
 Date: Wed, 25 Sep 2013 16:12:10 +0400
 
  Just a reminder. I have followed your suggestion and fixed this a month
 ago. Please try this:
 http://lists.gnu.org/archive/html/bug-make/2013-08/msg00031.html

I didn't forget, I just don't like the way you suggested to fix that.
Maintaining 2 separate branches for this, and a configure-time test on
top of that, is not my idea of a clean and elegant fix.  There must be
a better way, since the only difference between Posix and Windows file
names is the X: prefix of every absolute file name.

If no one steps forward, I will try to find time to fix this soon.
Stay tuned, and thanks for your contributions.

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make