]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
tests/shell: Speed up ipt-restore/0004-restore-race_0
authorPhil Sutter <phil@nwl.cc>
Tue, 3 Sep 2019 13:22:39 +0000 (15:22 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 26 Sep 2019 08:41:12 +0000 (10:41 +0200)
This test tended to cause quite excessive load on my system, sometimes
taking longer than all other tests combined. Even with the reduced
numbers, it still fails reliably after reverting commit 58d7de0181f61
("xtables: handle concurrent ruleset modifications").

Fixes: 4000b4cf2ea38 ("tests: add test script for race-free restore")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: Florian Westphal <fw@strlen.de>
iptables/tests/shell/testcases/ipt-restore/0004-restore-race_0

index a92d18dcee0588b4e9f1bb98391122c0874f8b11..96a5e66d0ab81440e07daac592e530b6fb7102b0 100755 (executable)
@@ -24,7 +24,7 @@ clean_tempfile()
 
 trap clean_tempfile EXIT
 
-ENTRY_NUM=$((RANDOM%100))
+ENTRY_NUM=$((RANDOM%10))
 UCHAIN_NUM=$((RANDOM%10))
 
 get_target()
@@ -87,7 +87,7 @@ fi
 
 case "$XT_MULTI" in
 */xtables-nft-multi)
-       attempts=$((RANDOM%200))
+       attempts=$((RANDOM%10))
        attempts=$((attempts+1))
        ;;
 *)