1f08c3bdfSopenharmony_ci#!/bin/sh 2f08c3bdfSopenharmony_ci# SPDX-License-Identifier: GPL-2.0-or-later 3f08c3bdfSopenharmony_ci# Copyright (c) 2017-2018 Petr Vorel <pvorel@suse.cz> 4f08c3bdfSopenharmony_ci# Copyright (c) International Business Machines Corp., 2006 5f08c3bdfSopenharmony_ci# Author: Mitsuru Chinen <mitch@jp.ibm.com> 6f08c3bdfSopenharmony_ci 7f08c3bdfSopenharmony_ciTST_NEEDS_ROOT=1 8f08c3bdfSopenharmony_ciTST_NEEDS_TMPDIR=1 9f08c3bdfSopenharmony_ciTST_SETUP="do_setup" 10f08c3bdfSopenharmony_ciTST_CLEANUP="mcast_cleanup" 11f08c3bdfSopenharmony_ciTST_TESTFUNC="do_test" 12f08c3bdfSopenharmony_ci 13f08c3bdfSopenharmony_cido_setup() 14f08c3bdfSopenharmony_ci{ 15f08c3bdfSopenharmony_ci # Increase the maximum number of open file descriptors 16f08c3bdfSopenharmony_ci if [ $(ulimit -n) -lt $MCASTNUM_HEAVY ]; then 17f08c3bdfSopenharmony_ci ulimit -n $MCASTNUM_HEAVY || tst_brk TCONF \ 18f08c3bdfSopenharmony_ci "Failed to set the maximum number of open file descriptors to $MCASTNUM_HEAVY" 19f08c3bdfSopenharmony_ci fi 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_ci mcast_setup $MCASTNUM_HEAVY 22f08c3bdfSopenharmony_ci} 23f08c3bdfSopenharmony_ci 24f08c3bdfSopenharmony_cido_test() 25f08c3bdfSopenharmony_ci{ 26f08c3bdfSopenharmony_ci tst_res TINFO "joining $MCASTNUM_HEAVY IPv$TST_IPVER multicast groups on multiple sockets" 27f08c3bdfSopenharmony_ci do_multicast_test_multiple_join $MCASTNUM_HEAVY true 28f08c3bdfSopenharmony_ci} 29f08c3bdfSopenharmony_ci 30f08c3bdfSopenharmony_ci. mcast-lib.sh 31f08c3bdfSopenharmony_citst_run 32