xref: /third_party/ltp/testcases/network/stress/udp/udp_ipsec.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/ltp/testcases/network/stress/udp/
1f08c3bdfSopenharmony_ci#!/bin/sh
2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later
3f08c3bdfSopenharmony_ci# Copyright (c) 2018-2022 Petr Vorel <pvorel@suse.cz>
4f08c3bdfSopenharmony_ci# Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved.
5f08c3bdfSopenharmony_ci# Author: Alexey Kodanev <alexey.kodanev@oracle.com>
6f08c3bdfSopenharmony_ci
7f08c3bdfSopenharmony_ciTST_NEEDS_TMPDIR=1
8f08c3bdfSopenharmony_ciTST_TESTFUNC=do_test
9f08c3bdfSopenharmony_ciTST_SETUP=tst_ipsec_setup
10f08c3bdfSopenharmony_ciTST_CNT=2
11f08c3bdfSopenharmony_ciTST_CLEANUP=tst_ipsec_cleanup
12f08c3bdfSopenharmony_ci
13f08c3bdfSopenharmony_cido_test()
14f08c3bdfSopenharmony_ci{
15f08c3bdfSopenharmony_ci	local opts="-n $2 -N $2"
16f08c3bdfSopenharmony_ci	local rand_opt="$(echo $2 | cut -d'R' -f2)"
17f08c3bdfSopenharmony_ci	local type="udp"
18f08c3bdfSopenharmony_ci
19f08c3bdfSopenharmony_ci	[ $1 -eq 2 ] && type="udp_lite"
20f08c3bdfSopenharmony_ci	[ "$2" != "$rand_opt" ] && opts="-A $rand_opt"
21f08c3bdfSopenharmony_ci	tst_netload -H $(tst_ipaddr rhost) -T $type $opts -r $IPSEC_REQUESTS
22f08c3bdfSopenharmony_ci}
23f08c3bdfSopenharmony_ci
24f08c3bdfSopenharmony_ci. ipsec_lib.sh
25f08c3bdfSopenharmony_citst_run
26

Indexes created Thu Nov 07 10:32:03 CST 2024