git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t5539 broken under Mac OS X

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 15, 2015, 22:39 UTC
Message-ID
<xmqqa91j6537.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150115222719.GA19021@peff.net>
Jeff King <peff@peff.net> writes:
> The current scheme does not require POSIXPERM. Would this mean that
> some platforms no longer runs SANITY tests (e.g., Windows)?
>
> Many of the SANITY-marked tests already require both, but not all.

Before writing that patchlet, I briefly looked at grep output and thought that many that are protected only by SANITY lacked POSIXPERM by mistake:

 t/t1004-read-tree-m-u-wf.sh:test_expect_success SANITY 'funny symlink in...
 t/t3600-rm.sh 'Test that "git rm -f" fails if its rm fails'
 t/t7300-clean.sh:test_expect_success SANITY 'removal failure' '
 t/t7300-clean.sh:test_expect_success SANITY 'git clean -d with an...

All of the above relies on a working chmod as far as I can tell, so they should require POSIXPERM,SANITY, not just SANITY.

Show 5 quoted lines
> And
> certainly lib-httpd actually cares whether you are _truly_ root, not
> about weird filesystem permissions. Should lib-httpd literally be
> checking the output of `id` (though I can imagine that is anything but
> portable)?
Even though t/README describes SANITY to require:
  Test is not run by root user, and an attempt to write to an
  unwritable file is expected to fail correctly.

and it has been that way from day one, c91cfd19 (tests: A SANITY test prereq for testing if we're root, 2010-08-06) is clear that this is about "'chmod -w' is a good way to test unwritable files"

lib-httpd should, if it cares about the root-ness, be checking that in a more direct way, "test_have_prereq RUNNING_AS_ROOT". Making the implementation of that portable is another matter, though.

Previous: Jeff KingNext: Jeff King
Message 8 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. Junio C HamanoJan 16, 2015
  17. Torsten BögershausenJan 17, 2015
  18. Junio C HamanoJan 21, 2015
  19. Torsten BögershausenJan 22, 2015
  20. Junio C HamanoJan 22, 2015
  21. Torsten BögershausenJan 23, 2015
  22. Junio C HamanoFeb 12, 2015
  23. Torsten BögershausenFeb 14, 2015
  24. Junio C HamanoFeb 15, 2015
  25. Torsten BögershausenJan 23, 2015
  26. Junio C HamanoJan 23, 2015
  27. Johannes SchindelinJan 24, 2015
  28. Kyle J. McKayJan 16, 2015
  29. Kyle J. McKayJan 16, 2015
  30. Achim GratzJan 16, 2015
  31. Erik Faye-LundJan 27, 2015
  32. Junio C HamanoJan 27, 2015
  33. Erik Faye-LundJan 27, 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.