Return-Path: From: Wang Mingyu Date: Wed, 8 May 2019 01:00:39 -0700 Message-ID: <1557302441-535-32-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1557302441-535-1-git-send-email-wangmy@cn.fujitsu.com> References: <1557302441-535-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH 31/33] Add test case of service tftpd-hpa to check the process of it. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Signed-off-by: Wang Mingyu --- .../tests/tftp-server_in.tftpd-hpa.sh | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/Functional.misc/tests/tftp-server_in.tftpd-hpa.sh diff --git a/tests/Functional.misc/tests/tftp-server_in.tftpd-hpa.sh b/tests/Functional.misc/tests/tftp-server_in.tftpd-hpa.sh new file mode 100644 index 0000000..4dfc802 --- /dev/null +++ b/tests/Functional.misc/tests/tftp-server_in.tftpd-hpa.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# In target, run comannd in.tftpd-hpa. + +test="in.tftpd-hpa" + +. ./fuego_board_function_lib.sh + +set_init_manager + +service_status=$(get_service_status tftpd-hpa) + +exec_service_on_target tftpd-hpa stop +if exec_service_on_target tftpd-hpa start +then + echo " -> start of tftpd-hpa succeeded." +else + echo " -> start of tftpd-hpa failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/in.tftpd-hpa" +then + echo " -> $test: TEST-PASS" +else + echo " -> $test: TEST-FAIL" +fi + +killall in.tftpd-hpa +if [ "$service_status" = "inactive" ] +then + exec_service_on_target tftpd-hpa stop +fi -- 1.8.3.1