tests: don't fail on modprobe since the driver might be built-in
PATCH 1/1 tests: don't fail on modprobe since the driver might be built-in
From: Steve Langasek <[email protected]>
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.
--- tests/conntrack/run-test.sh | 14 ++++++++------ tests/nfct/run-test.sh | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-)
tests/conntrack/run-test.sh +8 -6
@@ -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
tests/nfct/run-test.sh +8 -6
@@ -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
Quoted 6 lines · Arturo Borrero Gonzalez
From: Steve Langasek <[email protected]>
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.
Quoted 6 lines
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 <[email protected]>Signed-off-by Arturo Borrero Gonzalez <[email protected]>
Applied, thanks Arturo.