git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 17:29 UTC

Re: t5539 broken under Mac OS X

From
Erik Faye-Lund <kusmabite@gmail.com>
Date
Jan 27, 2015, 16:35 UTC
Message-ID
<CABPQNSaqtczB3LDGq2T6c=1jbbxMEAra5DDrjpUXHC5TEvMh-w@mail.gmail.com>
In-Reply-To
<xmqqh9vdlyuu.fsf@gitster.dls.corp.google.com>
On Tue, Jan 27, 2015 at 3:51 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> Erik Faye-Lund <kusmabite@gmail.com> writes:
>
>> On Fri, Jan 16, 2015 at 1:04 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>> Jeff King <peff@peff.net> writes:
>>>
>>>> Exactly. I am happy to submit a patch, but I cannot think of any
>>>> mechanisms besides:
>>>>
>>>>   1. Calling `id`, which I suspect is very not portable.
>>>>
>>>>   2. Writing a C program to check getuid(). That's portable for most
>>>>      Unixes. It looks like we already have a hacky wrapper on mingw that
>>>>      will always return "1".
>>>>
>>>> Is (2) too gross?
>>>
>>> Not overly gross compared to some existing test-*.c files, I would
>>> say.
>>>
>>> I wondered what 'perl -e 'print $>' would say in mingw, and if that
>>> is portable enough, though.
>>
>> $ perl -e 'print $>'
>> 500
>
> Thanks for a follow-up.
>
> Is "id -u" not useful over there?  I ask because that is what is
> used in the version tentatively queued on 'pu' for NOT_ROOT
> prerequisite (the jk/sanity topic).
It's pretty much the same thing:

$ id -u 500

Show 6 quoted lines
> The SANITY prerequisite in that topic needs to be replaced with the
> one from Torsten that attempts to check what we want to know in a
> more direct way; i.e. "after making a directory or a file read-only,
> does the filesystem really honours that, or lets us clobber?" is
> what we need to know to skip some tests, and we should check that,
> instead of "is / writable by us?" or "are we root?".

$ test -w / && echo yes yes

$ mkdir foo && chmod a= foo $ test -w w && echo yes $ rm -r foo rm: directory `foo' is write protected; descend into it anyway? n $ rm -r foo < /dev/null $ ls -la foo ls: foo: No such file or directory $

So, Windows does only kind-of respect read-only flags. Dunno if this tells you something useful, though.

Previous: Junio C HamanoNext: Junio C Hamano
Message 30 of 33 in “t5539 broken under Mac OS X”
  1. Torsten BögershausenJan 14, 2015
  2. Junio C HamanoJan 14, 2015
  3. Torsten BögershausenJan 14, 2015
  4. Jeff KingJan 14, 2015
  5. Kyle J. McKayJan 15, 2015
  6. Junio C HamanoJan 15, 2015
  7. Jeff KingJan 15, 2015
  8. Junio C HamanoJan 15, 2015
  9. Jeff KingJan 15, 2015
  10. Junio C HamanoJan 16, 2015
  11. t/lib-httpd: switch SANITY check for NOT_ROOTJeff King, Jan 16, 2015
  12. Kyle J. McKayJan 16, 2015
  13. Jeff KingJan 16, 2015
  14. Jeff KingJan 16, 2015
  15. Junio C HamanoJan 16, 2015
  16. Kyle J. McKayJan 16, 2015
  17. Kyle J. McKayJan 16, 2015
  18. Junio C HamanoJan 16, 2015
  19. Achim GratzJan 16, 2015
  20. Torsten BögershausenJan 17, 2015
  21. Junio C HamanoJan 21, 2015
  22. Torsten BögershausenJan 22, 2015
  23. Junio C HamanoJan 22, 2015
  24. Torsten BögershausenJan 23, 2015
  25. Torsten BögershausenJan 23, 2015
  26. Junio C HamanoJan 23, 2015
  27. Johannes SchindelinJan 24, 2015
  28. Erik Faye-LundJan 27, 2015
  29. Junio C HamanoJan 27, 2015
  30. Erik Faye-LundJan 27, 2015
  31. Junio C HamanoFeb 12, 2015
  32. Torsten BögershausenFeb 14, 2015
  33. Junio C HamanoFeb 15, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.