[Fuego] [PATCH] demo: Add test cases of service snmpd, snmptrapd, sshd, syslog-ng and sysstat.

Tim.Bird at sony.com Tim.Bird at sony.com
Wed Dec 12 01:56:16 UTC 2018



> -----Original Message-----
> From: Wang Mingyu
> 
> From: root <root at localhost.localdomain>
This is not right.

Also, need a description of the patch here.

> 
> Signed-off-by: root <root at localhost.localdomain>
This is not right.  Please submit with a valid Signed-off-by.
> ---
>  engine/tests/Functional.demo/tests/demo_snmpd.sh   | 39
> ++++++++++++++++++++++
>  .../tests/Functional.demo/tests/demo_snmptrapd.sh  | 39
> ++++++++++++++++++++++
>  engine/tests/Functional.demo/tests/demo_sshd.sh    | 19 +++++++++++
>  .../tests/Functional.demo/tests/demo_syslog-ng.sh  | 39
> ++++++++++++++++++++++
>  engine/tests/Functional.demo/tests/demo_sysstat.sh | 20 +++++++++++
>  5 files changed, 156 insertions(+)
>  create mode 100644 engine/tests/Functional.demo/tests/demo_snmpd.sh
>  create mode 100644
> engine/tests/Functional.demo/tests/demo_snmptrapd.sh
>  create mode 100644 engine/tests/Functional.demo/tests/demo_sshd.sh
>  create mode 100644 engine/tests/Functional.demo/tests/demo_syslog-
> ng.sh
>  create mode 100644 engine/tests/Functional.demo/tests/demo_sysstat.sh
> 
> diff --git a/engine/tests/Functional.demo/tests/demo_snmpd.sh
> b/engine/tests/Functional.demo/tests/demo_snmpd.sh
Same factoring issue as mentioned in other e-mail.

> new file mode 100644
> index 0000000..d33f08e
> --- /dev/null
> +++ b/engine/tests/Functional.demo/tests/demo_snmpd.sh
> @@ -0,0 +1,39 @@
> +#!/bin/sh
> +
> +#  In the target start snmpd, and confirm the process condition by command
> ps.
> +
> +test="snmpd"
> +
> +. ./fuego_board_function_lib.sh
> +
> +set_init_manager
> +
> +exec_service_on_target snmpd stop
> +
> +if ps aux | grep "[/]usr/sbin/snmpd"
> +then
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +else
> +    echo " -> no progress when service is shutdown"
> +fi
> +
> +if exec_service_on_target snmpd start
> +then
> +    echo " -> start of snmpd succeeded."
> +else
> +    echo " -> start of snmpd failed."
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +fi
> +
> +sleep 5
> +
> +if ps aux | grep "[/]usr/sbin/snmpd"
> +then
> +    echo " -> get the process of snmpd."
> +    echo " -> $test: TEST-PASS"
> +else
> +    echo " -> can't get the process of snmpd."
> +    echo " -> $test: TEST-FAIL"
> +fi
Same "leave board as you found it" issue as mentioned previously.

> diff --git a/engine/tests/Functional.demo/tests/demo_snmptrapd.sh
> b/engine/tests/Functional.demo/tests/demo_snmptrapd.sh
> new file mode 100644
> index 0000000..0f30219
> --- /dev/null
> +++ b/engine/tests/Functional.demo/tests/demo_snmptrapd.sh
> @@ -0,0 +1,39 @@
> +#!/bin/sh
> +
> +#  In the target start snmptrapd, and confirm the process condition by
> command ps.
> +
> +test="snmptrapd"
> +
> +. ./fuego_board_function_lib.sh
> +
> +set_init_manager
> +
> +exec_service_on_target snmptrapd stop
> +
> +if ps aux | grep "[/]usr/sbin/snmptrapd"
> +then
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +else
> +    echo " -> no progress when service is shutdown"
> +fi
> +
> +if exec_service_on_target snmptrapd start
> +then
> +    echo " -> start of snmptrapd succeeded."
> +else
> +    echo " -> start of snmptrapd failed."
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +fi
> +
> +sleep 5
> +
> +if ps aux | grep "[/]usr/sbin/snmptrapd"
> +then
> +    echo " -> get the process of snmptrapd."
> +    echo " -> $test: TEST-PASS"
> +else
> +    echo " -> can't get the process of snmptrapd."
> +    echo " -> $test: TEST-FAIL"
> +fi
Same "leave board as you found it" issue as mentioned previously.

> diff --git a/engine/tests/Functional.demo/tests/demo_sshd.sh
> b/engine/tests/Functional.demo/tests/demo_sshd.sh
> new file mode 100644
> index 0000000..f42d3fb
> --- /dev/null
> +++ b/engine/tests/Functional.demo/tests/demo_sshd.sh
> @@ -0,0 +1,19 @@
> +#!/bin/sh
> +
> +#  In the target start sshd, and confirm the process condition by command
> ps.
> +
> +test="sshd"
> +
> +. ./fuego_board_function_lib.sh
> +
> +set_init_manager
> +
> +exec_service_on_target sshd.socket stop
> +
> +if exec_service_on_target sshd.socket start
> +then
> +    echo " -> $test: TEST-PASS"
> +else
> +    echo " -> start of sshd failed."
> +    echo " -> $test: TEST-FAIL"
> +fi
Same "leave board as you found it" issue as mentioned previously.

> diff --git a/engine/tests/Functional.demo/tests/demo_syslog-ng.sh
> b/engine/tests/Functional.demo/tests/demo_syslog-ng.sh
> new file mode 100644
> index 0000000..71303fc
> --- /dev/null
> +++ b/engine/tests/Functional.demo/tests/demo_syslog-ng.sh
> @@ -0,0 +1,39 @@
> +#!/bin/sh
> +
> +#  In the target start syslog-ng, and confirm the process condition by
> command ps.
> +
> +test="syslog-ng"
> +
> +. ./fuego_board_function_lib.sh
> +
> +set_init_manager
> +
> +exec_service_on_target syslog-ng stop
> +
> +if ps aux | grep "[/]usr/sbin/syslog-ng"
> +then
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +else
> +    echo " -> no progress when service is shutdown"
> +fi
> +
> +if exec_service_on_target syslog-ng start
> +then
> +    echo " -> start of syslog-ng succeeded."
> +else
> +    echo " -> start of syslog-ng failed."
> +    echo " -> $test: TEST-FAIL"
> +    exit
> +fi
> +
> +sleep 5
> +
> +if ps aux | grep "[/]usr/sbin/syslog-ng"
> +then
> +    echo " -> get the process of syslog-ng."
> +    echo " -> $test: TEST-PASS"
> +else
> +    echo " -> can't get the process of syslog-ng."
> +    echo " -> $test: TEST-FAIL"
> +fi
Same "leave board as you found it" issue as mentioned previously.

> diff --git a/engine/tests/Functional.demo/tests/demo_sysstat.sh
> b/engine/tests/Functional.demo/tests/demo_sysstat.sh
> new file mode 100644
> index 0000000..442841e
> --- /dev/null
> +++ b/engine/tests/Functional.demo/tests/demo_sysstat.sh
> @@ -0,0 +1,20 @@
> +#!/bin/sh
> +
> +#  In the target start sysstat, and confirm the process condition by command
> ps.
> +
> +test="sysstat"
> +
> +. ./fuego_board_function_lib.sh
> +
> +set_init_manager
> +
> +exec_service_on_target sysstat stop
> +
> +if exec_service_on_target sysstat start
> +then
> +    echo " -> start of sysstat succeeded."
> +    echo " -> $test: TEST-PASS"
> +else
> +    echo " -> start of sysstat failed."
> +    echo " -> $test: TEST-FAIL"
> +fi
> --
> 1.8.3.1
Same "leave board as you found it" issue as mentioned previously.

Thanks,
 -- Tim



More information about the Fuego mailing list