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

Re: [PATCH 1/2] mingw: verify that paths are not mistaken for remote nicknames

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
May 30, 2017, 13:40 UTC
Message-ID
<acfefc80-7176-c7a8-374c-fc82152ba5d5@ramsayjones.plus.com>
In-Reply-To
<xmqqo9ubfby1.fsf@gitster.mtv.corp.google.com>
On 30/05/17 01:03, Junio C Hamano wrote:
Show 26 quoted lines
> Ramsay Jones <ramsay@ramsayjones.plus.com> writes:
> 
>> See commit c7018be509 ("test: allow skipping the remainder", 18-05-2017)
>> which is currently merged to the 'next' branch (merge 03b8a61e47 of the
>> 'jc/skip-test-in-the-middle' branch).
>>
>> (see also http://testanything.org)
>>
>> If you look at http://testanything.org//tap-specification.html, it shows
>> that you are allowed to annotate a plan of '1..0' with a SKIP directive
>> to explain why no tests in a file were run. However, a plan with '1..n'
>> (for any n > 0) must not have any annotation. (Back in 2012, when I wrote
>> commit bf4b721932, I found much better documentation than the above!)
>>
>> So, after commit c7018be509, you can now use the 'skip_all' facility
>> after having run some tests; it now converts that into an 'SKIP comment'
>> just before the test plan, effectively skipping the remainder of the
>> tests in the file. (since we are using a 'trailing plan', and have thus
>> not declared how many tests we had intended to run, we can output an
>> accurate plan).
> 
> Yes, but I consider that c7018be509 is an ugly workaround, not a
> part of a properly designed framework.  Unless it is absolutely
> necessary to run some tests before we may conditionally want to say
> "skip_all/test_done", we should strive to add tests _after_ these
> conditional skil_all/test_done is done.

yes, I don't disagree with that (which is why I said that I would have split t5545 into two files). ;-)

Show 7 quoted lines
> In this case, I do not see there is a strong reason why the new test
> must come before the "setup" test.  Sure, it does not use UNCPATH so
> the new test may be able to run even when the current path cannot be
> spelled as UNC, but that is a natural fallout of (ab)using the test
> script that was meant for UNC testing for something else, so I think
> a proper way out would be either (1) to use a separate script, if
> the new test wants to run whether UNC path can be determined,

Yes, I had intended to suggest this (or an existing script, protected by the MINGW prerequisite), but forgot!

>                                                              or (2)
> just accept the fact that the new test will only be run when UNC
> paths are tested.
I prefer (1).
>                   Relying on the hack c7018be509 did is much less
> appealing.

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Junio C Hamano
Message 34 of 41 in “What's cooking in git.git (May 2017, #06; Mon, 22)”
  1. Junio C HamanoMay 22, 2017
  2. Jonathan NiederMay 22, 2017
  3. Junio C HamanoMay 23, 2017
  4. Jonathan NiederMay 23, 2017
  5. Junio C HamanoMay 23, 2017
  6. Duy NguyenMay 25, 2017
  7. Junio C HamanoMay 26, 2017
  8. 00/13 reporting unexpected errors after (f)openJunio C Hamano, May 26, 2017
  9. 01/13 git_fopen: fix a sparse 'not declared' warningJunio C Hamano, May 26, 2017
  10. 02/13 use xfopen() in more placesJunio C Hamano, May 26, 2017
  11. 03/13 clone: use xfopen() instead of fopen()Junio C Hamano, May 26, 2017
  12. 05/13 config.mak.uname: set FREAD_READS_DIRECTORIES for Darwin, tooJunio C Hamano, May 26, 2017
  13. Stefan BellerMay 30, 2017
  14. Junio C HamanoMay 30, 2017
  15. Stefan BellerMay 30, 2017
  16. 04/13 config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and FreeBSDJunio C Hamano, May 26, 2017
  17. 06/13 wrapper.c: add and use warn_on_fopen_errors()Junio C Hamano, May 26, 2017
  18. 07/13 wrapper.c: add and use fopen_or_warn()Junio C Hamano, May 26, 2017
  19. 09/13 print errno when reporting a system call errorJunio C Hamano, May 26, 2017
  20. 10/13 rerere.c: move error_errno() closer to the source system callJunio C Hamano, May 26, 2017
  21. Stefan BellerMay 30, 2017
  22. 08/13 wrapper.c: make warn_on_inaccessible() staticJunio C Hamano, May 26, 2017
  23. 11/13 log: fix memory leak in open_next_file()Junio C Hamano, May 26, 2017
  24. 12/13 wrapper: factor out is_missing_file_error()Junio C Hamano, May 26, 2017
  25. 1/2 compat-util: is_missing_file_error()Junio C Hamano, May 30, 2017
  26. 2/2 treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checkedJunio C Hamano, May 30, 2017
  27. 13/13 is_missing_file_error(): work around EINVAL on WindowsJunio C Hamano, May 26, 2017
  28. 1/2 mingw: verify that paths are not mistaken for remote nicknamesJohannes Sixt, May 29, 2017
  29. 2/2 mingw_fopen: report ENOENT for invalid file namesJohannes Sixt, May 29, 2017
  30. Ævar Arnfjörð BjarmasonMay 29, 2017
  31. Johannes SixtMay 29, 2017
  32. Ramsay JonesMay 29, 2017
  33. Junio C HamanoMay 30, 2017
  34. Ramsay JonesMay 30, 2017
  35. Junio C HamanoMay 29, 2017
  36. Junio C HamanoMay 30, 2017
  37. Johannes SixtMay 30, 2017
  38. Junio C HamanoMay 30, 2017
  39. Stefan BellerMay 30, 2017
  40. Junio C HamanoMay 30, 2017
  41. Stefan BellerMay 30, 2017

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.