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

Signed-off-by: Cui Bixuan <cuibix...@huawei.com>
---
 v2:Call status_daemon to check if vsftpd is running. If not,
    call start_daemon to start it.

 testcases/network/tcp_cmds/ftp/ftp_setup |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/testcases/network/tcp_cmds/ftp/ftp_setup 
b/testcases/network/tcp_cmds/ftp/ftp_setup
index 73d0aac..1731a6d 100644
--- a/testcases/network/tcp_cmds/ftp/ftp_setup
+++ b/testcases/network/tcp_cmds/ftp/ftp_setup
@@ -17,6 +17,7 @@
 ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA          ##
 ##                                                                           ##
 ###############################################################################
+. daemonlib.sh

 do_setup()
 {
@@ -35,6 +36,14 @@ do_setup()
                tst_brkm TBROK "vsftpd.conf not found."
        fi

+       status_daemon vsftpd
+       if [ $? -ne 0 ]; then
+               start_daemon vsftpd
+               if [ $? -ne 0 ]; then
+                       tst_brkm TBROK "Can't start vsftp"
+               fi
+       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