summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArturo Borrero <arturo.borrero.glez@gmail.com>2016-03-18 09:41:31 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2016-03-22 20:38:48 +0100
commit4de76d7f998ed7ef4698f4f5135457b4f58591a2 (patch)
treeefc3bdf1c8329d4695d9541ee26be3e067d2aee5 /tests
parent77a74837312ee4e453d379d5ea8bd5a823b4c6fe (diff)
tests/shell/run-tests.sh: tune kernel cleanup
The modprobe call can return != 0 if, for example, a module was builtin and we are triying to remove it, so force return code of 0 at the end of the script. This patch also adds the '-a' switch to modprobe so it doesn't stop unloading modules if one of them fails (for example, it was builtin). While at it, fix several module names, for example: 'nft_bridge_reject' vs 'nft_reject_bridge', delete bogus module names. Reported-by: Piyush Pangtey <gokuvsvegita@gmail.com> Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com> Tested-by: Piyush Pangtey <gokuvsvegita@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/shell/run-tests.sh11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
index c08a3eb6..620fe579 100755
--- a/tests/shell/run-tests.sh
+++ b/tests/shell/run-tests.sh
@@ -48,15 +48,13 @@ fi
kernel_cleanup() {
$NFT flush ruleset
- $MODPROBE -rq \
- nft_reject_ipv4 nft_reject_ipv6 nft_bridge_reject \
- nft_reject_ipv6 nft_reject \
+ $MODPROBE -raq \
+ nft_reject_ipv4 nft_reject_bridge nft_reject_ipv6 nft_reject \
nft_redir_ipv4 nft_redir_ipv6 nft_redir \
- nft_dup_ipv4 nft_dup_ipv6 nft_dup \
- nft_nat_ipv4 nft_nat_ipv6 nft_nat \
+ nft_dup_ipv4 nft_dup_ipv6 nft_dup nft_nat \
nft_masq_ipv4 nft_masq_ipv6 nft_masq \
nft_exthdr nft_payload nft_cmp \
- nft_meta nft_bridge_meta nft_counter nft_log nft_limit \
+ nft_meta nft_meta_bridge nft_counter nft_log nft_limit \
nft_hash nft_rbtree nft_ct nft_compat \
nf_tables_inet nf_tables_bridge nf_tables_arp \
nf_tables_ipv4 nf_tables_ipv6 nf_tables
@@ -91,3 +89,4 @@ echo ""
msg_info "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))"
kernel_cleanup
+exit 0