xref: /aosp_15_r20/external/ltp/testcases/network/stress/sctp/sctp_ipsec.sh (revision 49cdfc7efb34551c7342be41a7384b9c40d7cab7)
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2018-2022 Petr Vorel <[email protected]>
4# Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
5# Author: Alexey Kodanev <[email protected]>
6
7TST_NEEDS_TMPDIR=1
8TST_TESTFUNC=do_test
9TST_SETUP=tst_ipsec_setup
10TST_CLEANUP=tst_ipsec_cleanup
11
12do_test()
13{
14	local opts="-n $2 -N $2"
15	local rand_opt="$(echo $2 | cut -d'R' -f2)"
16
17	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
18	tst_netload -H $(tst_ipaddr rhost) -T sctp $opts \
19		-r $IPSEC_REQUESTS -S $(tst_ipaddr)
20}
21
22. ipsec_lib.sh
23tst_run
24