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

Re: [PATCH 0/2] test: Detect *lots* of bugs by adding non-alnum to trash dir names

From
JDJoachim Durchholz <jo@durchholz.org>
Date
Apr 9, 2017, 20:37 UTC
Message-ID
<2893d697-735f-537c-241d-910139f2c281@durchholz.org>
In-Reply-To
<20170409191117.25175-1-avarab@gmail.com>
Am 09.04.2017 um 21:11 schrieb Ævar Arnfjörð Bjarmason:
Show 7 quoted lines
> This series changes the test library so that we interpolate the result
> of:
>
>     perl -e 'print join q[], grep { /[^[:alnum:]]/ and !m<[./]> } map chr, 0x01..0x7f'
>
> Into the trash directory name we generate. Doing this makes 30% of the
> test suite fail.

Wow. I know that I tend to bring out weird errors in systems, but this is much deeper than I could have ever expected.

You might want to additionally test directory names like "asdf" and 'asdf' - some shell might try to be smart about such names and automatically unquote them. This would probably mean running the test suite multiple times, which some people find offensive (myself included).

There's also high-bit characters that might cause oddness. 0x80 and 0xff look like interesting edge cases to me. Note that just appending these bytes is going to cause failures with filesystems that expect UTF-8 file names, you'd want to use a Unicode code point that gets encoded using a 0x80 resp. 0xff byte (I suspect 0xff is actually not a valid UTF-8 encoding at all but I'd have to double-check that).

Is git supposed to run fine under Windows, or under Linux with an ntfs filesystem driver? If yes, then I'd expect this patch to cause the other 70% of tests to crash, because NTFS forbids several non-alnum printable characters, among them <=>\

Previous: Joachim Durchholz
Message 25 of 25 in “test: Detect *lots* of bugs by adding non-alnum to trash dir names”
  1. 0/2 test: Detect *lots* of bugs by adding non-alnum to trash dir namesÆvar Arnfjörð Bjarmason, Apr 9, 2017
  2. 1/2 tests: mark tests that fail when the TEST_DIRECTORY is unusualÆvar Arnfjörð Bjarmason, Apr 9, 2017
  3. 2/2 test-lib: exhaustively insert non-alnum ASCII into the TRASH_DIRECTORY nameÆvar Arnfjörð Bjarmason, Apr 9, 2017
  4. SZEDER GáborApr 10, 2017
  5. Ævar Arnfjörð BjarmasonApr 10, 2017
  6. SZEDER GáborApr 10, 2017
  7. Ævar Arnfjörð BjarmasonApr 10, 2017
  8. Jeff KingApr 10, 2017
  9. Joachim DurchholzApr 10, 2017
  10. Jeff KingApr 10, 2017
  11. Joachim DurchholzApr 10, 2017
  12. Jeff KingApr 10, 2017
  13. SZEDER GáborApr 10, 2017
  14. Ævar Arnfjörð BjarmasonApr 10, 2017
  15. connect.c: handle errors from split_cmdlineJeff King, Apr 11, 2017
  16. Jeff KingApr 11, 2017
  17. Ævar Arnfjörð BjarmasonApr 11, 2017
  18. Jeff KingApr 11, 2017
  19. Ævar Arnfjörð BjarmasonApr 11, 2017
  20. Junio C HamanoApr 17, 2017
  21. Junio C HamanoApr 17, 2017
  22. Ævar Arnfjörð BjarmasonApr 19, 2017
  23. Jeff KingApr 11, 2017
  24. Joachim DurchholzApr 11, 2017
  25. Joachim DurchholzApr 9, 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.