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

Re: [PATCH] test-lib-functions.sh: update comment on generate_zero_bytes()

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 18, 2021, 17:03 UTC
Message-ID
<CAPig+cRhvh2TpSZ-bzjiuCf-Vaf-wr1umb6EAFna3uQxU=oXyw@mail.gmail.com>
In-Reply-To
<20210218095750.939746-1-rv@rasmusvillemoes.dk>
[cc:+æver]
On Thu, Feb 18, 2021 at 7:22 AM Rasmus Villemoes <rv@rasmusvillemoes.dk> wrote:
Show 12 quoted lines
> Commit d5cfd142ec (tests: teach the test-tool to generate NUL bytes
> and use it) changed the implementation of this helper, but didn't
> preserve the magic meaning of the word 'infinity' - in fact, since
> strtol() returns 0 when presented with that string, it ends up
> producing no output at all. Instead, the C implementation interprets
> lack of optional argument to mean infinity.
>
> Since the last and only user that actually passed 'infinity' vanished
> with d99194822b (Revert "t5562: replace /dev/zero with a pipe from
> generate_zero_bytes"), just update the comment to match the
> implementation, and while there, short-circuit "forever or X" to just
> X.

Makes sense, but note that generate_zero_bytes() is going away entirely[1], and that the patch series which removes it is likely to be merged to "master" soon[2].

[1]: https://lore.kernel.org/git/20210212132942.17325-5-avarab@gmail.com/ [2]: https://lore.kernel.org/git/xmqqr1legm5v.fsf@gitster.g/

Previous: Rasmus Villemoes
Message 2 of 2 in “test-lib-functions.sh: update comment on generate_zero_bytes()”
  1. test-lib-functions.sh: update comment on generate_zero_bytes()Rasmus Villemoes, Feb 18, 2021
  2. Eric SunshineFeb 18, 2021

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.