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