Re: [PATCH v2] apply: add unit tests for parse_range

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

 



Phillip Wood <phillip.wood123@xxxxxxxxx> writes:

> Thanks for re-rolling, I've left a few comments below
> ...
> This is an example of why I don't think we should check p1 and p2 when
> we're expecting the parse to fail. Also please note we don't use "//"
> comments in the code base.
>
> There is a good range of failing non-digit inputs. It would be nice to
> see a test for a hunk header where the number is too large to
> parse. Ideally we'd also change the parsing code to return an error in
> that case rather than waiting to error out later on as the apply code
> does currently. To do that You'd need to explicitly set errno to zero
> before calling strtoul() and check it afterwards.

Thanks.  All points you raised make quite a lot of sense to me.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux