All of lore.kernel.org
 help / color / mirror / Atom feed
* [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622
@ 2016-11-17 14:47 Arturo Borrero Gonzalez
  2016-11-17 22:15 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2016-11-17 14:47 UTC (permalink / raw)
  To: Netfilter Development Mailing list
  Cc: Manuel Johannes Messner, Florian Westphal, Pablo Neira Ayuso

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622
  2016-11-17 14:47 [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622 Arturo Borrero Gonzalez
@ 2016-11-17 22:15 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2016-11-17 22:15 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez
  Cc: Netfilter Development Mailing list, Manuel Johannes Messner,
	Florian Westphal, Pablo Neira Ayuso

Arturo Borrero Gonzalez <arturo@debian.org> wrote:
> Hi,
> 
> commit id 3e5b0e406cf2b635200f9ee05ba8a158528fe622 :

[..]

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

I pushed a revert, thanks Arturo.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-17 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-17 14:47 [nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622 Arturo Borrero Gonzalez
2016-11-17 22:15 ` Florian Westphal

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.