summaryrefslogtreecommitdiffstats
path: root/include/xt.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2020-08-03 16:06:39 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2020-08-04 13:41:25 +0200
commit2ff9af4370e12a30714dbe62eeccb141d1afb534 (patch)
treea7d9d321691fbe0f5fa370fffe5ca4404e37c3b4 /include/xt.h
parenta9c2177f292f2620edb02b5549580b982ceb9455 (diff)
tests: 0043concatenated_ranges_0: Fix checks for add/delete failures
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. Fixes: 618393c6b3f2 ("tests: Introduce test for set with concatenated ranges") Signed-off-by: Stefano Brivio <sbrivio@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/xt.h')
0 files changed, 0 insertions, 0 deletions