From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, Dave Page <dpage(at)pgadmin(dot)org> |
Subject: | tests fail on windows with default git settings |
Date: | 2024-07-07 05:20:30 |
Message-ID: | 20240707052030.r77hbdkid3mwksop@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Git on windows defaults to core.autocrlf being enabled. Which means
that a normal git clone will convert all lineendings in text files.
Unfortunately that causes a few tests to fail, at least:
test_json_parser/001_test_json_parser_incremental
test_json_parser/003_test_semantic
pg_bsd_indent/001_pg_bsd_indent
In the case of test_json_parser the problem is that
test_json_parser_incremental.c assumes one can read statbuf.st_size bytes via
fread() - but that doesn't work if the input has crlf inside. Due to the crlf
conversion we reach EOF before we've read statbuf.st_size bytes, triggering an
error.
I suspect the issue with pg_bsd_indent is similar.
Do we want to support checking out with core.autocrlf? I suspect it might
just take using binary mode in a few more places.
If we do not want to support that, ISTM we ought to raise an error somewhere?
This kind of thing is pretty time consuming to track down, at least for the
windows-noob writing this email.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-07-07 05:26:13 | Re: tests fail on windows with default git settings |
Previous Message | Paul George | 2024-07-07 02:45:32 | Re: Eager aggregation, take 3 |