Re: [PATCH nft] tests: 0043concatenated_ranges_0: Fix checks for add/delete failures

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

 



On Mon, Aug 03, 2020 at 04:06:39PM +0200, Stefano Brivio wrote:
> The test won't stop if we simply precede commands expected to fail
> by !. POSIX.1-2017 says:
> 
>   -e
>       When this option is on, if a simple command fails for any of
>       the reasons listed in Consequences of Shell Errors or returns
>       an exit status value >0, and is not part of the compound list
>       following a while, until or if keyword, and is not a part of
>       an AND or OR list, and is not a pipeline preceded by the "!"
>       reserved word, then the shell will immediately exit.
> 
> ...but I didn't care about the last part.
> 
> Replace those '! nft ...' commands by 'nft ... && exit 1' to actually
> detect failures.
> 
> As a result, I didn't notice that now, correctly, inserting elements
> into a set that contains the same exact element doesn't actually
> fail, because nft doesn't pass NLM_F_EXCL on a simple 'add'. Drop
> re-insertions from the checks we perform here, overlapping elements
> are already covered by other tests.

Also applied, thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux