diff mbox series

selftests/bpf: add config fragment CONFIG_NF_NAT_IPV6

Message ID 1543483911-8955-1-git-send-email-naresh.kamboju@linaro.org
State New
Headers show
Series selftests/bpf: add config fragment CONFIG_NF_NAT_IPV6 | expand

Commit Message

Naresh Kamboju Nov. 29, 2018, 9:31 a.m. UTC
CONFIG_NF_NAT_IPV6=y is required for bpf test_sockmap test case
Fixes,
ip6tables v1.6.1: can't initialize ip6tables table `nat': Table does
not exist

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>

---
 tools/testing/selftests/bpf/config | 1 +
 1 file changed, 1 insertion(+)

-- 
2.17.1

Comments

Paolo Abeni Nov. 29, 2018, 9:49 a.m. UTC | #1
Hi,

On Thu, 2018-11-29 at 15:01 +0530, Naresh Kamboju wrote:
> CONFIG_NF_NAT_IPV6=y is required for bpf test_sockmap test case

> Fixes,

> ip6tables v1.6.1: can't initialize ip6tables table `nat': Table does

> not exist

> 

> Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>

> ---

>  tools/testing/selftests/bpf/config | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config

> index 37f947ec44ed..d7076cf04a9d 100644

> --- a/tools/testing/selftests/bpf/config

> +++ b/tools/testing/selftests/bpf/config

> @@ -23,3 +23,4 @@ CONFIG_LWTUNNEL=y

>  CONFIG_BPF_STREAM_PARSER=y

>  CONFIG_XDP_SOCKETS=y

>  CONFIG_FTRACE_SYSCALLS=y

> +CONFIG_NF_NAT_IPV6=y


AFAIK, the selftest Kconfig infra does not pull dependant CONFIG items 
('depends on '...) automatically: if the bpf test_sockmap test needs
CONFIG_NF_NAT_IPV6, you should also include non trivial chain of deps
up to whatever is currently explicitly requested.

On the other side, the self-tests already pull CONFIG_NF_NAT_IPV6=m for
'net' related tests, so if you run:

make kselftest-merge

before compiling the kernel for self-tests (which is AFAIK a mandatory
step) you should not get the reported error. Did you performed the
above step?

Cheers,

Paolo
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 37f947ec44ed..d7076cf04a9d 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -23,3 +23,4 @@  CONFIG_LWTUNNEL=y
 CONFIG_BPF_STREAM_PARSER=y
 CONFIG_XDP_SOCKETS=y
 CONFIG_FTRACE_SYSCALLS=y
+CONFIG_NF_NAT_IPV6=y