Clean up clunky eval strings
- Remove unnecessary \ at EOL - This allows to omit ; too - Remove unnecessary quotes for arguments of atf_set - Don't expand $DEBUG in eval - We expect it's expanded on execution Suggested by kre@
This commit is contained in:
parent
2e797675fd
commit
3f30ca4e9f
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_basic.sh,v 1.6 2017/05/18 06:34:48 ozaki-r Exp $
|
||||
# $NetBSD: t_basic.sh,v 1.7 2017/08/03 03:16:26 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -333,22 +333,22 @@ add_test_case()
|
|||
fi
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
$expected_failure_code \
|
||||
test_carp_handover_${ipproto} $halt $carpdevip; \
|
||||
if [ $halt != halt ]; then \
|
||||
rump_server_destroy_ifaces; \
|
||||
fi \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
${name}_body() {
|
||||
$expected_failure_code
|
||||
test_carp_handover_${ipproto} $halt $carpdevip
|
||||
if [ $halt != halt ]; then
|
||||
rump_server_destroy_ifaces
|
||||
fi
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_gif.sh,v 1.10 2017/05/26 01:14:38 ozaki-r Exp $
|
||||
# $NetBSD: t_gif.sh,v 1.11 2017/08/03 03:16:26 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2015 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -727,19 +727,19 @@ add_test()
|
|||
fulldesc="Does ${inner} over ${outer} if_gif ${desc}"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval "${name}_head() { \
|
||||
atf_set \"descr\" \"${fulldesc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
${category}_setup ${inner} ${outer}; \
|
||||
${category}_test ${inner} ${outer}; \
|
||||
${category}_teardown ${inner} ${outer}; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
eval "${name}_head() {
|
||||
atf_set descr \"${fulldesc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
${name}_body() {
|
||||
${category}_setup ${inner} ${outer}
|
||||
${category}_test ${inner} ${outer}
|
||||
${category}_teardown ${inner} ${outer}
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_l2tp.sh,v 1.2 2017/02/17 00:51:25 ozaki-r Exp $
|
||||
# $NetBSD: t_l2tp.sh,v 1.3 2017/08/03 03:16:26 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -405,19 +405,19 @@ add_test()
|
|||
fulldesc="Does ${lan_mode} over ${wan_mode} if_l2tp ${desc}"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval "${name}_head() { \
|
||||
atf_set \"descr\" \"${fulldesc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
${category}_setup ${lan_mode} ${wan_mode}; \
|
||||
${category}_test ${lan_mode} ${wan_mode}; \
|
||||
${category}_teardown ${lan_mode} ${wan_mode}; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
eval "${name}_head() {
|
||||
atf_set descr \"${fulldesc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
${name}_body() {
|
||||
${category}_setup ${lan_mode} ${wan_mode}
|
||||
${category}_test ${lan_mode} ${wan_mode}
|
||||
${category}_teardown ${lan_mode} ${wan_mode}
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_ah_keys.sh,v 1.1 2017/04/14 02:56:49 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_ah_keys.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -73,18 +73,18 @@ add_test_valid_keys()
|
|||
desc="Tests AH ($aalgo) valid keys"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_ah_valid_keys_common $aalgo; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_ah_valid_keys_common $aalgo
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_esp_keys.sh,v 1.1 2017/04/14 02:56:49 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_esp_keys.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -73,18 +73,18 @@ add_test_valid_keys()
|
|||
desc="Tests ESP ($ealgo) valid keys"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_esp_valid_keys_common $ealgo; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_esp_valid_keys_common $ealgo
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_gif.sh,v 1.6 2017/06/14 02:33:37 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_gif.sh,v 1.7 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -388,19 +388,19 @@ add_test_ipsec_gif()
|
|||
desc="Tests of gif/IPsec ($ipproto) ${mode} mode with $proto ($algo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_ipsec_gif_common $ipproto $mode $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_ipsec_gif_common $ipproto $mode $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_l2tp.sh,v 1.6 2017/06/14 02:33:37 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_l2tp.sh,v 1.7 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -374,19 +374,19 @@ add_test_ipsec_l2tp()
|
|||
desc="Tests of l2tp/IPsec ($ipproto) ${mode} mode with $proto ($algo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_ipsec_l2tp_common $ipproto $mode $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_ipsec_l2tp_common $ipproto $mode $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_misc.sh,v 1.17 2017/08/02 06:30:00 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_misc.sh,v 1.18 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -277,19 +277,19 @@ add_test_lifetime()
|
|||
desc="Tests of lifetime of IPsec ($ipproto) with $proto ($algo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_lifetime_common $ipproto $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_lifetime_common $ipproto $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
@ -345,19 +345,19 @@ add_test_update()
|
|||
name="ipsec_update_${update}_${proto}_${_algo}"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_update $proto $algo $update; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_update $proto $algo $update
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
@ -597,19 +597,19 @@ add_test_spi()
|
|||
name="ipsec_spi_${proto}_${_algo}_preferred_${preferred}_${method}"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_spi $proto $algo $preferred $method; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_spi $proto $algo $preferred $method
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
@ -683,19 +683,19 @@ add_test_nosa()
|
|||
name="ipsec_nosa_${proto}_${_algo}"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_nosa $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_nosa $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_sockopt.sh,v 1.1 2017/08/02 02:19:56 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_sockopt.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -354,19 +354,19 @@ add_test_IP_IPSEC_POLICY()
|
|||
desc="Tests of IP_IPSEC_POLICY socket option (${ipproto}, ${proto}, ${_algo})"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_IP_IPSEC_POLICY_common $ipproto $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_IP_IPSEC_POLICY_common $ipproto $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_tcp.sh,v 1.1 2017/07/18 02:16:07 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_tcp.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -261,19 +261,19 @@ add_test_tcp()
|
|||
fi
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_tcp_${ipproto} $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_tcp_${ipproto} $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_transport.sh,v 1.5 2017/07/03 06:01:16 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_transport.sh,v 1.6 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -240,19 +240,19 @@ add_test_transport_mode()
|
|||
desc="Tests of IPsec ($ipproto) transport mode with $proto ($algo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_transport_common $ipproto $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_transport_common $ipproto $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_tunnel.sh,v 1.8 2017/05/12 02:34:45 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_tunnel.sh,v 1.9 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -287,19 +287,19 @@ add_test_tunnel_mode()
|
|||
desc="Tests of IPsec ($ipproto) tunnel mode with $proto ($algo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_tunnel_common $ipproto $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_tunnel_common $ipproto $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_tunnel_ipcomp.sh,v 1.1 2017/07/03 06:01:16 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_tunnel_ipcomp.sh,v 1.2 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -374,19 +374,19 @@ add_test_tunnel_mode()
|
|||
desc="Tests of IPsec ($ipproto) tunnel mode with $proto ($algo) and ipcomp ($calgo)"
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_tunnel_ipcomp_common $ipproto $proto $algo $calgo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_tunnel_ipcomp_common $ipproto $proto $algo $calgo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipsec_tunnel_odd.sh,v 1.2 2017/05/12 02:34:45 ozaki-r Exp $
|
||||
# $NetBSD: t_ipsec_tunnel_odd.sh,v 1.3 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2017 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -303,19 +303,19 @@ add_test_tunnel_mode()
|
|||
fi
|
||||
|
||||
atf_test_case ${name} cleanup
|
||||
eval " \
|
||||
${name}_head() { \
|
||||
atf_set \"descr\" \"$desc\"; \
|
||||
atf_set \"require.progs\" \"rump_server\" \"setkey\"; \
|
||||
}; \
|
||||
${name}_body() { \
|
||||
test_tunnel_common $ipproto $proto $algo; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
} \
|
||||
eval "
|
||||
${name}_head() {
|
||||
atf_set descr \"$desc\"
|
||||
atf_set require.progs rump_server setkey
|
||||
}
|
||||
${name}_body() {
|
||||
test_tunnel_common $ipproto $proto $algo
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}
|
||||
"
|
||||
atf_add_test_case ${name}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_mcast.sh,v 1.5 2017/02/28 09:23:23 ozaki-r Exp $
|
||||
# $NetBSD: t_mcast.sh,v 1.6 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -115,32 +115,32 @@ add_test()
|
|||
|
||||
fulldesc="Checks $desc"
|
||||
atf_test_case "mcast_${name}" cleanup
|
||||
eval "mcast_${name}_head() { \
|
||||
atf_set \"descr\" \"${fulldesc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
mcast_${name}_body() { \
|
||||
run_test \"${name}\" \"${opts}\"; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
mcast_${name}_cleanup() { \
|
||||
${DEBUG} && dump; \
|
||||
cleanup; \
|
||||
eval "mcast_${name}_head() {
|
||||
atf_set descr \"${fulldesc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
mcast_${name}_body() {
|
||||
run_test ${name} \"${opts}\"
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
mcast_${name}_cleanup() {
|
||||
\${DEBUG} && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case "mcast_${name}"
|
||||
|
||||
fulldesc="Destroying interface while testing ${desc}"
|
||||
atf_test_case "mcast_destroyif_${name}" cleanup
|
||||
eval "mcast_destroyif_${name}_head() { \
|
||||
atf_set \"descr\" \"${fulldesc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
mcast_destroyif_${name}_body() { \
|
||||
run_test_destroyif \"${name}\" \"${opts}\"; \
|
||||
}; \
|
||||
mcast_destroyif_${name}_cleanup() { \
|
||||
${DEBUG} && dump; \
|
||||
cleanup; \
|
||||
eval "mcast_destroyif_${name}_head() {
|
||||
atf_set descr \"${fulldesc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
mcast_destroyif_${name}_body() {
|
||||
run_test_destroyif ${name} \"${opts}\"
|
||||
}
|
||||
mcast_destroyif_${name}_cleanup() {
|
||||
\${DEBUG} && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case "mcast_destroyif_${name}"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_ipaddress.sh,v 1.10 2017/02/20 09:00:08 ozaki-r Exp $
|
||||
# $NetBSD: t_ipaddress.sh,v 1.11 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2015 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -170,16 +170,16 @@ add_test()
|
|||
local desc="$2"
|
||||
|
||||
atf_test_case "ipaddr_${name}" cleanup
|
||||
eval "ipaddr_${name}_head() { \
|
||||
atf_set \"descr\" \"${desc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
ipaddr_${name}_body() { \
|
||||
test_${name}; \
|
||||
}; \
|
||||
ipaddr_${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
eval "ipaddr_${name}_head() {
|
||||
atf_set descr \"${desc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
ipaddr_${name}_body() {
|
||||
test_${name}
|
||||
}
|
||||
ipaddr_${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case "ipaddr_${name}"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_npf.sh,v 1.2 2012/09/18 08:28:15 martin Exp $
|
||||
# $NetBSD: t_npf.sh,v 1.3 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -39,12 +39,12 @@ add_test()
|
|||
local desc="${*}";
|
||||
|
||||
atf_test_case "npf_${name}"
|
||||
eval "npf_${name}_head() { \
|
||||
atf_set \"descr\" \"${desc}\"; \
|
||||
atf_set \"require.progs\" \"npfctl npftest\"; \
|
||||
}; \
|
||||
npf_${name}_body() { \
|
||||
run_test \"${name}\"; \
|
||||
eval "npf_${name}_head() {
|
||||
atf_set descr \"${desc}\"
|
||||
atf_set require.progs npfctl npftest
|
||||
}
|
||||
npf_${name}_body() {
|
||||
run_test ${name}
|
||||
}"
|
||||
atf_add_test_case "npf_${name}"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_flags.sh,v 1.19 2017/06/30 07:57:12 ozaki-r Exp $
|
||||
# $NetBSD: t_flags.sh,v 1.20 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2015 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
|
@ -322,19 +322,19 @@ add_test()
|
|||
local desc="$2"
|
||||
|
||||
atf_test_case "route_flags_${name}" cleanup
|
||||
eval "route_flags_${name}_head() { \
|
||||
atf_set \"descr\" \"${desc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
route_flags_${name}_body() { \
|
||||
setup_local; \
|
||||
setup_peer; \
|
||||
test_${name}; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
route_flags_${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
eval "route_flags_${name}_head() {
|
||||
atf_set descr \"${desc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
route_flags_${name}_body() {
|
||||
setup_local
|
||||
setup_peer
|
||||
test_${name}
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
route_flags_${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case "route_flags_${name}"
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: t_flags6.sh,v 1.15 2017/06/30 07:57:12 ozaki-r Exp $
|
||||
# $NetBSD: t_flags6.sh,v 1.16 2017/08/03 03:16:27 ozaki-r Exp $
|
||||
#
|
||||
# Copyright (c) 2016 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -261,19 +261,19 @@ add_test()
|
|||
local desc="$2"
|
||||
|
||||
atf_test_case "route_flags_${name}" cleanup
|
||||
eval "route_flags_${name}_head() { \
|
||||
atf_set \"descr\" \"${desc}\"; \
|
||||
atf_set \"require.progs\" \"rump_server\"; \
|
||||
}; \
|
||||
route_flags_${name}_body() { \
|
||||
setup_local; \
|
||||
setup_peer; \
|
||||
test_${name}; \
|
||||
rump_server_destroy_ifaces; \
|
||||
}; \
|
||||
route_flags_${name}_cleanup() { \
|
||||
$DEBUG && dump; \
|
||||
cleanup; \
|
||||
eval "route_flags_${name}_head() {
|
||||
atf_set descr \"${desc}\"
|
||||
atf_set require.progs rump_server
|
||||
}
|
||||
route_flags_${name}_body() {
|
||||
setup_local
|
||||
setup_peer
|
||||
test_${name}
|
||||
rump_server_destroy_ifaces
|
||||
}
|
||||
route_flags_${name}_cleanup() {
|
||||
\$DEBUG && dump
|
||||
cleanup
|
||||
}"
|
||||
atf_add_test_case "route_flags_${name}"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue