Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net/ipsec The ATF design is O(N^2) in the number of TC...



details:   https://anonhg.NetBSD.org/src/rev/cb3f228b3c34
branches:  trunk
changeset: 376214:cb3f228b3c34
user:      chs <chs%NetBSD.org@localhost>
date:      Sun Jun 04 22:18:47 2023 +0000

description:
The ATF design is O(N^2) in the number of TCs in one TP, which on some
slower platforms causes the net/ipsec tests to take as much as 30% of
the total time to run all of the ATF tests.  Reduce the number of TCs
in various net/ipsec TPs by iterating over *_ALGORITHMS_MINIMUM rather
than *_ALGORITHMS.  Various of the net/ipsec tests already use the
smaller lists, so change the rest of them to do so as well.

diffstat:

 tests/net/ipsec/t_ipsec_ah_keys.sh       |  4 ++--
 tests/net/ipsec/t_ipsec_esp_keys.sh      |  4 ++--
 tests/net/ipsec/t_ipsec_transport.sh     |  8 ++++----
 tests/net/ipsec/t_ipsec_tunnel.sh        |  6 +++---
 tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh |  4 ++--
 tests/net/ipsec/t_ipsec_tunnel_odd.sh    |  6 +++---
 6 files changed, 16 insertions(+), 16 deletions(-)

diffs (130 lines):

diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_ah_keys.sh
--- a/tests/net/ipsec/t_ipsec_ah_keys.sh        Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_ah_keys.sh        Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_ah_keys.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_ah_keys.sh,v 1.3 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -152,7 +152,7 @@ add_test_invalid_keys()
 atf_init_test_cases()
 {
 
-       for aalgo in $AH_AUTHENTICATION_ALGORITHMS; do
+       for aalgo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
                add_test_valid_keys $aalgo
                add_test_invalid_keys $aalgo
        done
diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_esp_keys.sh
--- a/tests/net/ipsec/t_ipsec_esp_keys.sh       Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_esp_keys.sh       Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_esp_keys.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_esp_keys.sh,v 1.3 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -152,7 +152,7 @@ add_test_invalid_keys()
 atf_init_test_cases()
 {
 
-       for ealgo in $ESP_ENCRYPTION_ALGORITHMS; do
+       for ealgo in $ESP_ENCRYPTION_ALGORITHMS_MINIMUM; do
                add_test_valid_keys $ealgo
                add_test_invalid_keys $ealgo
        done
diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_transport.sh
--- a/tests/net/ipsec/t_ipsec_transport.sh      Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_transport.sh      Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_transport.sh,v 1.6 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_transport.sh,v 1.7 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -261,15 +261,15 @@ atf_init_test_cases()
 {
        local algo=
 
-       for algo in $ESP_ENCRYPTION_ALGORITHMS; do
+       for algo in $ESP_ENCRYPTION_ALGORITHMS_MINIMUM; do
                add_test_transport_mode ipv4 esp $algo
                add_test_transport_mode ipv6 esp $algo
        done
-       for algo in $AH_AUTHENTICATION_ALGORITHMS; do
+       for algo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
                add_test_transport_mode ipv4 ah $algo
                add_test_transport_mode ipv6 ah $algo
        done
-       for algo in $IPCOMP_COMPRESSION_ALGORITHMS; do
+       for algo in $IPCOMP_COMPRESSION_ALGORITHMS_MINIMUM; do
                add_test_transport_mode ipv4 ipcomp $algo
                add_test_transport_mode ipv6 ipcomp $algo
        done
diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_tunnel.sh
--- a/tests/net/ipsec/t_ipsec_tunnel.sh Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_tunnel.sh Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_tunnel.sh,v 1.9 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_tunnel.sh,v 1.10 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -308,12 +308,12 @@ atf_init_test_cases()
 {
        local algo=
 
-       for algo in $ESP_ENCRYPTION_ALGORITHMS; do
+       for algo in $ESP_ENCRYPTION_ALGORITHMS_MINIMUM; do
                add_test_tunnel_mode ipv4 esp $algo
                add_test_tunnel_mode ipv6 esp $algo
        done
 
-       for algo in $AH_AUTHENTICATION_ALGORITHMS; do
+       for algo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
                add_test_tunnel_mode ipv4 ah $algo
                add_test_tunnel_mode ipv6 ah $algo
        done
diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh
--- a/tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh  Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_tunnel_ipcomp.sh  Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_tunnel_ipcomp.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_tunnel_ipcomp.sh,v 1.3 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -395,7 +395,7 @@ atf_init_test_cases()
 {
        local calgo= algo=
 
-       for calgo in $IPCOMP_COMPRESSION_ALGORITHMS; do
+       for calgo in $IPCOMP_COMPRESSION_ALGORITHMS_MINIMUM; do
                for algo in $ESP_ENCRYPTION_ALGORITHMS_MINIMUM; do
                        add_test_tunnel_mode ipv4 esp $algo $calgo
                        add_test_tunnel_mode ipv6 esp $algo $calgo
diff -r 7196bb973975 -r cb3f228b3c34 tests/net/ipsec/t_ipsec_tunnel_odd.sh
--- a/tests/net/ipsec/t_ipsec_tunnel_odd.sh     Sun Jun 04 20:51:19 2023 +0000
+++ b/tests/net/ipsec/t_ipsec_tunnel_odd.sh     Sun Jun 04 22:18:47 2023 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_ipsec_tunnel_odd.sh,v 1.3 2017/08/03 03:16:27 ozaki-r Exp $
+#      $NetBSD: t_ipsec_tunnel_odd.sh,v 1.4 2023/06/04 22:18:47 chs Exp $
 #
 # Copyright (c) 2017 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -324,12 +324,12 @@ atf_init_test_cases()
 {
        local algo=
 
-       for algo in $ESP_ENCRYPTION_ALGORITHMS; do
+       for algo in $ESP_ENCRYPTION_ALGORITHMS_MINIMUM; do
                add_test_tunnel_mode v4v6 esp $algo
                add_test_tunnel_mode v6v4 esp $algo
        done
 
-       for algo in $AH_AUTHENTICATION_ALGORITHMS; do
+       for algo in $AH_AUTHENTICATION_ALGORITHMS_MINIMUM; do
                add_test_tunnel_mode v4v6 ah $algo
                add_test_tunnel_mode v6v4 ah $algo
        done



Home | Main Index | Thread Index | Old Index