1#!/bin/sh 2# SPDX-License-Identifier: GPL-2.0-or-later 3# Copyright (c) Köry Maincent <[email protected]> 2020 4# Copyright (c) Manoj Iyer <[email protected]> 2003 5# Copyright (c) Robbie Williamson <[email protected]> 2001 6# Copyright (c) International Business Machines Corp., 2000 7 8TST_TESTFUNC="do_test" 9TST_NEEDS_CMDS="netstat" 10 11 12do_test() 13{ 14 local flag 15 16 for flag in "-s" "-rn" "-i" "-gn" "-apn"; do 17 if netstat $flag 2>&1 | grep -q "invalid option"; then 18 tst_res TCONF "$flag flag not supported" 19 else 20 EXPECT_PASS netstat $flag \>/dev/null 21 fi 22 done 23} 24 25. tst_net.sh 26tst_run 27