bind_noport01.sh 694 B

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