1*49cdfc7eSAndroid Build Coastguard Worker#!/bin/sh 2*49cdfc7eSAndroid Build Coastguard Worker# SPDX-License-Identifier: GPL-2.0-or-later 3*49cdfc7eSAndroid Build Coastguard Worker# Copyright (c) 2017-2018 Oracle and/or its affiliates. All Rights Reserved. 4*49cdfc7eSAndroid Build Coastguard Worker# Author: Alexey Kodanev <[email protected]> 5*49cdfc7eSAndroid Build Coastguard Worker 6*49cdfc7eSAndroid Build Coastguard WorkerTST_TESTFUNC="test" 7*49cdfc7eSAndroid Build Coastguard WorkerTST_NEEDS_TMPDIR=1 8*49cdfc7eSAndroid Build Coastguard WorkerTST_NEEDS_ROOT=1 9*49cdfc7eSAndroid Build Coastguard WorkerTST_TEST_DATA=",-A 65000" 10*49cdfc7eSAndroid Build Coastguard WorkerTST_TEST_DATA_IFS="," 11*49cdfc7eSAndroid Build Coastguard Worker 12*49cdfc7eSAndroid Build Coastguard Worker 13*49cdfc7eSAndroid Build Coastguard Workertest() 14*49cdfc7eSAndroid Build Coastguard Worker{ 15*49cdfc7eSAndroid Build Coastguard Worker local opts="$2" 16*49cdfc7eSAndroid Build Coastguard Worker 17*49cdfc7eSAndroid Build Coastguard Worker tst_res TINFO "compare TCP/SCTP performance" 18*49cdfc7eSAndroid Build Coastguard Worker 19*49cdfc7eSAndroid Build Coastguard Worker tst_netload -H $(tst_ipaddr rhost) -T tcp -R 3 $opts 20*49cdfc7eSAndroid Build Coastguard Worker local res0="$(cat tst_netload.res)" 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Worker tst_netload -S $(tst_ipaddr) -H $(tst_ipaddr rhost) -T sctp -R 3 $opts 23*49cdfc7eSAndroid Build Coastguard Worker local res1="$(cat tst_netload.res)" 24*49cdfc7eSAndroid Build Coastguard Worker 25*49cdfc7eSAndroid Build Coastguard Worker tst_netload_compare $res0 $res1 -200 200 26*49cdfc7eSAndroid Build Coastguard Worker} 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard Worker. tst_net.sh 29*49cdfc7eSAndroid Build Coastguard Workertst_run 30