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