coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: avoid potential overflows with `expr`


From: Bernhard Voelker
Subject: Re: [PATCH] tests: avoid potential overflows with `expr`
Date: Thu, 21 Apr 2016 01:09:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 04/20/2016 06:00 PM, Pádraig Brady wrote:
> * cfg.mk (sc_prohibit_expr_unsigned): expr uses intmax_t internally
> when GMP is not available, so flag any uses of unsigned limits.
> * tests/misc/timeout-parameters.sh: Remove the overflow related
> to UINT_MAX as it's handled by the following case.  Change the
> following case from 99... to $TIME_T_OFLOW to be more expressive
> in what it's actually testing.  Directly check that commands succeed,
> rather than inspecting $? afterwards.
> * tests/dd/skip-seek-past-dev.sh: Guard against large device sizes.
> * tests/id/setgid.sh: Protect: Guard against large group IDs.
> * tests/misc/cut-huge-range.sh: Tweak comment to avoid syntax check.
> It's tempting to simplify to just skip the test if expr fails,
> but SIZE_MAX > INTMAX_MAX is the common case.

+1

Thanks & have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]