From 4de76d7f998ed7ef4698f4f5135457b4f58591a2 Mon Sep 17 00:00:00 2001 From: Arturo Borrero Date: Fri, 18 Mar 2016 09:41:31 +0100 Subject: 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 Signed-off-by: Arturo Borrero Gonzalez Tested-by: Piyush Pangtey Signed-off-by: Pablo Neira Ayuso --- tests/shell/run-tests.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/shell') 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 -- cgit v1.2.3