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

Re: [Problem] test_must_fail makes possibly questionable assumptions about exit_code.

From
Jeff King <peff@peff.net>
Date
Mar 1, 2018, 15:08 UTC
Message-ID
<20180301150835.GD24907@sigill.intra.peff.net>
In-Reply-To
<001d01d3b169$95f4b0c0$c1de1240$@nexbridge.com>
On Thu, Mar 01, 2018 at 09:28:31AM -0500, Randall S. Becker wrote:
Show 10 quoted lines
> > It's not clear to me though if we just want to tweak the programs run in the
> > test scripts in order to get test_must_fail to stop complaining, or if we
> > consider the unusual exit codes from our perl-based Git programs to be an
> > error that should be fixed for real use, too.
> 
> I'm living unusual exit code IRL all the time. So "fixed for real", is
> what I'm looking for. So if we were to do that, where is the best
> place to insert a fix - my original question - that would be permanent
> in the main git test code. Or perhaps this needs to be in the main
> code itself.

If it's fixed in the real world, then it needs to be in the main code itself. It looks like git-svn already does this to some degree itself (most of the work happens in an eval, and it calls the "fatal" function if that throws an exception via 'die').

So I think git-send-email.perl (and maybe others) needs to learn the same trick (by pushing the main bits of the script into an eval). Or it needs to include the SIG{__DIE__} trickery at the beginning of the script.

I think the SIG{__DIE__} stuff could go into Git/PredictableDie.pm or something, and then any scripts that need it could just "use Git::PredictableDie".

Does that make sense?
-Peff
Previous: Randall S. BeckerNext: demerphq
Message 12 of 26 in “[Problem] test_must_fail makes possibly questionable assumptions about exit_code.”
  1. Randall S. BeckerFeb 27, 2018
  2. Jonathan NiederFeb 28, 2018
  3. Eric WongFeb 28, 2018
  4. Jeff KingFeb 28, 2018
  5. Eric WongFeb 28, 2018
  6. Jeff KingFeb 28, 2018
  7. Randall S. BeckerFeb 28, 2018
  8. demerphqFeb 28, 2018
  9. Jeff KingMar 1, 2018
  10. demerphqMar 1, 2018
  11. Randall S. BeckerMar 1, 2018
  12. Jeff KingMar 1, 2018
  13. demerphqMar 1, 2018
  14. Junio C HamanoFeb 28, 2018
  15. demerphqFeb 28, 2018
  16. Randall S. BeckerFeb 28, 2018
  17. demerphqFeb 28, 2018
  18. demerphqFeb 28, 2018
  19. Randall S. BeckerFeb 28, 2018
  20. Jonathan NiederFeb 28, 2018
  21. Randall S. BeckerFeb 28, 2018
  22. Jonathan NiederFeb 28, 2018
  23. Randall S. BeckerFeb 28, 2018
  24. Randall S. BeckerFeb 28, 2018
  25. Jonathan NiederFeb 28, 2018
  26. Jeff KingMar 1, 2018

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.