From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCHv3] tests: py: Add test for ambiguity while setting the value Date: Sun, 18 Jun 2017 11:29:13 +0200 Message-ID: <20170618092913.GA8026@salvia> References: <1497641742-25272-1-git-send-email-mayhs11saini@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netfilter-devel@vger.kernel.org To: Shyam Saini Return-path: Received: from mail.us.es ([193.147.175.20]:44006 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbdFRJ3W (ORCPT ); Sun, 18 Jun 2017 05:29:22 -0400 Received: from antivirus1-rhel7.int (unknown [192.168.2.11]) by mail.us.es (Postfix) with ESMTP id ED7FAE1237 for ; Sun, 18 Jun 2017 11:29:11 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id DF47E18515 for ; Sun, 18 Jun 2017 11:29:11 +0200 (CEST) Received: from antivirus1-rhel7.int (localhost [127.0.0.1]) by antivirus1-rhel7.int (Postfix) with ESMTP id F23E818515 for ; Sun, 18 Jun 2017 11:29:09 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1497641742-25272-1-git-send-email-mayhs11saini@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org List-ID: On Sat, Jun 17, 2017 at 01:05:42AM +0530, Shyam Saini wrote: > This test checks bug identified and fixed in the commit mentioned below > In a statement if there are multiple src data then it would be > totally ambiguous to decide which value to set. > > Before the commit was made it returned 134(BUG), but now it returns 1 > i.e, an error message. Applied, thanks. One change though before applying, see below. > Test: 986dea8 ("evaluate: avoid reference to multiple src data in > statements which set values") > Signed-off-by: Shyam Saini > --- > tests/py/any/ct.t | 10 ++++++++++ > tests/py/any/meta.t | 8 ++++++++ > tests/py/bridge/ether.t | 7 +++++++ > tests/py/inet/tcp.t | 7 +++++++ > tests/py/inet/udp.t | 7 +++++++ > tests/py/ip/ip.t | 7 +++++++ > 6 files changed, 46 insertions(+) > > diff --git a/tests/py/any/ct.t b/tests/py/any/ct.t > index 20f047a..f7c2321 100644 > --- a/tests/py/any/ct.t > +++ b/tests/py/any/ct.t > @@ -58,6 +58,16 @@ ct mark set 0x11;ok;ct mark set 0x00000011 > ct mark set mark;ok;ct mark set mark > ct mark set mark map { 1 : 10, 2 : 20, 3 : 30 };ok;ct mark set mark map { 0x00000003 : 0x0000001e, 0x00000002 : 0x00000014, 0x00000001 : 0x0000000a} > > +# Following rules tests ambguity while setting the value > +# sudo nft add rule ip test-ip4 output ct mark set {0x11333, 0x11} > +# :1:41-55: Error: you cannot use a set here, unknown value to use > +# add rule ip test-ip4 output ct mark set {0x11333, 0x11} > +# ~~~~~~~~~~~~^^^^^^^^^^^^^^^ No need to copy and paste this over and over again. Look, next time you place this in the commit message, we can find the reason why this line was added via: $ git annotate So I have removed them all before applying.