Return-Path: From: Wang Mingyu Date: Wed, 12 Dec 2018 00:05:56 -0800 Message-ID: <1544601959-22915-4-git-send-email-wangmy@cn.fujitsu.com> In-Reply-To: <1544601959-22915-1-git-send-email-wangmy@cn.fujitsu.com> References: <1544601959-22915-1-git-send-email-wangmy@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Fuego] [PATCH] demo: Add test cases of service saslauthd, sblim-sfcb, sensord and smartd. List-Id: Mailing list for the Fuego test framework List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: fuego@lists.linuxfoundation.org Cc: root From: root Signed-off-by: root --- .../tests/Functional.demo/tests/demo_saslauthd.sh | 41 ++++++++++++++++++++++ .../tests/Functional.demo/tests/demo_sblim-sfcb.sh | 22 ++++++++++++ engine/tests/Functional.demo/tests/demo_sensord.sh | 39 ++++++++++++++++++++ engine/tests/Functional.demo/tests/demo_smartd.sh | 41 ++++++++++++++++++++++ 4 files changed, 143 insertions(+) create mode 100644 engine/tests/Functional.demo/tests/demo_saslauthd.sh create mode 100644 engine/tests/Functional.demo/tests/demo_sblim-sfcb.sh create mode 100644 engine/tests/Functional.demo/tests/demo_sensord.sh create mode 100644 engine/tests/Functional.demo/tests/demo_smartd.sh diff --git a/engine/tests/Functional.demo/tests/demo_saslauthd.sh b/engine/tests/Functional.demo/tests/demo_saslauthd.sh new file mode 100644 index 0000000..caaba7b --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_saslauthd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start saslauthd, and confirm the process condition by command ps. + +test="saslauthd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +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 + +sleep 5 + +if ps aux | grep "[/]usr/sbin/saslauthd" +then + echo " -> get the process of saslauthd." +else + echo " -> can't get the process of saslauthd." + echo " -> $test: TEST-FAIL" + exec_service_on_target saslauthd stop + exit +fi + +exec_service_on_target saslauthd stop + +if ps aux | grep "[/]usr/sbin/saslauthd" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi diff --git a/engine/tests/Functional.demo/tests/demo_sblim-sfcb.sh b/engine/tests/Functional.demo/tests/demo_sblim-sfcb.sh new file mode 100644 index 0000000..0d85333 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_sblim-sfcb.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# In the target start sblim-sfcb, and confirm the process condition by command ps. + +test="sblim-sfcb" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target sblim-sfcb stop + +if exec_service_on_target sblim-sfcb start +then + echo " -> start of sblim-sfcb succeeded." + echo " -> $test: TEST-PASS" +else + echo " -> start of sblim-sfcb failed." + echo " -> $test: TEST-FAIL" +fi + +exec_service_on_target sblim-sfcb stop diff --git a/engine/tests/Functional.demo/tests/demo_sensord.sh b/engine/tests/Functional.demo/tests/demo_sensord.sh new file mode 100644 index 0000000..d53ed16 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_sensord.sh @@ -0,0 +1,39 @@ +#!/bin/sh + +# In the target start sensord, and confirm the process condition by command ps. + +test="sensord" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target sensord stop + +if ps aux | grep "[/]usr/sbin/sensord" +then + echo " -> $test: TEST-FAIL" + exit +else + echo " -> no progress when service is shutdown" +fi + +if exec_service_on_target sensord start +then + echo " -> start of sensord succeeded." +else + echo " -> start of sensord failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/sensord" +then + echo " -> get the process of sensord." + echo " -> $test: TEST-PASS" +else + echo " -> can't get the process of sensord." + echo " -> $test: TEST-FAIL" +fi diff --git a/engine/tests/Functional.demo/tests/demo_smartd.sh b/engine/tests/Functional.demo/tests/demo_smartd.sh new file mode 100644 index 0000000..1d69813 --- /dev/null +++ b/engine/tests/Functional.demo/tests/demo_smartd.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +# In the target start smartd, and confirm the process condition by command ps. + +test="smartd" + +. ./fuego_board_function_lib.sh + +set_init_manager + +exec_service_on_target smartd stop + +if exec_service_on_target smartd start +then + echo " -> start of smartd succeeded." +else + echo " -> start of smartd failed." + echo " -> $test: TEST-FAIL" + exit +fi + +sleep 5 + +if ps aux | grep "[/]usr/sbin/smartd" +then + echo " -> get the process of smartd." +else + echo " -> can't get the process of smartd." + echo " -> $test: TEST-FAIL" + exec_service_on_target smartd stop + exit +fi + +exec_service_on_target smartd stop + +if ps aux | grep "[/]usr/sbin/smartd" +then + echo " -> $test: TEST-FAIL" +else + echo " -> $test: TEST-PASS" +fi -- 1.8.3.1