RE: [Bug] Test 1450.91 Fails on NonStop
On Wednesday, February 15, 2023 1:02 PM, Jeff King wrote:
Show 40 quoted lines
>On Wed, Feb 15, 2023 at 12:44:59PM -0500, rsbecker@nexbridge.com wrote:
>
>> + + git hash-object -w --stdin
>> + test-tool genzeros 104857601
>> blob=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
>
>That's not right. e69de29bb is the empty blob. A hundred megabytes (plus
>one) of zeroes should be d748d1b68b9dc69c4717ebc070dbc547d129bcc6.
>
>So that is the root of your problem (the empty file will obviously not trigger the "too
>large" fsck check), but I don't know why it would be failing.
>
>Maybe check the output of "test-tool genzeros 104857601" to make sure that it as
>expected? If not, then the bug is somewhere in t/helper/test-genzeros.c.
>
>It's on the left-hand side of pipe. Maybe it is getting a write() error, but we are
>ignoring it? Maybe a patch like this would help diagnose:
>
>diff --git a/t/helper/test-genzeros.c b/t/helper/test-genzeros.c index
>8ca988d621..0574917005 100644
>--- a/t/helper/test-genzeros.c
>+++ b/t/helper/test-genzeros.c
>@@ -18,14 +18,14 @@ int cmd__genzeros(int argc, const char **argv)
> /* Writing out individual NUL bytes is slow... */
> while (count < 0)
> if (write(1, zeros, ARRAY_SIZE(zeros)) < 0)
>- return -1;
>+ die_errno("write()");
>
> while (count > 0) {
> n = write(1, zeros, count < ARRAY_SIZE(zeros) ?
> count : ARRAY_SIZE(zeros));
>
> if (n < 0)
>- return -1;
>+ die_errno("write()");
>
> count -= n;
> }
>So, this looks like we do not have to hold the 2.39.2 release for this problem. I will run the packaging job for the platform release.
+ test-tool genzeros 104857601
fatal: write(): Invalid function argument
That explains it. We had to push the use of xwrite() because of issues associated with writing large buffers exceeding through write(). We could use MAX_IO_SIZE to limit the write size (at least on NonStop) into acceptable chunks.