Re: [PATCH v2 1/3] daemon: replace atoi() with strtoul_ui() and strtol_i()
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Oct 21, 2024, 16:24 UTC
- Message-ID
- <ZxaAVgJa1VCj/9Ge@nand.local>
- In-Reply-To
- <CAPSxiM_+4ZaaiyvWDVwXf3tnt08otsx=1dcJJtQsL7h59dO8kQ@mail.gmail.com>
On Mon, Oct 21, 2024 at 01:43:53PM +0000, Usman Akinyemi wrote:
Show 6 quoted lines
> > Hum. I think the test description can stay as-is, as we don't typically > > mention all the exact details of what we test in a test suite. But I > > also don't mind this too much. > > Ohh, noted. I just thought the test description does not have anything > about merge.
Let's leave it as-is, unless you can come up with a new description that is a little shorter. Absent of that, I think the current description is fine as-is.
Show 14 quoted lines
> > > @@ -8,6 +8,31 @@ TEST_PASSES_SANITIZE_LEAK=true
> > > . ./test-lib.sh
> > >
> > > . "$TEST_DIRECTORY"/lib-git-daemon.sh
> > > +
> > > +test_expect_success 'daemon rejects invalid --init-timeout values' '
> > > + for arg in "3a" "-3"
> > > + do
> > > + test_must_fail git daemon --init-timeout="$arg" 2>actual_error &&
> > > + test_write_lines "fatal: invalid init-timeout '\''$arg'\'', expecting a non-negative integer" >expected &&
> >
> > You can use ${SQ} instead of '\'', also for the other two tests.
>
> Will make a change now.Thanks. ${SQ} is much preferred here, and makes the resulting test much easier to read.
Thanks, Taylor