1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) 2018 Oracle and/or its affiliates. 4 5TST_CNT=2 6TST_TESTFUNC="test" 7TST_MIN_KVER="4.2" 8TST_NEEDS_TMPDIR=1 9TST_TEST_DATA="tcp udp udp_lite dccp" 10 11 12test1() 13{ 14 local type="$2" 15 16 tst_res TINFO "test IP_BIND_ADDRESS_NO_PORT with $type socket" 17 # when using '-S' parameter, netstress sets IP_BIND_ADDRESS_NO_PORT 18 tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost) 19} 20 21test2() 22{ 23 local type="$2" 24 local rsize="65000" 25 26 [ "$type" = "dccp" ] && rsize=1300 27 28 tst_res TINFO "test bind() with $type socket and random size payload" 29 tst_netload -T $type -S $(tst_ipaddr) -H $(tst_ipaddr rhost) -A $rsize 30} 31 32 33. tst_net.sh 34tst_run 35