Return-Path: From: Wang Mingyu Date: Wed, 8 May 2019 01:00:12 -0700 Message-ID: <1557302441-535-5-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 04/33] Add test case of service saslauthd. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org This test case is used to check if the service saslauthd can start and stop normally. Signed-off-by: Wang Mingyu --- .../Functional.misc/tests/cyrus-sasl_saslauthd.sh | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/Functional.misc/tests/cyrus-sasl_saslauthd.sh diff --git a/tests/Functional.misc/tests/cyrus-sasl_saslauthd.sh b/tests/Functional.misc/tests/cyrus-sasl_saslauthd.sh new file mode 100644 index 0000000..f78cfcb --- /dev/null +++ b/tests/Functional.misc/tests/cyrus-sasl_saslauthd.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +# In target, run comannd saslauthd. + +test="saslauthd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +service_status=$(get_service_status saslauthd) +exec_service_on_target saslauthd stop + +if exec_service_on_target saslauthd start +then + echo " -> start of saslauthd succeeded." +else + echo " -> start of saslauthd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +if ps aux | grep "[/]usr/sbin/saslauthd" +then + echo " -> $test: TEST-PASS" +else + echo " -> can't get the pid of saslauthd." + echo " -> $test: TEST-FAIL" +fi +if [ "$service_status" = "inactive" ] +then + exec_service_on_target saslauthd stop +fi -- 1.8.3.1