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

Re: t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Feb 8, 2019, 13:51 UTC
Message-ID
<20190208135137.GE11927@genre.crustytoothpaste.net>
In-Reply-To
<20190208115511.GA30779@alpha>
On Fri, Feb 08, 2019 at 12:55:11PM +0100, Kevin Daudt wrote:
Show 19 quoted lines
> On Fri, Feb 08, 2019 at 11:45:02AM +0000, brian m. carlson wrote:
> > On Fri, Feb 08, 2019 at 01:04:03AM -0500, Rich Felker wrote:
> > [..]
> > > In any case, this test seems mainly relevant to Windows users wanting
> > > to store source files in UTF-16LE with BOM. This doesn't really make
> > > sense to do on a Linux/musl system, so I'm not sure any action is
> > > needed here from either side.
> > 
> > I do know that some people use CIFS or the like to share repositories
> > between Unix and Windows. However, I agree that such people aren't
> > likely to use UTF-16 on Unix systems. The working tree encoding
> > functionality also supports other encodings which musl may or may not
> > support.
> > 
> > If you and your users are comfortable with the fact that the test (and
> > the corresponding functionality) won't work as expected with UTF-16,
> > then I agree that no action is needed.
> 
> So would you suggest that we just skip this test on Alpine Linux?

That's not exactly what I said. If Alpine Linux users are never going to use this functionality and don't care that it's broken, then that's a fine solution.

As originally mentioned, musl could change its libiconv to write a BOM, which would make it compatible with other known iconv implementations.

There's also the possibility of defining NO_ICONV. That basically means that your system won't support encodings, and then this test shouldn't matter.

Finally, you could try applying a patch to the test to make it write the BOM for UTF-16 since your iconv doesn't. I expect that the test will fail again later on once you've done that, though.

I don't have musl so I can't test a patch, but theoretically, you could use a Makefile variable and lazy test prerequisite to control the behavior of the code and test, and we could apply a patch. I'll try to work something up later today which might work and which you could test.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Kevin DaudtNext: Junio C Hamano
Message 6 of 30 in “t0028-working-tree-encoding.sh failing on musl based systems (Alpine Linux)”
  1. Kevin DaudtFeb 7, 2019
  2. brian m. carlsonFeb 8, 2019
  3. Rich FelkerFeb 8, 2019
  4. brian m. carlsonFeb 8, 2019
  5. Kevin DaudtFeb 8, 2019
  6. brian m. carlsonFeb 8, 2019
  7. Junio C HamanoFeb 8, 2019
  8. Kevin DaudtFeb 8, 2019
  9. brian m. carlsonFeb 8, 2019
  10. Junio C HamanoFeb 8, 2019
  11. brian m. carlsonFeb 9, 2019
  12. Kevin DaudtFeb 9, 2019
  13. utf8: handle systems that don't write BOM for UTF-16brian m. carlson, Feb 9, 2019
  14. Eric SunshineFeb 10, 2019
  15. brian m. carlsonFeb 10, 2019
  16. Torsten BögershausenFeb 10, 2019
  17. brian m. carlsonFeb 10, 2019
  18. Junio C HamanoFeb 11, 2019
  19. utf8: handle systems that don't write BOM for UTF-16brian m. carlson, Feb 11, 2019
  20. Eric SunshineFeb 11, 2019
  21. brian m. carlsonFeb 11, 2019
  22. utf8: handle systems that don't write BOM for UTF-16brian m. carlson, Feb 11, 2019
  23. Kevin DaudtFeb 11, 2019
  24. brian m. carlsonFeb 11, 2019
  25. Junio C HamanoFeb 12, 2019
  26. brian m. carlsonFeb 12, 2019
  27. Junio C HamanoFeb 12, 2019
  28. utf8: handle systems that don't write BOM for UTF-16brian m. carlson, Feb 12, 2019
  29. Rich FelkerFeb 8, 2019
  30. Torsten BögershausenFeb 9, 2019

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.