[nft] about commit 3e5b0e406cf2b635200f9ee05ba8a158528fe622

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

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux