[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] [PATCH] split: fix a case where --elide-empty-files caus
Re: [coreutils] [PATCH] split: fix a case where --elide-empty-files causes invalid chunking
Wed, 08 Dec 2010 13:11:37 +0100
Pádraig Brady wrote:
> This is a fairly esoteric issue I noticed in passing.
> No need for a NEWS entry I think.
> I was wondering about adding ---io-blksize when writing
> the test originally, and now that it can be used to
> trigger this bug I think it's warranted?
> Subject: [PATCH] split: fix a case where --elide-empty-files causes invalid
> When -n l/N is used and long lines are present that both
> span partitions and multiple buffers, one would get
> inconsistent chunk sizes.
> * src/split.c (main): Add a new undocumented ---io-blksize option
> to support full testing with varied buffer sizes.
> (cwrite): Refactor most handling of --elide-empty to here.
> (bytes_split): Remove handling of --elide-empty.
> (lines_chunk_split): Likewise. The specific issue here
> was the first handling of elide_empty_files interfered
> with the replenishing of the input buffer.
> * test/misc/split-lchunk: Add -e and the new --io-blksize
> combinations to the test.
Looks fine at first glance, modulo a nit in the log: