All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo@debian.org>
To: Netfilter Development Mailing list <netfilter-devel@vger.kernel.org>
Cc: Manuel Johannes Messner
	<manuel.johannes.messner@hs-furtwangen.de>,
	Florian Westphal <fw@strlen.de>,
	Pablo Neira Ayuso <pablo@netfilter.org>
Subject: [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622
Date: Thu, 17 Nov 2016 15:47:20 +0100	[thread overview]
Message-ID: <CAOkSjBgU9j+78-T+648ytWd3RhC7Ce+dAT1PBTNKKS0o5V_pnA@mail.gmail.com> (raw)

Hi,

commit id 3e5b0e406cf2b635200f9ee05ba8a158528fe622 :

tests: py: nft-tests.py: Add function for loading and removing kernel modules

introduces dummy kernel module loading to tests/py/nft-test.py.

The justification is that some tests are using the dummy module, but I
don't see them:

% git grep dummy tests/py/
tests/py/any/meta.t:meta iifname "dummy0";ok;iifname "dummy0"
tests/py/any/meta.t:meta iifname != "dummy0";ok;iifname != "dummy0"
tests/py/any/meta.t:meta iifname {"dummy0", "lo"};ok
tests/py/any/meta.t:- meta iifname != {"dummy0", "lo"};ok
tests/py/any/meta.t:meta iifname "dummy*";ok;iifname "dummy*"
tests/py/any/meta.t:meta iifname "dummy\*";ok;iifname "dummy\*"
tests/py/any/meta.t:meta oifname "dummy0";ok;oifname "dummy0"
tests/py/any/meta.t:meta oifname != "dummy0";ok;oifname != "dummy0"
tests/py/any/meta.t:meta oifname { "dummy0", "lo"};ok
tests/py/any/meta.t:meta oifname "dummy*";ok;oifname "dummy*"
tests/py/any/meta.t:meta oifname "dummy\*";ok;oifname "dummy\*"
tests/py/any/meta.t:meta oifname "dummy2" accept;ok;oifname "dummy2" accept
tests/py/any/meta.t.payload:# meta iifname "dummy0"
tests/py/any/meta.t.payload:# meta iifname != "dummy0"
tests/py/any/meta.t.payload:# meta iifname {"dummy0", "lo"}
tests/py/any/meta.t.payload:# meta iifname "dummy*"
tests/py/any/meta.t.payload:# meta iifname "dummy\*"
tests/py/any/meta.t.payload:# meta oifname "dummy0"
tests/py/any/meta.t.payload:# meta oifname != "dummy0"
tests/py/any/meta.t.payload:# meta oifname { "dummy0", "lo"}
tests/py/any/meta.t.payload:# meta oifname "dummy*"
tests/py/any/meta.t.payload:# meta oifname "dummy\*"
tests/py/any/meta.t.payload:# meta oifname "dummy2" accept
tests/py/nft-test.py:    modprobe('dummy')

all the "dummy" usages are from iifname/oifname, which uses the
interface name as a string and doesn't care about the interface
actually existing.

The nft-test.py script will segfault in systems where the dummy kernel
module isn't present, so the testsuite itself will fail:

Traceback (most recent call last):
  File "./nft-test.py", line 1057, in <module>
    main()
  File "./nft-test.py", line 995, in main
    modprobe('dummy')
  File "./nft-test.py", line 135, in modprobe
    ret = subprocess.call(cmds['del' if remove else 'ins']) == 0
  File "/usr/lib/python2.7/subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

I can't find a reason to keep this code, Should we revert the commit?

regards.

             reply	other threads:[~2016-11-17 17:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 14:47 Arturo Borrero Gonzalez [this message]
2016-11-17 22:15 ` [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622 Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOkSjBgU9j+78-T+648ytWd3RhC7Ce+dAT1PBTNKKS0o5V_pnA@mail.gmail.com \
    --to=arturo@debian.org \
    --cc=fw@strlen.de \
    --cc=manuel.johannes.messner@hs-furtwangen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.