Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-02-15 Thread Junio C Hamano
Torsten Bögershausen writes: > The work to "be done", what I can see: please amend the commit message: > s/more exotic// Thanks for reminding; I thought this was excised already but apparently hasn't (yet). -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a mes

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-02-14 Thread Torsten Bögershausen
On 2015-02-12 23.36, Junio C Hamano wrote: > So after discussing this one and queuing the resulting three-patch > series jk/sanity that consists of the three patches: > > * jk/sanity (2015-01-27) 3 commits > - test-lib.sh: set prerequisite SANITY by testing what we really need > - te

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-02-12 Thread Junio C Hamano
So after discussing this one and queuing the resulting three-patch series jk/sanity that consists of the three patches: * jk/sanity (2015-01-27) 3 commits - test-lib.sh: set prerequisite SANITY by testing what we really need - tests: correct misuses of POSIXPERM - t/lib-httpd: s

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-24 Thread Johannes Schindelin
On 2015-01-23 22:24, Torsten Bögershausen wrote: > [...] either to always switch off SANITY for CYGWIN (or Windows in general). Nice one! You gave me the chuckle for the day ;-) Ciao, Dscho -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vge

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-23 Thread Junio C Hamano
Torsten Bögershausen writes: > It has been tested under Mac OS, root@Mac OS, Cygwin / Msysgit > What do you think ? Except that we may want to be more careful to detect errors from the initial mkdir and clean-up part (which should abort the test, not just declare !SANITY), I think the basic idea

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-23 Thread Torsten Bögershausen
On 2015-01-22 23.07, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> If I run that sequence manually: >> chmod 755 . >> touch x >> chmod a-w . >> rm x >> touch y >> >> x is gone, (but shoudn't according to POSIX) >> y is not created, "access denied" > > Good (or is that Sad?). > >> di

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-22 Thread Torsten Bögershausen
On 2015-01-22 23.07, Junio C Hamano wrote: > Torsten Bögershausen writes: > >> If I run that sequence manually: >> chmod 755 . >> touch x >> chmod a-w . >> rm x >> touch y >> >> x is gone, (but shoudn't according to POSIX) >> y is not created, "access denied" > > Good (or is that Sad?). It feels

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-22 Thread Junio C Hamano
Torsten Bögershausen writes: > If I run that sequence manually: > chmod 755 . > touch x > chmod a-w . > rm x > touch y > > x is gone, (but shoudn't according to POSIX) > y is not created, "access denied" Good (or is that Sad?). > diff --git a/t/test-lib.sh b/t/test-lib.sh > --- a/t/test-lib.sh

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-22 Thread Torsten Bögershausen
On 2015-01-21 23.33, Junio C Hamano wrote: > Are you reporting differences between the state before these patches > and after, or just the fact that with these patches the named tests > break (which may or may not be broken before the patches)? > The intention was to report what is now breaking.

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-21 Thread Junio C Hamano
Torsten Bögershausen writes: > Hm, being one day offline and there are lots of ideas and > new patches, I like that. > I run these test under msys and cygwin on latest pu (a3dc223ff234481356c): > ... > (msys passes or skips all) > > Without digging further, these fail on my cygwin: > ... > I'm no

Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-17 Thread Torsten Bögershausen
Hm, being one day offline and there are lots of ideas and new patches, I like that. I run these test under msys and cygwin on latest pu (a3dc223ff234481356c): ./t0001-init.sh ./t0004-unwritable.sh ./t0061-run-command.sh ./t0070-fundamental.sh ./t1004-read-tree-m-u-wf.sh ./t1300-repo-config.sh ./t

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Achim Gratz
Kyle J. McKay writes: >>> "id -u" works for me in MSYS and cygwin (each appears to have it's >>> own id.exe). >> >> That's comforting. MSYS was the one I was most worried about. What UID >> do they report? I.e., do they correctly tell us if we are root (or >> more accurately, if we are not root)?

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Junio C Hamano
Junio C Hamano writes: > I think we will later make SANITY to require NOT_ROOT and POSIXPERM, > at which point many existing tests that require POSIXPERM,SANITY can > be simplified to require only SANITY, but that will be a follow-up > change to this fix. And here is such a follow-up. -- >8 --

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Kyle J. McKay
On Jan 16, 2015, at 01:16, Jeff King wrote: Subject: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT [...] We implement NOT_ROOT by checking `id -u`, which is in POSIX and seems to be available even on MSYS. Note that we cannot just call this "ROOT" and ask for "!ROOT

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Kyle J. McKay
On Jan 15, 2015, at 19:34, Jeff King wrote: On Thu, Jan 15, 2015 at 07:27:34PM -0800, Kyle J. McKay wrote: "id -u" works for me in MSYS and cygwin (each appears to have it's own id.exe). That's comforting. MSYS was the one I was most worried about. What UID do they report? I.e., do they co

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Junio C Hamano
Jeff King writes: > So here's a re-roll with `id -u`, as that may be the simplest way to get > people to test (with the patch applied, running t5550 as a normal user > should work, and as root should skip the tests). > > -- >8 -- > Subject: [PATCH] t/lib-httpd: switch

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-16 Thread Jeff King
they correctly tell us if we are root (or > more accurately, if we are not root)? So here's a re-roll with `id -u`, as that may be the simplest way to get people to test (with the patch applied, running t5550 as a normal user should work, and as root should skip the tests). -- >8 -- S

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-15 Thread Jeff King
On Thu, Jan 15, 2015 at 07:27:34PM -0800, Kyle J. McKay wrote: > >We implement NOT_ROOT by checking perl's "$>" variable, > >since we cannot rely on the "id" program being available > >everywhere (and we would rather avoid writing a custom C > >program to run geteuid if we can). > > Does it make

Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-15 Thread Kyle J. McKay
On Jan 15, 2015, at 17:32, Jeff King wrote: On Thu, Jan 15, 2015 at 04:04:24PM -0800, Junio C Hamano wrote: I wondered what 'perl -e 'print $>' would say in mingw, and if that is portable enough, though. Good thinking. I guess the best way to find out is to convince somebody from msysgit

[PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT

2015-01-15 Thread Jeff King
On Thu, Jan 15, 2015 at 04:04:24PM -0800, Junio C Hamano wrote: > I wondered what 'perl -e 'print $>' would say in mingw, and if that > is portable enough, though. Good thinking. I guess the best way to find out is to convince somebody from msysgit to try this patch. :) We may simply find that n