{"thread":{"id":"38357","subject":"t5539 broken under Mac OS X","startedAt":"2015-01-14T15:39:05Z","lastAt":"2015-02-15T23:48:32Z","messageCount":33,"participants":["Torsten Bögershausen","Junio C Hamano","Jeff King","Kyle J. McKay","Achim Gratz","Johannes Schindelin","Erik Faye-Lund"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"254655","messageId":"54B68D99.2040906@web.de","threadId":"38357","inReplyTo":null,"subject":"t5539 broken under Mac OS X","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-14T15:39:05Z","receivedAt":"2015-01-14T15:39:05Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"t5539 doesn't seem to work as expected under Mac OX X 10.6\n(10.9 is OK)\n\nI am not root.\nAre there any ideas how we can improve the situation, or how to debug ?\n\n\nt>\nt> ./t5539-fetch-http-shallow.sh ; echo $?\n\n1..0 # SKIP Cannot run httpd tests as root\n0\nt>\nt> GIT_TEST_HTTPD=t ./t5539-fetch-http-shallow.sh ; echo $?\nerror: Cannot run httpd tests as root\n1\nt>\n"},{"id":"254672","messageId":"xmqqmw5l9pje.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54B68D99.2040906@web.de","subject":"Re: t5539 broken under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-14T18:37:41Z","receivedAt":"2015-01-14T18:37:41Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> t5539 doesn't seem to work as expected under Mac OX X 10.6\n> (10.9 is OK)\n>\n> I am not root.\n> Are there any ideas how we can improve the situation, or how to debug ?\n\nAs to \"how to debug\", the first step is to grep for that message and\nnotice that it comes from here:\n\nt/lib-httpd.sh:\n\n    if ! test_have_prereq SANITY; then\n            test_skip_or_die $GIT_TEST_HTTPD \\\n                    \"Cannot run httpd tests as root\"\n    fi\n\nand then grep for SANITY to find:\n\nt/test-lib.sh:\n\n    # When the tests are run as root, permission tests will report that\n    # things are writable when they shouldn't be.\n    test -w / || test_set_prereq SANITY\n\nIt appears that the check in lib-httpd.sh thinks you lack SANITY; is\nthe root directory of your system somehow writable by you?\n\n\n>\n>\n> t>\n> t> ./t5539-fetch-http-shallow.sh ; echo $?\n>\n> 1..0 # SKIP Cannot run httpd tests as root\n> 0\n> t>\n> t> GIT_TEST_HTTPD=t ./t5539-fetch-http-shallow.sh ; echo $?\n> error: Cannot run httpd tests as root\n> 1\n> t>\n"},{"id":"254683","messageId":"54B6C897.5030405@web.de","threadId":"38357","inReplyTo":"xmqqmw5l9pje.fsf@gitster.dls.corp.google.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-14T19:50:47Z","receivedAt":"2015-01-14T19:50:47Z","isPatch":false,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-01-14 19.37, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n> \n>> t5539 doesn't seem to work as expected under Mac OX X 10.6\n>> (10.9 is OK)\n>>\n>> I am not root.\n>> Are there any ideas how we can improve the situation, or how to debug ?\n> \n> As to \"how to debug\", the first step is to grep for that message and\n> notice that it comes from here:\n> \n> t/lib-httpd.sh:\n> \n>     if ! test_have_prereq SANITY; then\n>             test_skip_or_die $GIT_TEST_HTTPD \\\n>                     \"Cannot run httpd tests as root\"\n>     fi\n> \n> and then grep for SANITY to find:\n> \n> t/test-lib.sh:\n> \n>     # When the tests are run as root, permission tests will report that\n>     # things are writable when they shouldn't be.\n>     test -w / || test_set_prereq SANITY\n> \n> It appears that the check in lib-httpd.sh thinks you lack SANITY; is\n> the root directory of your system somehow writable by you?\n> \nYes, that was a good hint, thanks.\nThe \"problem\" is that I am Admin on one machine, but not on the other,\nand / was writable for the admin group for some reasons, and only on this machine.\n\n\n\nBut, why does e.g. t0004 behave more gracefully (and skips) and t5539 just dies ?\n\n./t0004-unwritable.sh \nok 1 - setup\nok 2 # skip write-tree should notice unwritable repository (missing SANITY of POSIXPERM,SANITY)\n\n\n(And after changing the group of / t5539 passes, and so does t0004)\n"},{"id":"254698","messageId":"20150114211712.GE1155@peff.net","threadId":"38357","inReplyTo":"54B6C897.5030405@web.de","subject":"Re: t5539 broken under Mac OS X","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-14T21:17:12Z","receivedAt":"2015-01-14T21:17:12Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 14, 2015 at 08:50:47PM +0100, Torsten Bögershausen wrote:\n\n> But, why does e.g. t0004 behave more gracefully (and skips) and t5539 just dies ?\n> \n> ./t0004-unwritable.sh \n> ok 1 - setup\n> ok 2 # skip write-tree should notice unwritable repository (missing SANITY of POSIXPERM,SANITY)\n\nThe http code uses test_skip_or_die when it runs into setup errors. The\nintent there is that the user has either:\n\n  1. Told us explicitly that they want http tests by setting\n     GIT_TEST_HTTPD=true.\n\n  2. Wants to run http tests if they can by setting GIT_TEST_HTTPD=auto\n     (or leaving it unset, as that is the default).\n\nIn case (1), we treat this as a test failure. They asked for httpd\ntests, and we could not run them. In case (2), we would just skip all of\nthe tests.\n\nYou may want to loosen your GIT_TEST_HTTPD setting (pre-83d842dc, you\nhad to set it to true to run the tests at all, but nowadays we have\nauto).\n\n-Peff\n"},{"id":"254722","messageId":"064010B3-BC58-42F2-B5C0-DAADAA59B87D@gmail.com","threadId":"38357","inReplyTo":"20150114211712.GE1155@peff.net","subject":"Re: t5539 broken under Mac OS X","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2015-01-15T05:48:28Z","receivedAt":"2015-01-15T05:48:28Z","isPatch":false,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"\nOn Jan 14, 2015, at 13:17, Jeff King wrote:\n> On Wed, Jan 14, 2015 at 08:50:47PM +0100, Torsten Bögershausen wrote:\n>\n>> But, why does e.g. t0004 behave more gracefully (and skips) and  \n>> t5539 just dies ?\n>>\n>> ./t0004-unwritable.sh\n>> ok 1 - setup\n>> ok 2 # skip write-tree should notice unwritable repository (missing  \n>> SANITY of POSIXPERM,SANITY)\n>\n> The http code uses test_skip_or_die when it runs into setup errors.  \n> The\n> intent there is that the user has either:\n>\n>  1. Told us explicitly that they want http tests by setting\n>     GIT_TEST_HTTPD=true.\n>\n>  2. Wants to run http tests if they can by setting GIT_TEST_HTTPD=auto\n>     (or leaving it unset, as that is the default).\n>\n> In case (1), we treat this as a test failure. They asked for httpd\n> tests, and we could not run them. In case (2), we would just skip  \n> all of\n> the tests.\n>\n> You may want to loosen your GIT_TEST_HTTPD setting (pre-83d842dc, you\n> had to set it to true to run the tests at all, but nowadays we have\n> auto).\n\nI ran into this problem.  It seems like (at least on older Mac OS X)  \nthat the root directory is created like so:\n\n   drwxrwxr-t  39 root  admin  /\n\nAnd since the first (and likely only user) on Mac OS X is a member of  \nthe admin group, the SANITY test fails and complains even though  \nyou're not running as root (the failure message is misleading).\n\nI ended up removing group write permission from / (which happened to  \nfind a bug in another script of mine) and then it was happy.\n\n-Kyle"},{"id":"254773","messageId":"xmqqwq4n6b4c.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"064010B3-BC58-42F2-B5C0-DAADAA59B87D@gmail.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-15T20:29:39Z","receivedAt":"2015-01-15T20:29:39Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kyle J. McKay\" <mackyle@gmail.com> writes:\n\n> I ran into this problem.  It seems like (at least on older Mac OS X)  \n> that the root directory is created like so:\n>\n>    drwxrwxr-t  39 root  admin  /\n>\n> And since the first (and likely only user) on Mac OS X is a member of  \n> the admin group, the SANITY test fails and complains even though  \n> you're not running as root (the failure message is misleading).\n\nThe design choice Mac OS X makes around filesystems may deserve the\n!SANITY label ;-) but we may want to tighten the check for SANITY,\nor better yet, rethink the interaction between POSIXPERM and SANITY.\n\nWhat we want to express with SANITY is:\n\n\tOn this system, if the user who is running the test\n        does not have write permission to a file, write to such a\n        file would fail.\n\nSo running our tests as a non-root admin user should be labeled as\nbeing sane.  We just use a more expedient \"if you can write into the\nroot directory, you must be root, asit is crazy to allow non-root\nuser to 'mv /etc /foo && mkdir /etc && write /etc/passwd'\"\nheuristics which is old-school.\n\nThis should not be the final patch (I think it should become a lazy\nprereq as it does a lot more), but just for testing, how does this\nlook?\n\n t/test-lib.sh | 11 ++++++++++-\n 1 file changed, 10 insertions(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bb1402d..cdafab5 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1033,7 +1033,16 @@ test_lazy_prereq USR_BIN_TIME '\n \n # When the tests are run as root, permission tests will report that\n # things are writable when they shouldn't be.\n-test -w / || test_set_prereq SANITY\n+if test_have_prereq POSIXPERM &&\n+\t! test -w / &&\n+\t>sanitytest &&\n+\tchmod a= sanitytest &&\n+\t! (>sanitytest) 2>/dev/null &&\n+\tchmod +w sanitytest &&\n+\trm -f sanitytest\n+then\n+\ttest_set_prereq SANITY\n+fi\n \n GIT_UNZIP=${GIT_UNZIP:-unzip}\n test_lazy_prereq UNZIP '\n"},{"id":"254779","messageId":"20150115222719.GA19021@peff.net","threadId":"38357","inReplyTo":"xmqqwq4n6b4c.fsf@gitster.dls.corp.google.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T22:27:19Z","receivedAt":"2015-01-15T22:27:19Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 15, 2015 at 12:29:39PM -0800, Junio C Hamano wrote:\n\n> This should not be the final patch (I think it should become a lazy\n> prereq as it does a lot more), but just for testing, how does this\n> look?\n> \n>  t/test-lib.sh | 11 ++++++++++-\n>  1 file changed, 10 insertions(+), 1 deletion(-)\n> \n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index bb1402d..cdafab5 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -1033,7 +1033,16 @@ test_lazy_prereq USR_BIN_TIME '\n>  \n>  # When the tests are run as root, permission tests will report that\n>  # things are writable when they shouldn't be.\n> -test -w / || test_set_prereq SANITY\n> +if test_have_prereq POSIXPERM &&\n> +\t! test -w / &&\n> +\t>sanitytest &&\n> +\tchmod a= sanitytest &&\n> +\t! (>sanitytest) 2>/dev/null &&\n> +\tchmod +w sanitytest &&\n> +\trm -f sanitytest\n> +then\n> +\ttest_set_prereq SANITY\n> +fi\n\nThe current scheme does not require POSIXPERM. Would this mean that\nsome platforms no longer runs SANITY tests (e.g., Windows)?\n\nMany of the SANITY-marked tests already require both, but not all. And\ncertainly lib-httpd actually cares whether you are _truly_ root, not\nabout weird filesystem permissions. Should lib-httpd literally be\nchecking the output of `id` (though I can imagine that is anything but\nportable)?\n\n-Peff\n"},{"id":"254783","messageId":"xmqqa91j6537.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"20150115222719.GA19021@peff.net","subject":"Re: t5539 broken under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-15T22:39:56Z","receivedAt":"2015-01-15T22:39:56Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> The current scheme does not require POSIXPERM. Would this mean that\n> some platforms no longer runs SANITY tests (e.g., Windows)?\n>\n> Many of the SANITY-marked tests already require both, but not all.\n\nBefore writing that patchlet, I briefly looked at grep output and\nthought that many that are protected only by SANITY lacked POSIXPERM\nby mistake:\n\n t/t1004-read-tree-m-u-wf.sh:test_expect_success SANITY 'funny symlink in...\n t/t3600-rm.sh 'Test that \"git rm -f\" fails if its rm fails'\n t/t7300-clean.sh:test_expect_success SANITY 'removal failure' '\n t/t7300-clean.sh:test_expect_success SANITY 'git clean -d with an...\n\nAll of the above relies on a working chmod as far as I can tell, so\nthey should require POSIXPERM,SANITY, not just SANITY.\n\n> And\n> certainly lib-httpd actually cares whether you are _truly_ root, not\n> about weird filesystem permissions. Should lib-httpd literally be\n> checking the output of `id` (though I can imagine that is anything but\n> portable)?\n\nEven though t/README describes SANITY to require:\n\n  Test is not run by root user, and an attempt to write to an\n  unwritable file is expected to fail correctly.\n\nand it has been that way from day one, c91cfd19 (tests: A SANITY\ntest prereq for testing if we're root, 2010-08-06) is clear that\nthis is about \"'chmod -w' is a good way to test unwritable files\"\n\nlib-httpd should, if it cares about the root-ness, be checking that\nin a more direct way, \"test_have_prereq RUNNING_AS_ROOT\".  Making\nthe implementation of that portable is another matter, though.\n"},{"id":"254793","messageId":"20150115235752.GB25120@peff.net","threadId":"38357","inReplyTo":"xmqqa91j6537.fsf@gitster.dls.corp.google.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-15T23:57:53Z","receivedAt":"2015-01-15T23:57:53Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 15, 2015 at 02:39:56PM -0800, Junio C Hamano wrote:\n\n> Before writing that patchlet, I briefly looked at grep output and\n> thought that many that are protected only by SANITY lacked POSIXPERM\n> by mistake:\n> \n>  t/t1004-read-tree-m-u-wf.sh:test_expect_success SANITY 'funny symlink in...\n>  t/t3600-rm.sh 'Test that \"git rm -f\" fails if its rm fails'\n>  t/t7300-clean.sh:test_expect_success SANITY 'removal failure' '\n>  t/t7300-clean.sh:test_expect_success SANITY 'git clean -d with an...\n> \n> All of the above relies on a working chmod as far as I can tell, so\n> they should require POSIXPERM,SANITY, not just SANITY.\n\nYeah, skimming the grep output, I had the same feeling. But I did not\ninvestigate closely.\n\n> lib-httpd should, if it cares about the root-ness, be checking that\n> in a more direct way, \"test_have_prereq RUNNING_AS_ROOT\".  Making\n> the implementation of that portable is another matter, though.\n\nExactly. I am happy to submit a patch, but I cannot think of any\nmechanisms besides:\n\n  1. Calling `id`, which I suspect is very not portable.\n\n  2. Writing a C program to check getuid(). That's portable for most\n     Unixes. It looks like we already have a hacky wrapper on mingw that\n     will always return \"1\".\n\nIs (2) too gross?\n\n-Peff\n"},{"id":"254795","messageId":"xmqqh9vr4mlz.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"20150115235752.GB25120@peff.net","subject":"Re: t5539 broken under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-16T00:04:24Z","receivedAt":"2015-01-16T00:04:24Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> Exactly. I am happy to submit a patch, but I cannot think of any\n> mechanisms besides:\n>\n>   1. Calling `id`, which I suspect is very not portable.\n>\n>   2. Writing a C program to check getuid(). That's portable for most\n>      Unixes. It looks like we already have a hacky wrapper on mingw that\n>      will always return \"1\".\n>\n> Is (2) too gross?\n\nNot overly gross compared to some existing test-*.c files, I would\nsay.\n\nI wondered what 'perl -e 'print $>' would say in mingw, and if that\nis portable enough, though.\n"},{"id":"254801","messageId":"20150116013256.GA25894@peff.net","threadId":"38357","inReplyTo":"xmqqh9vr4mlz.fsf@gitster.dls.corp.google.com","subject":"[PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-16T01:32:56Z","receivedAt":"2015-01-16T01:32:56Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 15, 2015 at 04:04:24PM -0800, Junio C Hamano wrote:\n\n> I wondered what 'perl -e 'print $>' would say in mingw, and if that\n> is portable enough, though.\n\nGood thinking. I guess the best way to find out is to convince somebody\nfrom msysgit to try this patch. :)\n\nWe may simply find that nobody there even has apache installed on their\nbox, and they do not run the http tests at all.\n\n-- >8 --\nThe SANITY prerequisite is really about whether the\nfilesystem will respect the permissions we set, and being\nroot is only one part of that. But the httpd tests really\njust care about not being root, as they are trying to avoid\nweirdness in apache (see a1a3011 for details).\n\nLet's switch out SANITY for a new NOT_ROOT prerequisite,\nwhich will let us tweak SANITY more freely.\n\nWe implement NOT_ROOT by checking perl's \"$>\" variable,\nsince we cannot rely on the \"id\" program being available\neverywhere (and we would rather avoid writing a custom C\nprogram to run geteuid if we can).\n\nNote that we cannot just call this \"ROOT\" and ask for\n\"!ROOT\". The possible outcomes are:\n\n  1. we know we are root\n\n  2. we know we are not root\n\n  3. we could not tell, because perl was not installed or\n     barfed showing us $>\n\nWe should conservatively treat (3) as \"does not have the\nprerequisite\", which means that a naive negation would not\nwork.\n\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/lib-httpd.sh | 2 +-\n t/test-lib.sh  | 5 +++++\n 2 files changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex fd53b57..d154d1e 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -37,7 +37,7 @@ then\n \ttest_done\n fi\n \n-if ! test_have_prereq SANITY; then\n+if ! test_have_prereq NOT_ROOT; then\n \ttest_skip_or_die $GIT_TEST_HTTPD \\\n \t\t\"Cannot run httpd tests as root\"\n fi\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bb1402d..60020ca 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1040,3 +1040,8 @@ test_lazy_prereq UNZIP '\n \t\"$GIT_UNZIP\" -v\n \ttest $? -ne 127\n '\n+\n+test_lazy_prereq NOT_ROOT '\n+\tuid=$(perl -e \"print \\$<\") &&\n+\ttest \"$uid\" != 0\n+'\n-- \n2.2.1.425.g441bb3c\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254802","messageId":"BEFF558C-774D-4891-96A0-BE962F8070E7@gmail.com","threadId":"38357","inReplyTo":"20150116013256.GA25894@peff.net","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2015-01-16T03:27:34Z","receivedAt":"2015-01-16T03:27:34Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"On Jan 15, 2015, at 17:32, Jeff King wrote:\n\n> On Thu, Jan 15, 2015 at 04:04:24PM -0800, Junio C Hamano wrote:\n>\n>> I wondered what 'perl -e 'print $>' would say in mingw, and if that\n>> is portable enough, though.\n>\n> Good thinking. I guess the best way to find out is to convince  \n> somebody\n> from msysgit to try this patch. :)\n>\n> We may simply find that nobody there even has apache installed on  \n> their\n> box, and they do not run the http tests at all.\n>\n[...]\n> We implement NOT_ROOT by checking perl's \"$>\" variable,\n> since we cannot rely on the \"id\" program being available\n> everywhere (and we would rather avoid writing a custom C\n> program to run geteuid if we can).\n\nDoes it make a difference that id is POSIX [1]?\n\nSo the test \"if [ $(id -u) = 0 ]\" or similar ought to work.\n\n\"id -u\" works for me in MSYS and cygwin (each appears to have it's own  \nid.exe).\n\n> +\n> +test_lazy_prereq NOT_ROOT '\n> +\tuid=$(perl -e \"print \\$<\") &&\n> +\ttest \"$uid\" != 0\n> +'\n\nDoes NO_PERL affect this?  Or is Perl always required to run the tests.\n\nAlso \"$<\" is real user id.  Don't you want effective user id (\"$>\"),  \nthat's what the comment says...\n\nBoth \"$<\" and \"$>\" work for me in MSYS and cygwin although if I run it  \nfrom cmd.exe using strawberry perl, both \"$<\" and \"$>\" give 0.   \n(There's no id.exe for cmd.exe unless it finds the cygwin/msys one.)\n\nAs long as NO_PERL is not also intended to affect \"make test\" either  \nthe perl or id version seems fine  to me (as long as it's Perl's \"$>\")  \nsince I doubt the tests would run with just cmd.exe. :)\n\n-Kyle\n\n[1] http://pubs.opengroup.org/onlinepubs/009604499/utilities/id.html\n"},{"id":"254803","messageId":"20150116033445.GA29572@peff.net","threadId":"38357","inReplyTo":"BEFF558C-774D-4891-96A0-BE962F8070E7@gmail.com","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-16T03:34:46Z","receivedAt":"2015-01-16T03:34:46Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 15, 2015 at 07:27:34PM -0800, Kyle J. McKay wrote:\n\n> >We implement NOT_ROOT by checking perl's \"$>\" variable,\n> >since we cannot rely on the \"id\" program being available\n> >everywhere (and we would rather avoid writing a custom C\n> >program to run geteuid if we can).\n> \n> Does it make a difference that id is POSIX [1]?\n\nI don't know. Do all of the platforms where we run http tests have it\n(and conforming to POSIX-ish options or output)? It may be OK to guess\nyes and see if anybody complains (the worst case is skipping http\ntests).\n\n> \"id -u\" works for me in MSYS and cygwin (each appears to have it's own\n> id.exe).\n\nThat's comforting. MSYS was the one I was most worried about. What UID\ndo they report? I.e., do they correctly tell us if we are root (or\nmore accurately, if we are not root)?\n\n> >+test_lazy_prereq NOT_ROOT '\n> >+\tuid=$(perl -e \"print \\$<\") &&\n> >+\ttest \"$uid\" != 0\n> >+'\n> \n> Does NO_PERL affect this?  Or is Perl always required to run the tests.\n\nNo, we use a very limited subset of perl in our tests when necessary\n(basic enough that any perl5 will do), regardless of the NO_PERL\nsetting.\n\n> Also \"$<\" is real user id.  Don't you want effective user id (\"$>\"), that's\n> what the comment says...\n\nYeah, I bungled this initially and thought I fixed it, but clearly not.\n:-/\n\nI'll re-roll, but if we can get away with \"id -u\" I think that's\npreferable.\n\n-Peff\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254813","messageId":"20150116091648.GA2450@peff.net","threadId":"38357","inReplyTo":"20150116033445.GA29572@peff.net","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-01-16T09:16:49Z","receivedAt":"2015-01-16T09:16:49Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Jan 15, 2015 at 10:34:46PM -0500, Jeff King wrote:\n\n> > \"id -u\" works for me in MSYS and cygwin (each appears to have it's own\n> > id.exe).\n> \n> That's comforting. MSYS was the one I was most worried about. What UID\n> do they report? I.e., do they correctly tell us if we are root (or\n> more accurately, if we are not root)?\n\nSo here's a re-roll with `id -u`, as that may be the simplest way to get\npeople to test (with the patch applied, running t5550 as a normal user\nshould work, and as root should skip the tests).\n\n-- >8 --\nSubject: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT\n\nThe SANITY prerequisite is really about whether the\nfilesystem will respect the permissions we set, and being\nroot is only one part of that. But the httpd tests really\njust care about not being root, as they are trying to avoid\nweirdness in apache (see a1a3011 for details).\n\nLet's switch out SANITY for a new NOT_ROOT prerequisite,\nwhich will let us tweak SANITY more freely.\n\nWe implement NOT_ROOT by checking `id -u`, which is in POSIX\nand seems to be available even on MSYS.  Note that we cannot\njust call this \"ROOT\" and ask for \"!ROOT\". The possible\noutcomes are:\n\n  1. we know we are root\n\n  2. we know we are not root\n\n  3. we could not tell, because `id` was not available\n\nWe should conservatively treat (3) as \"does not have the\nprerequisite\", which means that a naive negation would not\nwork.\n\nHelped-by: Kyle J. McKay <mackyle@gmail.com>\nSigned-off-by: Jeff King <peff@peff.net>\n---\n t/lib-httpd.sh | 2 +-\n t/test-lib.sh  | 5 +++++\n 2 files changed, 6 insertions(+), 1 deletion(-)\n\ndiff --git a/t/lib-httpd.sh b/t/lib-httpd.sh\nindex fd53b57..d154d1e 100644\n--- a/t/lib-httpd.sh\n+++ b/t/lib-httpd.sh\n@@ -37,7 +37,7 @@ then\n \ttest_done\n fi\n \n-if ! test_have_prereq SANITY; then\n+if ! test_have_prereq NOT_ROOT; then\n \ttest_skip_or_die $GIT_TEST_HTTPD \\\n \t\t\"Cannot run httpd tests as root\"\n fi\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex bb1402d..be50c77 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1040,3 +1040,8 @@ test_lazy_prereq UNZIP '\n \t\"$GIT_UNZIP\" -v\n \ttest $? -ne 127\n '\n+\n+test_lazy_prereq NOT_ROOT '\n+\tuid=$(id -u) &&\n+\ttest \"$uid\" != 0\n+'\n-- \n2.2.1.425.g441bb3c\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254820","messageId":"xmqqfvba37bq.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"20150116091648.GA2450@peff.net","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-16T18:32:09Z","receivedAt":"2015-01-16T18:32:09Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> So here's a re-roll with `id -u`, as that may be the simplest way to get\n> people to test (with the patch applied, running t5550 as a normal user\n> should work, and as root should skip the tests).\n>\n> -- >8 --\n> Subject: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT\n>\n> The SANITY prerequisite is really about whether the\n> filesystem will respect the permissions we set, and being\n> root is only one part of that....\n\nI checked the use of POSIXPERM that is not tied to SANITY and found\na few questionable ones (this is orthogonal from the earlier list of\nglitches I mentioned, which is SANITY without POSIXPERM).\n\nI think we will later make SANITY to require NOT_ROOT and POSIXPERM,\nat which point many existing tests that require POSIXPERM,SANITY can\nbe simplified to require only SANITY, but that will be a follow-up\nchange to this fix.\n\n-- >8 --\nSubject: tests: correct misuses of POSIXPERM\n\nPOSIXPERM requires that a later call to stat(2) (hence \"ls -l\")\nfaithfully reproduces what an earlier chmod(2) did.  Some\nfilesystems cannot satisify this.\n\nSANITY requires that a file or a directory is indeed accessible (or\ninaccessible) when its permission bits would say it ought to be\naccessible (or inaccessible).  Running tests as root would lose this\nprerequisite for obvious reasons.\n\nFix a few tests that misuse POSIXPERM.\n\nt0061-run-command.sh has two uses of POSIXPERM.\n\n - One checks that an attempt to execute a file that is marked as\n   unexecutable results in a failure with EACCES; I do not think\n   having root-ness or any other capability that busts the\n   filesystem permission mode bits will make you run an unexecutable\n   file, so this should be left as-is.  The test does not have\n   anything to do with SANITY.\n\n - The other one expects 'git nitfol' runs the alias when an\n   alias.nitfol is defined and a directory on the PATH is marked as\n   unreadable and unsearchable.  I _think_ the test tries to reject\n   the alternative expectation that we want to refuse to run the\n   alias because it would break \"no alias may mask a command\" rule\n   if a file 'git-nitfol' exists in the unreadable directory but we\n   cannot even determine if that is the case.  Under !SANITY that\n   busts the permission bits, this test no longer checks that, so it\n   must be protected with SANITY.\n\nt1509-root-worktree.sh expects to be run on a / that is writable by\nthe user and sees if Git behaves \"sensibly\" when /.git is the\nrepository to govern a worktree that is the whole filesystem, and\nalso if Git behaves \"sensibly\" when / itself is a bare repository\nwith refs, objects, and friends (I find the definition of \"behaves\nsensibly\" under these conditions hard to fathom, but it is a\ndifferent matter).\n\nThe implementation of the test is very much problematic.\n\n - It requires POSIXPERM, but it does not do chmod or checks modes\n   in any way.\n\n - It runs \"rm /*\" and \"rm -fr /refs /objects ...\" in one of the\n   tests, and also does \"cd / && git init --bare\".  If done on a\n   live system that takes advantages of the \"feature\" being tested,\n   these obviously will clobber the system.  But there is no guard\n   against such a breakage.\n\n - It uses \"test $UID = 0\" to see rootness, which now should be\n   spelled \"! test_have_prereq NOT_ROOT\"\n\n t/t0061-run-command.sh   |  2 +-\n t/t1509-root-worktree.sh | 17 +++++++++++++----\n 2 files changed, 14 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh\nindex 17e969d..9acf628 100755\n--- a/t/t0061-run-command.sh\n+++ b/t/t0061-run-command.sh\n@@ -34,7 +34,7 @@ test_expect_success POSIXPERM 'run_command reports EACCES' '\n \tgrep \"fatal: cannot exec.*hello.sh\" err\n '\n \n-test_expect_success POSIXPERM 'unreadable directory in PATH' '\n+test_expect_success POSIXPERM,SANITY 'unreadable directory in PATH' '\n \tmkdir local-command &&\n \ttest_when_finished \"chmod u+rwx local-command && rm -fr local-command\" &&\n \tgit config alias.nitfol \"!echo frotz\" &&\ndiff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh\nindex 335420f..b6977d4 100755\n--- a/t/t1509-root-worktree.sh\n+++ b/t/t1509-root-worktree.sh\n@@ -98,8 +98,16 @@ test_foobar_foobar() {\n \t'\n }\n \n-if ! test_have_prereq POSIXPERM || ! [ -w / ]; then\n-\tskip_all=\"Dangerous test skipped. Read this test if you want to execute it\"\n+if ! test -w /\n+then\n+\tskip_all=\"Test requiring writable / skipped. Read this test if you want to run it\"\n+\ttest_done\n+fi\n+\n+if  test -e /refs || test -e /objects || test -e /info || test -e /hooks ||\n+    test -e /.git || test -e /foo || test -e /me\n+then\n+\tskip_all=\"Skip test that clobbers existing files in /\"\n \ttest_done\n fi\n \n@@ -108,8 +116,9 @@ if [ \"$IKNOWWHATIAMDOING\" != \"YES\" ]; then\n \ttest_done\n fi\n \n-if [ \"$UID\" = 0 ]; then\n-\tskip_all=\"No you can't run this with root\"\n+if ! test_have_prereq NOT_ROOT\n+then\n+\tskip_all=\"No you can't run this as root\"\n \ttest_done\n fi\n \n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254824","messageId":"1CCD6775-7A2E-4AC4-813B-6027C0D67336@gmail.com","threadId":"38357","inReplyTo":"20150116033445.GA29572@peff.net","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2015-01-16T18:38:38Z","receivedAt":"2015-01-16T18:38:38Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"On Jan 15, 2015, at 19:34, Jeff King wrote:\n\n> On Thu, Jan 15, 2015 at 07:27:34PM -0800, Kyle J. McKay wrote:\n>\n>> \"id -u\" works for me in MSYS and cygwin (each appears to have it's  \n>> own\n>> id.exe).\n>\n> That's comforting. MSYS was the one I was most worried about. What UID\n> do they report? I.e., do they correctly tell us if we are root (or\n> more accurately, if we are not root)?\n\nIt's funny, really.  The MSYS version gives a different answer than  \nthe cygwin version although both are non-zero.  The MSYS perl gives  \nthe same answer as the MSYS id and the cygwin perl gives the same  \nanswer as the cygwin id.\n\nI'm not even sure what it would mean to \"be root\" on one of those  \nsystems.\n\nThe closest I can think of would be to run as the \"SYSTEM\" user.  And  \nthat's not nearly as simple as just \"sudo -s\". [1].\n\nI haven't tested that.  I will try to remember to give that a try next  \ntime I'm feeling the need for some frustration. ;)\n\n-Kyle\n\n[1] http://cygwin.com/ml/cygwin/2010-04/msg00651.html\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254823","messageId":"E986F3A9-0FFD-4653-8B1C-67C79FFB607B@gmail.com","threadId":"38357","inReplyTo":"20150116091648.GA2450@peff.net","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2015-01-16T18:38:39Z","receivedAt":"2015-01-16T18:38:39Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"On Jan 16, 2015, at 01:16, Jeff King wrote:\n\n> Subject: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT\n[...]\n> We implement NOT_ROOT by checking `id -u`, which is in POSIX\n> and seems to be available even on MSYS.  Note that we cannot\n> just call this \"ROOT\" and ask for \"!ROOT\". The possible\n> outcomes are:\n>\n>  1. we know we are root\n>\n>  2. we know we are not root\n>\n>  3. we could not tell, because `id` was not available\n>\n> We should conservatively treat (3) as \"does not have the\n> prerequisite\", which means that a naive negation would not\n> work.\n[...]\n> +\n> +test_lazy_prereq NOT_ROOT '\n> +\tuid=$(id -u) &&\n> +\ttest \"$uid\" != 0\n> +'\n\nThat looks good to me and worked as expected when I tried it.\n\n-Kyle\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254826","messageId":"xmqqzj9i1rci.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"xmqqfvba37bq.fsf@gitster.dls.corp.google.com","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-16T19:02:37Z","receivedAt":"2015-01-16T19:02:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> I think we will later make SANITY to require NOT_ROOT and POSIXPERM,\n> at which point many existing tests that require POSIXPERM,SANITY can\n> be simplified to require only SANITY, but that will be a follow-up\n> change to this fix.\n\nAnd here is such a follow-up.\n\n-- >8 --\nSubject: [PATCH] tests: SANITY requires POSIXPERM\n\nSANITY requires that a file or a directory is indeed accessible (or\ninaccessible) when its permission bits would say it ought to be\naccessible (or inaccessible).  Running tests as root would lose this\nprerequisite for obvious reasons, and a test that requires SANITY\nimplies it needs POSIXPERM working.\n\nRedefine SANITY in terms of POSIXPERM and NOT_ROOT and simplify\ntests that require both to only require SANITY.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t0001-init.sh          |  2 +-\n t/t0004-unwritable.sh    |  8 ++++----\n t/t0061-run-command.sh   |  2 +-\n t/t0070-fundamental.sh   |  2 +-\n t/t3700-add.sh           | 10 +++++-----\n t/t4056-diff-order.sh    |  2 +-\n t/t5537-fetch-shallow.sh |  2 +-\n t/t7508-status.sh        |  2 +-\n t/test-lib.sh            |  4 +++-\n 9 files changed, 18 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t0001-init.sh b/t/t0001-init.sh\nindex e62c0ff..4aa8660 100755\n--- a/t/t0001-init.sh\n+++ b/t/t0001-init.sh\n@@ -261,7 +261,7 @@ test_expect_success 'init notices EEXIST (2)' '\n \ttest_path_is_file newdir/a\n '\n \n-test_expect_success POSIXPERM,SANITY 'init notices EPERM' '\n+test_expect_success SANITY 'init notices EPERM' '\n \trm -fr newdir &&\n \tmkdir newdir &&\n \tchmod -w newdir &&\ndiff --git a/t/t0004-unwritable.sh b/t/t0004-unwritable.sh\nindex e3137d6..d5729d4 100755\n--- a/t/t0004-unwritable.sh\n+++ b/t/t0004-unwritable.sh\n@@ -15,26 +15,26 @@ test_expect_success setup '\n \n '\n \n-test_expect_success POSIXPERM,SANITY 'write-tree should notice unwritable repository' '\n+test_expect_success SANITY 'write-tree should notice unwritable repository' '\n \ttest_when_finished \"chmod 775 .git/objects .git/objects/??\" &&\n \tchmod a-w .git/objects .git/objects/?? &&\n \ttest_must_fail git write-tree\n '\n \n-test_expect_success POSIXPERM,SANITY 'commit should notice unwritable repository' '\n+test_expect_success SANITY 'commit should notice unwritable repository' '\n \ttest_when_finished \"chmod 775 .git/objects .git/objects/??\" &&\n \tchmod a-w .git/objects .git/objects/?? &&\n \ttest_must_fail git commit -m second\n '\n \n-test_expect_success POSIXPERM,SANITY 'update-index should notice unwritable repository' '\n+test_expect_success SANITY 'update-index should notice unwritable repository' '\n \ttest_when_finished \"chmod 775 .git/objects .git/objects/??\" &&\n \techo 6O >file &&\n \tchmod a-w .git/objects .git/objects/?? &&\n \ttest_must_fail git update-index file\n '\n \n-test_expect_success POSIXPERM,SANITY 'add should notice unwritable repository' '\n+test_expect_success SANITY 'add should notice unwritable repository' '\n \ttest_when_finished \"chmod 775 .git/objects .git/objects/??\" &&\n \techo b >file &&\n \tchmod a-w .git/objects .git/objects/?? &&\ndiff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh\nindex 9acf628..52722ee 100755\n--- a/t/t0061-run-command.sh\n+++ b/t/t0061-run-command.sh\n@@ -34,7 +34,7 @@ test_expect_success POSIXPERM 'run_command reports EACCES' '\n \tgrep \"fatal: cannot exec.*hello.sh\" err\n '\n \n-test_expect_success POSIXPERM,SANITY 'unreadable directory in PATH' '\n+test_expect_success SANITY 'unreadable directory in PATH' '\n \tmkdir local-command &&\n \ttest_when_finished \"chmod u+rwx local-command && rm -fr local-command\" &&\n \tgit config alias.nitfol \"!echo frotz\" &&\ndiff --git a/t/t0070-fundamental.sh b/t/t0070-fundamental.sh\nindex 5ed69a6..ccd88e2 100755\n--- a/t/t0070-fundamental.sh\n+++ b/t/t0070-fundamental.sh\n@@ -17,7 +17,7 @@ test_expect_success 'mktemp to nonexistent directory prints filename' '\n \tgrep \"doesnotexist/test\" err\n '\n \n-test_expect_success POSIXPERM,SANITY 'mktemp to unwritable directory prints filename' '\n+test_expect_success SANITY 'mktemp to unwritable directory prints filename' '\n \tmkdir cannotwrite &&\n \tchmod -w cannotwrite &&\n \ttest_when_finished \"chmod +w cannotwrite\" &&\ndiff --git a/t/t3700-add.sh b/t/t3700-add.sh\nindex fe274e2..2bc2bcc 100755\n--- a/t/t3700-add.sh\n+++ b/t/t3700-add.sh\n@@ -191,7 +191,7 @@ test_expect_success 'git add --refresh with pathspec' '\n \tgrep baz actual\n '\n \n-test_expect_success POSIXPERM,SANITY 'git add should fail atomically upon an unreadable file' '\n+test_expect_success SANITY 'git add should fail atomically upon an unreadable file' '\n \tgit reset --hard &&\n \tdate >foo1 &&\n \tdate >foo2 &&\n@@ -202,7 +202,7 @@ test_expect_success POSIXPERM,SANITY 'git add should fail atomically upon an unr\n \n rm -f foo2\n \n-test_expect_success POSIXPERM,SANITY 'git add --ignore-errors' '\n+test_expect_success SANITY 'git add --ignore-errors' '\n \tgit reset --hard &&\n \tdate >foo1 &&\n \tdate >foo2 &&\n@@ -213,7 +213,7 @@ test_expect_success POSIXPERM,SANITY 'git add --ignore-errors' '\n \n rm -f foo2\n \n-test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors)' '\n+test_expect_success SANITY 'git add (add.ignore-errors)' '\n \tgit config add.ignore-errors 1 &&\n \tgit reset --hard &&\n \tdate >foo1 &&\n@@ -224,7 +224,7 @@ test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors)' '\n '\n rm -f foo2\n \n-test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors = false)' '\n+test_expect_success SANITY 'git add (add.ignore-errors = false)' '\n \tgit config add.ignore-errors 0 &&\n \tgit reset --hard &&\n \tdate >foo1 &&\n@@ -235,7 +235,7 @@ test_expect_success POSIXPERM,SANITY 'git add (add.ignore-errors = false)' '\n '\n rm -f foo2\n \n-test_expect_success POSIXPERM,SANITY '--no-ignore-errors overrides config' '\n+test_expect_success SANITY '--no-ignore-errors overrides config' '\n        git config add.ignore-errors 1 &&\n        git reset --hard &&\n        date >foo1 &&\ndiff --git a/t/t4056-diff-order.sh b/t/t4056-diff-order.sh\nindex c0460bb..b7abfb2 100755\n--- a/t/t4056-diff-order.sh\n+++ b/t/t4056-diff-order.sh\n@@ -62,7 +62,7 @@ test_expect_success 'missing orderfile' '\n \ttest_must_fail git diff -Obogus_file --name-only HEAD^..HEAD\n '\n \n-test_expect_success POSIXPERM,SANITY 'unreadable orderfile' '\n+test_expect_success SANITY 'unreadable orderfile' '\n \t>unreadable_file &&\n \tchmod -r unreadable_file &&\n \ttest_must_fail git diff -Ounreadable_file --name-only HEAD^..HEAD\ndiff --git a/t/t5537-fetch-shallow.sh b/t/t5537-fetch-shallow.sh\nindex a980574..56bead1 100755\n--- a/t/t5537-fetch-shallow.sh\n+++ b/t/t5537-fetch-shallow.sh\n@@ -173,7 +173,7 @@ EOF\n \t)\n '\n \n-test_expect_success POSIXPERM,SANITY 'shallow fetch from a read-only repo' '\n+test_expect_success SANITY 'shallow fetch from a read-only repo' '\n \tcp -R .git read-only.git &&\n \tfind read-only.git -print | xargs chmod -w &&\n \ttest_when_finished \"find read-only.git -type d -print | xargs chmod +w\" &&\ndiff --git a/t/t7508-status.sh b/t/t7508-status.sh\nindex 8ed5788..6037415 100755\n--- a/t/t7508-status.sh\n+++ b/t/t7508-status.sh\n@@ -1035,7 +1035,7 @@ EOF\n \ttest_i18ncmp expect output\n '\n \n-test_expect_success POSIXPERM,SANITY 'status succeeds in a read-only repository' '\n+test_expect_success SANITY 'status succeeds in a read-only repository' '\n \t(\n \t\tchmod a-w .git &&\n \t\t# make dir1/tracked stat-dirty\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex b2b2ec7..37d1b0e 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -999,7 +999,9 @@ test_lazy_prereq NOT_ROOT '\n \n # When the tests are run as root, permission tests will report that\n # things are writable when they shouldn't be.\n-test -w / || test_set_prereq SANITY\n+test_lazy_prereq SANITY '\n+\ttest_have_prereq POSIXPERM,NOT_ROOT\n+'\n \n GIT_UNZIP=${GIT_UNZIP:-unzip}\n test_lazy_prereq UNZIP '\n-- \n2.3.0-rc0-149-g0286818\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254838","messageId":"87fvbasd92.fsf@Rainer.invalid","threadId":"38357","inReplyTo":"1CCD6775-7A2E-4AC4-813B-6027C0D67336@gmail.com","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Achim Gratz","fromEmail":"stromeko@nexgo.de","sentAt":"2015-01-16T20:04:57Z","receivedAt":"2015-01-16T20:04:57Z","isPatch":true,"sender":{"key":"stromeko@nexgo.de","avatar":null},"body":"Kyle J. McKay writes:\n>>> \"id -u\" works for me in MSYS and cygwin (each appears to have it's\n>>> own id.exe).\n>>\n>> That's comforting. MSYS was the one I was most worried about. What UID\n>> do they report? I.e., do they correctly tell us if we are root (or\n>> more accurately, if we are not root)?\n\nChecking for UID 0 won't work on Cygwin in the general case.  That fools\nliterally dozens of Perl module tests that find out the user can\nactually do something they think (s)he should be unable to.\n\n> It's funny, really.  The MSYS version gives a different answer than\n> the cygwin version although both are non-zero.  The MSYS perl gives\n> the same answer as the MSYS id and the cygwin perl gives the same\n> answer as the cygwin id.\n\nThat result changes depending on the content /etc/passwd (which arguably\nis a either a bug or a feature depending on which way you look at it).\nBut Windows itself doesn't have the notion of a root user at all, so\nlooking for one isn't going to be helpful.\n\n> I'm not even sure what it would mean to \"be root\" on one of those\n> systems.\n\nIt means you have the capabilities that a root user would be expected to\nhave.  For most intents and purposes on Windows this would mean the user\nrunning the command is in group 544 (\"Administrators\" in an english\nversion of Windows).\n\n> The closest I can think of would be to run as the \"SYSTEM\" user.  And\n> that's not nearly as simple as just \"sudo -s\". [1].\n\nThe SYSTEM user isn't a good approximation of root under UN*X for\nreasonably modern Windows versions.\n\nhttp://support.microsoft.com/kb/120929\n\nFor more discussion on the UID 0 topic from a Cygwin perspective, see\n\nhttp://thread.gmane.org/gmane.os.cygwin.applications/28129\nhttp://thread.gmane.org/gmane.os.cygwin.applications/28203\n\n\nRegards,\nAchim.\n-- \n+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+\n\nSD adaptation for Waldorf microQ V2.22R2:\nhttp://Synth.Stromeko.net/Downloads.html#WaldorfSDada\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"254859","messageId":"54BAF1C2.60103@web.de","threadId":"38357","inReplyTo":"xmqqzj9i1rci.fsf@gitster.dls.corp.google.com","subject":"Re: Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-17T23:35:30Z","receivedAt":"2015-01-17T23:35:30Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"Hm, being one day offline and there are lots of ideas and\nnew patches, I like that.\nI run these test under msys and cygwin on latest pu (a3dc223ff234481356c):\n\n\n./t0001-init.sh\n./t0004-unwritable.sh\n./t0061-run-command.sh\n./t0070-fundamental.sh\n./t1004-read-tree-m-u-wf.sh\n./t1300-repo-config.sh\n./t1301-shared-repo.sh\n./t1308-config-set.sh\n./t2026-prune-linked-checkouts.sh\n./t3600-rm.sh\n./t3700-add.sh\n./t4039-diff-assume-unchanged.sh\n./t4056-diff-order.sh\n./t5537-fetch-shallow.sh\n./t7300-clean.sh\n./t7503-pre-commit-hook.sh\n./t7504-commit-msg-hook.sh\n./t7508-status.sh\n\n(msys passes or skips all)\n\nWithout digging further, these fail on my cygwin:\n\n$ grep \"not ok\" p.txt\nnot ok 29 - init notices EPERM\nnot ok 2 - write-tree should notice unwritable repository\nnot ok 3 - commit should notice unwritable repository\nnot ok 4 - update-index should notice unwritable repository\nnot ok 5 - add should notice unwritable repository\nnot ok 3 - mktemp to unwritable directory prints filename\nnot ok 13 - funny symlink in work tree, un-unlink-able\nnot ok 23 - proper error on non-accessible files\nnot ok 4 - prune directories with unreadable gitdir\nnot ok 15 - Test that \"git rm -f\" fails if its rm fails\nnot ok 16 - When the rm in \"git rm -f\" fails, it should not remove the file from the index\nnot ok 20 - Re-add foo and baz\nnot ok 21 - Modify foo -- rm should refuse\nnot ok 22 - Modified foo -- rm -f should work\nnot ok 23 - Re-add foo and baz for HEAD tests\nnot ok 24 - foo is different in index from HEAD -- rm should refuse\nnot ok 23 - git add should fail atomically upon an unreadable file\nnot ok 24 - git add --ignore-errors\nnot ok 25 - git add (add.ignore-errors)\nnot ok 26 - git add (add.ignore-errors = false)\nnot ok 27 - --no-ignore-errors overrides config\nnot ok 4 - unreadable orderfile\nnot ok 28 - removal failure\nnot ok 61 - status succeeds in a read-only repository\n\nIf we remove POSIXPERM from CYGWIN, all tests pass ;-)\nbut some are skipped :\n< ok 26 - init creates a new deep directory (umask vs. shared)\n< ok 3 - run_command reports EACCES\n< ok 4 - unreadable directory in PATH\n< ok 113 - preserves existing permissions\n< ok 2 - shared=1 does not clear bits preset by umask 002\n< ok 3 - shared=1 does not clear bits preset by umask 022\n< ok 5 - update-server-info honors core.sharedRepository\n< ok 6 - shared = 0660 (r--r-----) ro\n< ok 7 - shared = 0660 (rw-rw----) rw\n< ok 8 - shared = 0640 (r--r-----) ro\n< ok 9 - shared = 0640 (rw-r-----) rw\n< ok 10 - shared = 0600 (r--------) ro\n< ok 11 - shared = 0600 (rw-------) rw\n< ok 12 - shared = 0666 (r--r--r--) ro\n< ok 13 - shared = 0666 (rw-rw-rw-) rw\n< ok 14 - shared = 0664 (r--r--r--) ro\n< ok 15 - shared = 0664 (rw-rw-r--) rw\n< ok 16 - info/refs respects umask in unshared repo\n< ok 17 - git reflog expire honors core.sharedRepository\n< ok 18 - forced modes\n< ok 4 - find-copies-harder is not confused by mode bits\n< ok 10 - shallow fetch from a read-only repo\n< ok 32 - git clean -d with an unreadable empty directory\n< ok 7 - with non-executable hook\n< ok 8 - --no-verify with non-executable hook\n< ok 13 - with non-executable hook\n< ok 14 - with non-executable hook (editor)\n< ok 15 - --no-verify with non-executable hook\n< ok 16 - --no-verify with non-executable hook (editor)\n\nI'm not sure what is the best way forward, it seems as if CYGIN is \"half POSIX\" now.\n\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255036","messageId":"xmqq61bzwyqp.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54BAF1C2.60103@web.de","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-21T22:33:02Z","receivedAt":"2015-01-21T22:33:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> Hm, being one day offline and there are lots of ideas and\n> new patches, I like that.\n> I run these test under msys and cygwin on latest pu (a3dc223ff234481356c):\n> ...\n> (msys passes or skips all)\n>\n> Without digging further, these fail on my cygwin:\n> ...\n> I'm not sure what is the best way forward, it seems as if CYGIN is \"half POSIX\" now.\n\nAre you reporting differences between the state before these patches\nand after, or just the fact that with these patches the named tests\nbreak (which may or may not be broken before the patches)?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255136","messageId":"54C170E9.4010401@web.de","threadId":"38357","inReplyTo":"xmqq61bzwyqp.fsf@gitster.dls.corp.google.com","subject":"Re: Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-22T21:51:37Z","receivedAt":"2015-01-22T21:51:37Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-01-21 23.33, Junio C Hamano wrote:\n > Are you reporting differences between the state before these patches\n> and after, or just the fact that with these patches the named tests\n> break (which may or may not be broken before the patches)?\n> \nThe intention was to report what is now breaking.\nOne example is this one:\n---------------------\ngit.git/master:\nok 15 # skip Test that \"git rm -f\" fails if its rm fails (missing SANITY)\n\ngit.git/pu:\nnot ok 15 - Test that \"git rm -f\" fails if its rm fails\n#    \n#        chmod a-w . &&\n#        test_must_fail git rm -f baz &&\n#        chmod 775 .\n#     \n\nThe next step could be to dig further:\n\nIf I run that sequence manually:\nchmod 755 .\ntouch x\nchmod a-w .\nrm x\ntouch y\n\nx is gone, (but shoudn't according to POSIX)\ny is not created, \"access denied\"\n\n--------------\nI can see that there are 3 groups of OS/FS combinations:\nGroup 1:\n  File access bits are not maintained, and not obeyed.\n  Typical: VFAT, Git for Windows, (and some network protocols like SAMBA,\n\t           depending on the OS/FS involved and/or the mount options)\n  Typically core.filemode is false after \"git init\"\n\nGroup 2:\n  File access bits are maintained and obeyed:\n  POSIX/Unix/Linux/Mac OS and CYGWIN\n  Typically core.filemode is true after \"git init\"\n\nGroup 3 :\n  File access bits are maintained, but not (fully) obeyed\n  running as root under Linux/Unix...\n  Or Windows, when a file is allowed to be deleted from a directory without write permissions.\n\n-----------------\nIn short, the following seems to be an improvement:\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1039,7 +1039,17 @@ test_lazy_prereq NOT_ROOT '\n # When the tests are run as root, permission tests will report that\n # things are writable when they shouldn't be.\n test_lazy_prereq SANITY '\n-       test_have_prereq POSIXPERM,NOT_ROOT\n+       mkdir ds &&\n+       touch ds/x &&\n+       chmod -w ds &&\n+       if rm ds/x\n+       then\n+               chmod +w ds\n+               false\n+       else\n+               chmod +w ds\n+               true\n+       fi\n '\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255139","messageId":"xmqqlhkusc4h.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54C170E9.4010401@web.de","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-22T22:07:26Z","receivedAt":"2015-01-22T22:07:26Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> If I run that sequence manually:\n> chmod 755 .\n> touch x\n> chmod a-w .\n> rm x\n> touch y\n>\n> x is gone, (but shoudn't according to POSIX)\n> y is not created, \"access denied\"\n\nGood (or is that Sad?).\n\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -1039,7 +1039,17 @@ test_lazy_prereq NOT_ROOT '\n>  # When the tests are run as root, permission tests will report that\n>  # things are writable when they shouldn't be.\n>  test_lazy_prereq SANITY '\n> -       test_have_prereq POSIXPERM,NOT_ROOT\n> +       mkdir ds &&\n> +       touch ds/x &&\n> +       chmod -w ds &&\n> +       if rm ds/x\n> +       then\n> +               chmod +w ds\n> +               false\n> +       else\n> +               chmod +w ds\n> +               true\n> +       fi\n>  '\n\nIt looks like a better approach overall.\n\nBecause we cannot know where $(pwd) is when lazy prereq is evaluated\n(it typically is at the root of the trash hierarchy, but not always)\nand we would not want to add, leave or remove random files in the\nworking tree that are not expected by the tests proper (e.g. a test\nthat counts untracked paths are not expecting ds/ to be there), your\nactual \"fix\" may need to be a bit more careful, though.\n\nThanks.\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255163","messageId":"54C1E395.30003@web.de","threadId":"38357","inReplyTo":"xmqqlhkusc4h.fsf@gitster.dls.corp.google.com","subject":"Re: Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-23T06:00:53Z","receivedAt":"2015-01-23T06:00:53Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-01-22 23.07, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n> \n>> If I run that sequence manually:\n>> chmod 755 .\n>> touch x\n>> chmod a-w .\n>> rm x\n>> touch y\n>>\n>> x is gone, (but shoudn't according to POSIX)\n>> y is not created, \"access denied\"\n> \n> Good (or is that Sad?).\nIt feels that this is by design:\nIn old days under MS/DOS the only way to hinder people\nfrom deleting a file was to make it \"read only\" with help\nof the ATTRIB command.\nhttps://en.wikipedia.org/wiki/ATTRIB\n\nLater NTFS introduced the (ACL like) secutity information,\nand (unless I am completely wrong) the \"delete file\" is part\nof the \"modify\" permission, not write.\n> \n>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>> --- a/t/test-lib.sh\n>> +++ b/t/test-lib.sh\n>> @@ -1039,7 +1039,17 @@ test_lazy_prereq NOT_ROOT '\n>>  # When the tests are run as root, permission tests will report that\n>>  # things are writable when they shouldn't be.\n>>  test_lazy_prereq SANITY '\n>> -       test_have_prereq POSIXPERM,NOT_ROOT\n>> +       mkdir ds &&\n>> +       touch ds/x &&\n>> +       chmod -w ds &&\n>> +       if rm ds/x\n>> +       then\n>> +               chmod +w ds\n>> +               false\n>> +       else\n>> +               chmod +w ds\n>> +               true\n>> +       fi\n>>  '\n> \n> It looks like a better approach overall.\n> \n> Because we cannot know where $(pwd) is when lazy prereq is evaluated\n> (it typically is at the root of the trash hierarchy, but not always)\n> and we would not want to add, leave or remove random files in the\n> working tree that are not expected by the tests proper (e.g. a test\n> that counts untracked paths are not expecting ds/ to be there), your\n> actual \"fix\" may need to be a bit more careful, though.\n> \n> Thanks.\n> \nSo true, what is a better place or way to run the test ?\nCan we use /tmp  (Which may be a different file system)?\nOr can we use $HOME/$$ds (Which is an artificial HOME)\n\nWe already \"pollute\" the $PWD here\ntest_lazy_prereq CASE_INSENSITIVE_FS '\n  \techo good >CamelCase &&\n\techo bad >camelcase &&\n\ttest \"$(cat CamelCase)\" != good\n'\nand here:\ntest_lazy_prereq UTF8_NFD_TO_NFC '\n....\n\nWould \nmkdir $HOME/ds\nbe a better approach then ?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255224","messageId":"54C2BC01.2030307@web.de","threadId":"38357","inReplyTo":"xmqqlhkusc4h.fsf@gitster.dls.corp.google.com","subject":"Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-01-23T21:24:17Z","receivedAt":"2015-01-23T21:24:17Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-01-22 23.07, Junio C Hamano wrote:\n> Torsten Bögershausen <tboegi@web.de> writes:\n> \n>> If I run that sequence manually:\n>> chmod 755 .\n>> touch x\n>> chmod a-w .\n>> rm x\n>> touch y\n>>\n>> x is gone, (but shoudn't according to POSIX)\n>> y is not created, \"access denied\"\n> \n> Good (or is that Sad?).\n> \n>> diff --git a/t/test-lib.sh b/t/test-lib.sh\n>> --- a/t/test-lib.sh\n>> +++ b/t/test-lib.sh\n>> @@ -1039,7 +1039,17 @@ test_lazy_prereq NOT_ROOT '\n>>  # When the tests are run as root, permission tests will report that\n>>  # things are writable when they shouldn't be.\n>>  test_lazy_prereq SANITY '\n>> -       test_have_prereq POSIXPERM,NOT_ROOT\n>> +       mkdir ds &&\n>> +       touch ds/x &&\n>> +       chmod -w ds &&\n>> +       if rm ds/x\n>> +       then\n>> +               chmod +w ds\n>> +               false\n>> +       else\n>> +               chmod +w ds\n>> +               true\n>> +       fi\n>>  '\n> \n> It looks like a better approach overall.\n> \n> Because we cannot know where $(pwd) is when lazy prereq is evaluated\n> (it typically is at the root of the trash hierarchy, but not always)\n> and we would not want to add, leave or remove random files in the\n> working tree that are not expected by the tests proper (e.g. a test\n> that counts untracked paths are not expecting ds/ to be there), your\n> actual \"fix\" may need to be a bit more careful, though.\n> \n> Thanks.\n> \n\nHm,\nI think there are 2 different possiblities to go further,\neither to always switch off SANITY for CYGWIN (or Windows in general).\nI haven't tested anything, the idea came up while writing this email.\n\nThe other way is to go away from the hard coded \"we know we are root,\nso SANITY must be false, or we know that Windows is not 100% POSIX\",\nand probe the OS/FS dynamically.\n\nThe following probably deserves the price for the most clumsy prerequisite\never written.\n(Copy&Paste of a real patch into the mailer, not sure if it applies)\n\nIt has been tested under Mac OS, root@Mac OS, Cygwin / Msysgit\nWhat do you think ?\n\n\n\n-- >8 --\nSubject: [PATCH 1/2] test-lib.sh: Improve SANITY\n\nSANITY was not set when running as root,\nbut this is not 100% reliable for CYGWIN:\n\nA file is allowed to be deleted when the containing\ndirectory does not have write permissions.\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/test-lib.sh | 20 +++++++++++++++++++-\n 1 file changed, 19 insertions(+), 1 deletion(-)\n\ndiff --git a/t/test-lib.sh b/t/test-lib.sh\nindex 93f7cad..b8f736f 100644\n--- a/t/test-lib.sh\n+++ b/t/test-lib.sh\n@@ -1038,8 +1038,26 @@ test_lazy_prereq NOT_ROOT '\n \n # When the tests are run as root, permission tests will report that\n # things are writable when they shouldn't be.\n+# Special check for CYGWIN (or Windows in general):\n+# A file can be deleted, even if the containing directory does'nt\n+# have write permissions\n test_lazy_prereq SANITY '\n-\ttest_have_prereq POSIXPERM,NOT_ROOT\n+\tdsdir=$$ds\n+\tmkdir $dsdir &&\n+\ttouch $dsdir/x &&\n+\tchmod -w $dsdir &&\n+\tif rm $dsdir/x\n+\tthen\n+\t\tchmod +w $dsdir\n+\t\trm -rf $dsdir\n+\t\techo >&2 SANITY=false\n+\t\tfalse\n+\telse\n+\t\tchmod +w $dsdir\n+\t\trm -rf $dsdir\n+\t\techo >&2 SANITY=true\n+\t\ttrue\n+\tfi\n '\n \n GIT_UNZIP=${GIT_UNZIP:-unzip}\n-- \n\n\nSubject: [PATCH 2/2] t2026 needs SANITY\n\nWhen running as root 'prune directories with unreadable gitdir' in t2026 fails.\nProtect this TC with SANITY\n\nSigned-off-by: Torsten Bögershausen <tboegi@web.de>\n---\n t/t2026-prune-linked-checkouts.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/t2026-prune-linked-checkouts.sh b/t/t2026-prune-linked-checkouts.sh\nindex 170aefe..2936d52 100755\n--- a/t/t2026-prune-linked-checkouts.sh\n+++ b/t/t2026-prune-linked-checkouts.sh\n@@ -33,7 +33,7 @@ EOF\n \t! test -d .git/worktrees\n '\n \n-test_expect_success POSIXPERM 'prune directories with unreadable gitdir' '\n+test_expect_success SANITY 'prune directories with unreadable gitdir' '\n \tmkdir -p .git/worktrees/def/abc &&\n \t: >.git/worktrees/def/def &&\n \t: >.git/worktrees/def/gitdir &&\n"},{"id":"255236","messageId":"xmqqh9vhp0cq.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54C2BC01.2030307@web.de","subject":"Re: Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-23T23:02:13Z","receivedAt":"2015-01-23T23:02:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> It has been tested under Mac OS, root@Mac OS, Cygwin / Msysgit\n> What do you think ?\n\nExcept that we may want to be more careful to detect errors from the\ninitial mkdir and clean-up part (which should abort the test, not\njust declare !SANITY), I think the basic idea is sound.\n\n\ttest_dir=$TRASH_DIRECTORY/.sanity-test-dir\n        ! mkdir \"$test_dir\" &&\n        >\"$test_dir/x\" &&\n        chmod -w \"$test_dir\" ||\n\terror \"bug in test sript: cannot prepare .sanity-test-dir\"\n\n        rm \"$test_dir/x\"\n        status=$?\n\n        chmod +w \"$test_dir\" &&\n        rm -r \"$test_dir\" ||\n\terror \"bug in test sript: cannot clean .sanity-test-dir\"\n\n\treturn $status\n\nor something along that line?\n\n>\n> -- >8 --\n> Subject: [PATCH 1/2] test-lib.sh: Improve SANITY\n>\n> SANITY was not set when running as root,\n> but this is not 100% reliable for CYGWIN:\n>\n> A file is allowed to be deleted when the containing\n> directory does not have write permissions.\n>\n> Signed-off-by: Torsten Bögershausen <tboegi@web.de>\n> ---\n>  t/test-lib.sh | 20 +++++++++++++++++++-\n>  1 file changed, 19 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/test-lib.sh b/t/test-lib.sh\n> index 93f7cad..b8f736f 100644\n> --- a/t/test-lib.sh\n> +++ b/t/test-lib.sh\n> @@ -1038,8 +1038,26 @@ test_lazy_prereq NOT_ROOT '\n>  \n>  # When the tests are run as root, permission tests will report that\n>  # things are writable when they shouldn't be.\n> +# Special check for CYGWIN (or Windows in general):\n> +# A file can be deleted, even if the containing directory does'nt\n> +# have write permissions\n>  test_lazy_prereq SANITY '\n> -\ttest_have_prereq POSIXPERM,NOT_ROOT\n> +\tdsdir=$$ds\n> +\tmkdir $dsdir &&\n> +\ttouch $dsdir/x &&\n> +\tchmod -w $dsdir &&\n> +\tif rm $dsdir/x\n> +\tthen\n> +\t\tchmod +w $dsdir\n> +\t\trm -rf $dsdir\n> +\t\techo >&2 SANITY=false\n> +\t\tfalse\n> +\telse\n> +\t\tchmod +w $dsdir\n> +\t\trm -rf $dsdir\n> +\t\techo >&2 SANITY=true\n> +\t\ttrue\n> +\tfi\n>  '\n>  \n>  GIT_UNZIP=${GIT_UNZIP:-unzip}\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"255253","messageId":"2dba96fc1f2d52f4e103478a7827272d@www.dscho.org","threadId":"38357","inReplyTo":"54C2BC01.2030307@web.de","subject":"Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-01-24T09:41:08Z","receivedAt":"2015-01-24T09:41:08Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"On 2015-01-23 22:24, Torsten Bögershausen wrote:\n> [...] either to always switch off SANITY for CYGWIN (or Windows in general).\n\nNice one! You gave me the chuckle for the day ;-)\n\nCiao,\nDscho\n"},{"id":"255311","messageId":"CABPQNSYZMS+feX=jSxwOhr+P8isroct2=Dcw18LSjCYZUvug=A@mail.gmail.com","threadId":"38357","inReplyTo":"xmqqh9vr4mlz.fsf@gitster.dls.corp.google.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2015-01-27T01:44:14Z","receivedAt":"2015-01-27T01:44:14Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Fri, Jan 16, 2015 at 1:04 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Jeff King <peff@peff.net> writes:\n>\n>> Exactly. I am happy to submit a patch, but I cannot think of any\n>> mechanisms besides:\n>>\n>>   1. Calling `id`, which I suspect is very not portable.\n>>\n>>   2. Writing a C program to check getuid(). That's portable for most\n>>      Unixes. It looks like we already have a hacky wrapper on mingw that\n>>      will always return \"1\".\n>>\n>> Is (2) too gross?\n>\n> Not overly gross compared to some existing test-*.c files, I would\n> say.\n>\n> I wondered what 'perl -e 'print $>' would say in mingw, and if that\n> is portable enough, though.\n\n$ perl -e 'print $>'\n500\n"},{"id":"255314","messageId":"xmqqh9vdlyuu.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"CABPQNSYZMS+feX=jSxwOhr+P8isroct2=Dcw18LSjCYZUvug=A@mail.gmail.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-01-27T02:51:53Z","receivedAt":"2015-01-27T02:51:53Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> On Fri, Jan 16, 2015 at 1:04 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Jeff King <peff@peff.net> writes:\n>>\n>>> Exactly. I am happy to submit a patch, but I cannot think of any\n>>> mechanisms besides:\n>>>\n>>>   1. Calling `id`, which I suspect is very not portable.\n>>>\n>>>   2. Writing a C program to check getuid(). That's portable for most\n>>>      Unixes. It looks like we already have a hacky wrapper on mingw that\n>>>      will always return \"1\".\n>>>\n>>> Is (2) too gross?\n>>\n>> Not overly gross compared to some existing test-*.c files, I would\n>> say.\n>>\n>> I wondered what 'perl -e 'print $>' would say in mingw, and if that\n>> is portable enough, though.\n>\n> $ perl -e 'print $>'\n> 500\n\nThanks for a follow-up.\n\nIs \"id -u\" not useful over there?  I ask because that is what is\nused in the version tentatively queued on 'pu' for NOT_ROOT\nprerequisite (the jk/sanity topic).\n\nThe SANITY prerequisite in that topic needs to be replaced with the\none from Torsten that attempts to check what we want to know in a\nmore direct way; i.e. \"after making a directory or a file read-only,\ndoes the filesystem really honours that, or lets us clobber?\" is\nwhat we need to know to skip some tests, and we should check that,\ninstead of \"is / writable by us?\" or \"are we root?\".\n"},{"id":"255334","messageId":"CABPQNSaqtczB3LDGq2T6c=1jbbxMEAra5DDrjpUXHC5TEvMh-w@mail.gmail.com","threadId":"38357","inReplyTo":"xmqqh9vdlyuu.fsf@gitster.dls.corp.google.com","subject":"Re: t5539 broken under Mac OS X","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2015-01-27T16:35:16Z","receivedAt":"2015-01-27T16:35:16Z","isPatch":false,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Tue, Jan 27, 2015 at 3:51 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Erik Faye-Lund <kusmabite@gmail.com> writes:\n>\n>> On Fri, Jan 16, 2015 at 1:04 AM, Junio C Hamano <gitster@pobox.com> wrote:\n>>> Jeff King <peff@peff.net> writes:\n>>>\n>>>> Exactly. I am happy to submit a patch, but I cannot think of any\n>>>> mechanisms besides:\n>>>>\n>>>>   1. Calling `id`, which I suspect is very not portable.\n>>>>\n>>>>   2. Writing a C program to check getuid(). That's portable for most\n>>>>      Unixes. It looks like we already have a hacky wrapper on mingw that\n>>>>      will always return \"1\".\n>>>>\n>>>> Is (2) too gross?\n>>>\n>>> Not overly gross compared to some existing test-*.c files, I would\n>>> say.\n>>>\n>>> I wondered what 'perl -e 'print $>' would say in mingw, and if that\n>>> is portable enough, though.\n>>\n>> $ perl -e 'print $>'\n>> 500\n>\n> Thanks for a follow-up.\n>\n> Is \"id -u\" not useful over there?  I ask because that is what is\n> used in the version tentatively queued on 'pu' for NOT_ROOT\n> prerequisite (the jk/sanity topic).\n\nIt's pretty much the same thing:\n\n$ id -u\n500\n\n> The SANITY prerequisite in that topic needs to be replaced with the\n> one from Torsten that attempts to check what we want to know in a\n> more direct way; i.e. \"after making a directory or a file read-only,\n> does the filesystem really honours that, or lets us clobber?\" is\n> what we need to know to skip some tests, and we should check that,\n> instead of \"is / writable by us?\" or \"are we root?\".\n\n$ test -w / && echo yes\nyes\n\n$ mkdir foo && chmod a= foo\n$ test -w w && echo yes\n$ rm -r foo\nrm: directory `foo' is write protected; descend into it anyway? n\n$ rm -r foo < /dev/null\n$ ls -la foo\nls: foo: No such file or directory\n$\n\nSo, Windows does only kind-of respect read-only flags. Dunno if this\ntells you something useful, though.\n"},{"id":"256029","messageId":"xmqqzj8ipxj6.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54C1E395.30003@web.de","subject":"Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-12T22:36:45Z","receivedAt":"2015-02-12T22:36:45Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"So after discussing this one and queuing the resulting three-patch\nseries jk/sanity that consists of the three patches:\n\n    * jk/sanity (2015-01-27) 3 commits\n     - test-lib.sh: set prerequisite SANITY by testing what we really need\n     - tests: correct misuses of POSIXPERM\n     - t/lib-httpd: switch SANITY check for NOT_ROOT\n\n     Waiting for ack or counter-proposal from Torsten.\n     Otherwise looking good.\n\nDo we want to proceed with these, or do we want any more work done\non them?\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"},{"id":"256101","messageId":"54DF091B.9070903@web.de","threadId":"38357","inReplyTo":"xmqqzj8ipxj6.fsf@gitster.dls.corp.google.com","subject":"Re: [msysGit] Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Torsten Bögershausen","fromEmail":"tboegi@web.de","sentAt":"2015-02-14T08:36:43Z","receivedAt":"2015-02-14T08:36:43Z","isPatch":true,"sender":{"key":"tboegi@web.de","avatar":"https://avatars.githubusercontent.com/u/7138363?v=4"},"body":"On 2015-02-12 23.36, Junio C Hamano wrote:\n> So after discussing this one and queuing the resulting three-patch\n> series jk/sanity that consists of the three patches:\n> \n>     * jk/sanity (2015-01-27) 3 commits\n>      - test-lib.sh: set prerequisite SANITY by testing what we really need\n>      - tests: correct misuses of POSIXPERM\n>      - t/lib-httpd: switch SANITY check for NOT_ROOT\n> \n>      Waiting for ack or counter-proposal from Torsten.\n>      Otherwise looking good.\n> \n> Do we want to proceed with these, or do we want any more work done\n> on them?\n> \nI managed to run the tests with POSIXPERM and/or SANITY under\nCygwin, Msysgit, Linux, root@linux,  Mac and root@Mac.\nAll passed.\n\nThe work to \"be done\", what I can see: please amend the commit message: \n s/more exotic//\n"},{"id":"256113","messageId":"xmqqwq3i7n3j.fsf@gitster.dls.corp.google.com","threadId":"38357","inReplyTo":"54DF091B.9070903@web.de","subject":"Re: Re: [PATCH] t/lib-httpd: switch SANITY check for NOT_ROOT","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-15T23:48:32Z","receivedAt":"2015-02-15T23:48:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Torsten Bögershausen <tboegi@web.de> writes:\n\n> The work to \"be done\", what I can see: please amend the commit message: \n>  s/more exotic//\n\nThanks for reminding; I thought this was excised already but\napparently hasn't (yet).\n\n-- \n-- \n*** Please reply-to-all at all times ***\n*** (do not pretend to know who is subscribed and who is not) ***\n*** Please avoid top-posting. ***\nThe msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free.\n\nYou received this message because you are subscribed to the Google\nGroups \"msysGit\" group.\nTo post to this group, send email to msysgit@googlegroups.com\nTo unsubscribe from this group, send email to\nmsysgit+unsubscribe@googlegroups.com\nFor more options, and view previous threads, visit this group at\nhttp://groups.google.com/group/msysgit?hl=en_US?hl=en\n\n--- \nYou received this message because you are subscribed to the Google Groups \"Git for Windows\" group.\nTo unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com.\nFor more options, visit https://groups.google.com/d/optout.\n"}]}