mcast-group-multiple-socket 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. # Copyright (c) 2017-2018 Petr Vorel <pvorel@suse.cz>
  3. # Copyright (c) International Business Machines Corp., 2006
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the GNU General Public License as
  7. # published by the Free Software Foundation; either version 2 of
  8. # the License, or (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it would be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. #
  18. # Setup: testcases/network/stress/README
  19. #
  20. # Author: Mitsuru Chinen <mitch@jp.ibm.com>
  21. . mcast-lib.sh
  22. do_setup()
  23. {
  24. # Increase the maximum number of open file descriptors
  25. if [ $(ulimit -n) -lt $MCASTNUM_HEAVY ]; then
  26. ulimit -n $MCASTNUM_HEAVY || tst_brk TCONF \
  27. "Failed to set the maximum number of open file descriptors to $MCASTNUM_HEAVY"
  28. fi
  29. mcast_setup $MCASTNUM_HEAVY
  30. }
  31. do_test()
  32. {
  33. tst_res TINFO "joining $MCASTNUM_HEAVY IPv$TST_IPVER multicast groups on multiple sockets"
  34. do_multicast_test_multiple_join $MCASTNUM_HEAVY true
  35. }
  36. tst_run