summaryrefslogtreecommitdiffstats
path: root/tests/nfct/run-test.sh
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2017-08-15 14:54:18 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-08-24 18:50:45 +0200
commit0c77a25a566efd65380fd7ec92fea3182267bced (patch)
treeb63cb59ab4eb656f3e6c9731f32250fd4f436905 /tests/nfct/run-test.sh
parentbc0b49ab65369916e93fdde9025c0dbdfff9e33a (diff)
tests: don't fail on modprobe since the driver might be built-in
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> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/nfct/run-test.sh')
-rw-r--r--tests/nfct/run-test.sh14
1 files changed, 8 insertions, 6 deletions
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