Before the test, checking if vsftpd is running will be better.
Otherwise some cases which test vsftpd will passed even vsftpd is
not running and others will failed.

Signed-off-by: Cui Bixuan <cuibix...@huawei.com>
---
 testcases/network/tcp_cmds/ftp/ftp_setup |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/testcases/network/tcp_cmds/ftp/ftp_setup 
b/testcases/network/tcp_cmds/ftp/ftp_setup
index 73d0aac..5145e66 100644
--- a/testcases/network/tcp_cmds/ftp/ftp_setup
+++ b/testcases/network/tcp_cmds/ftp/ftp_setup
@@ -35,6 +35,12 @@ do_setup()
                tst_brkm TBROK "vsftpd.conf not found."
        fi
 
+       # check if vsftpd is running
+        netstat -pl |grep vsftpd > /dev/null 2>&1
+        if [ $? -ne 0 ]; then
+                tst_brkm TCONF "vsftpd is not running."
+        fi
+
        LOCAL_ENABLE=$(awk -F= '/^local_enable=/ {print $2}' "$VSFTP_CONF")
        if [ "$LOCAL_ENABLE" != "YES" ]; then
                LOCAL_ENABLE="NO"
-- 
1.6.0.2


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to