netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [conntrack-tools PATCH] tests: don't fail on modprobe since the driver might be built-in
@ 2017-08-15 12:54 Arturo Borrero Gonzalez
  2017-08-24 16:51 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero Gonzalez @ 2017-08-15 12:54 UTC (permalink / raw)
  To: netfilter-devel

From: Steve Langasek <steve.langasek@ubuntu.com>

Any of these nf drivers could be built-ins instead of modules; don't cause
the testsuite to fail on modprobe, instead let it proceed and succeed/fail
later based on actual test results.

Ideally we would check up front if the driver is loaded rather than trying
to modprobe and ignoring failures, but there doesn't seem to be a reliable
place to check this in the kernel filesystem.

Signed-off-by: Steve Langasek <steve.langasek@ubuntu.com>
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
---
 tests/conntrack/run-test.sh |   14 ++++++++------
 tests/nfct/run-test.sh      |   14 ++++++++------
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/tests/conntrack/run-test.sh b/tests/conntrack/run-test.sh
index 1403e2c..1c1f8e4 100644
--- a/tests/conntrack/run-test.sh
+++ b/tests/conntrack/run-test.sh
@@ -10,10 +10,12 @@ gcc test-conntrack.c -o test
 #
 # XXX: module auto-load not support by nfnetlink_cttimeout yet :-(
 #
-modprobe nf_conntrack_ipv4
-modprobe nf_conntrack_ipv6
-modprobe nf_conntrack_proto_udplite
-modprobe nf_conntrack_proto_sctp
-modprobe nf_conntrack_proto_dccp
-modprobe nf_conntrack_proto_gre
+# any or all of these might be built-ins rather than modules, so don't error
+# out on failure from modprobe
+modprobe nf_conntrack_ipv4 || true
+modprobe nf_conntrack_ipv6 || true
+modprobe nf_conntrack_proto_udplite || true
+modprobe nf_conntrack_proto_sctp || true
+modprobe nf_conntrack_proto_dccp || true
+modprobe nf_conntrack_proto_gre || true
 ./test testcases
diff --git a/tests/nfct/run-test.sh b/tests/nfct/run-test.sh
index 851ee75..f5f220b 100644
--- a/tests/nfct/run-test.sh
+++ b/tests/nfct/run-test.sh
@@ -11,10 +11,12 @@ gcc test.c -o test
 #
 # XXX: module auto-load not support by nfnetlink_cttimeout yet :-(
 #
-modprobe nf_conntrack_ipv4
-modprobe nf_conntrack_ipv6
-modprobe nf_conntrack_proto_udplite
-modprobe nf_conntrack_proto_sctp
-modprobe nf_conntrack_proto_dccp
-modprobe nf_conntrack_proto_gre
+# any or all of these might be built-ins rather than modules, so don't error
+# out on failure from modprobe
+modprobe nf_conntrack_ipv4 || true
+modprobe nf_conntrack_ipv6 || true
+modprobe nf_conntrack_proto_udplite || true
+modprobe nf_conntrack_proto_sctp || true
+modprobe nf_conntrack_proto_dccp || true
+modprobe nf_conntrack_proto_gre || true
 ./test timeout


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

* Re: [conntrack-tools PATCH] tests: don't fail on modprobe since the driver might be built-in
  2017-08-15 12:54 [conntrack-tools PATCH] tests: don't fail on modprobe since the driver might be built-in Arturo Borrero Gonzalez
@ 2017-08-24 16:51 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-08-24 16:51 UTC (permalink / raw)
  To: Arturo Borrero Gonzalez; +Cc: netfilter-devel

On Tue, Aug 15, 2017 at 02:54:18PM +0200, Arturo Borrero Gonzalez wrote:
> From: Steve Langasek <steve.langasek@ubuntu.com>
> 
> Any of these nf drivers could be built-ins instead of modules; don't cause
> the testsuite to fail on modprobe, instead let it proceed and succeed/fail
> later based on actual test results.
> 
> Ideally we would check up front if the driver is loaded rather than trying
> to modprobe and ignoring failures, but there doesn't seem to be a reliable
> place to check this in the kernel filesystem.
> 
> Signed-off-by: Steve Langasek <steve.langasek@ubuntu.com>
> Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>

Applied, thanks Arturo.

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

end of thread, other threads:[~2017-08-24 16:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-15 12:54 [conntrack-tools PATCH] tests: don't fail on modprobe since the driver might be built-in Arturo Borrero Gonzalez
2017-08-24 16:51 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).