1#!/bin/sh 2# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz> 3# Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. 4# Copyright (c) International Business Machines Corp., 2000 5 6TST_TESTFUNC=do_test 7TST_SETUP=do_setup 8TST_CLEANUP=do_cleanup 9TST_NEEDS_CMDS="pkill rpcinfo" 10. rpc_lib.sh 11 12NUMLOOPS=${NUMLOOPS:-3} 13DATAFILES="${DATAFILES:-file.1 file.2}" 14 15do_cleanup() 16{ 17 pkill -9 rpc_server > /dev/null 2>&1 18} 19 20do_setup() 21{ 22 check_portmap_rpcbind 23 24 tst_res TINFO "start rpc_server" 25 ROD rpc_server 26 27 tst_res TINFO "wait for server to be registered" 28 for i in $(seq 1 30); do 29 rpcinfo -T udp $(tst_ipaddr) 2000333 10 >/dev/null 2>&1 && break 30 [ "$i" -eq 30 ] && tst_brk TBROK "server not registered" 31 tst_sleep 100ms 32 done 33} 34 35do_test() 36{ 37 tst_res TINFO "starting client process" 38 39 local cnt=1 40 while [ $cnt -le $NUMLOOPS ]; do 41 for f in $DATAFILES; do 42 EXPECT_RHOST_PASS rpc1 -s $(tst_ipaddr) -f $TST_DATAROOT/$f 43 done 44 cnt=$(($cnt + 1)) 45 done 46} 47 48tst_run 49