1 #!/bin/sh 2 # Copyright (c) 2017 Oracle and/or its affiliates. All Rights Reserved. 3 # Copyright (c) International Business Machines Corp., 2000 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 TCID="rup01" 19 TST_TOTAL=7 20 21 . test_net.sh 22 23 do_setup() 24 { 25 tst_resm TINFO "Checking for rstatd on $(tst_ipaddr)" 26 rpcinfo -u $(tst_ipaddr) rstatd 3 > /dev/null 2>&1 || \ 27 tst_brkm TCONF "rstatd is inactive on $(tst_ipaddr)" 28 } 29 30 do_test() 31 { 32 tst_resm TINFO "Test rup with options set" 33 34 EXPECT_RHOST_PASS rup $(tst_ipaddr) 35 36 local opts="-d -h -l -t" 37 for opt in $opts; do 38 EXPECT_RHOST_PASS rup $opt $(tst_ipaddr) 39 done 40 41 tst_resm TINFO "Test rup with bad options" 42 EXPECT_RHOST_FAIL rup bogushost 43 EXPECT_RHOST_FAIL rup -bogusflag $(tst_ipaddr) 44 } 45 46 do_setup 47 do_test 48 49 tst_exit 50