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 18TCID="rup01" 19TST_TOTAL=7 20 21TST_USE_LEGACY_API=1 22. tst_net.sh 23 24do_setup() 25{ 26 tst_resm TINFO "Checking for rstatd on $(tst_ipaddr)" 27 rpcinfo -u $(tst_ipaddr) rstatd 3 > /dev/null 2>&1 || \ 28 tst_brkm TCONF "rstatd is inactive on $(tst_ipaddr)" 29} 30 31do_test() 32{ 33 tst_resm TINFO "Test rup with options set" 34 35 EXPECT_RHOST_PASS rup $(tst_ipaddr) 36 37 local opts="-d -h -l -t" 38 for opt in $opts; do 39 EXPECT_RHOST_PASS rup $opt $(tst_ipaddr) 40 done 41 42 tst_resm TINFO "Test rup with bad options" 43 EXPECT_RHOST_FAIL rup bogushost 44 EXPECT_RHOST_FAIL rup -bogusflag $(tst_ipaddr) 45} 46 47do_setup 48do_test 49 50tst_exit 51