Patchwork [FWTS-TEST] Simple detection of segmentation faults

login
register
mail settings
Submitter Colin King
Date July 1, 2013, 10:32 p.m.
Message ID <1372717946-17340-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/256233/
State Accepted
Headers show

Comments

Colin King - July 1, 2013, 10:32 p.m.
From: Colin Ian King <colin.king@canonical.com>

fwts tests should detect any segmentation faults in fwts or
in the fwts child processes.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 test.sh | 5 +++++
 1 file changed, 5 insertions(+)
Alex Hung - July 8, 2013, 2:02 a.m.
On 07/02/2013 06:32 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> fwts tests should detect any segmentation faults in fwts or
> in the fwts child processes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   test.sh | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/test.sh b/test.sh
> index 9d4a9ba..7682d3d 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -25,7 +25,12 @@ do
>   	do
>   		if [ -x $J ]; then
>   			echo "TEST: $I, subtest $J" >> $FAILURE_LOG
> +			ulimit -c unlimited
> +			rm -f core*
>   			bash $J		
> +			if [ -e core* ]; then
> +				echo "FAILED: Segmentation fault."
> +			fi
>   			#
>   			# We can check for 0 (pass) or non-zero (fail)
>   			#
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - July 8, 2013, 8:17 a.m.
On Tue, Jul 2, 2013 at 6:32 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> fwts tests should detect any segmentation faults in fwts or
> in the fwts child processes.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  test.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/test.sh b/test.sh
> index 9d4a9ba..7682d3d 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -25,7 +25,12 @@ do
>         do
>                 if [ -x $J ]; then
>                         echo "TEST: $I, subtest $J" >> $FAILURE_LOG
> +                       ulimit -c unlimited
> +                       rm -f core*
>                         bash $J
> +                       if [ -e core* ]; then
> +                               echo "FAILED: Segmentation fault."
> +                       fi
>                         #
>                         # We can check for 0 (pass) or non-zero (fail)
>                         #
> --
> 1.8.1.2
>

Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/test.sh b/test.sh
index 9d4a9ba..7682d3d 100755
--- a/test.sh
+++ b/test.sh
@@ -25,7 +25,12 @@  do
 	do
 		if [ -x $J ]; then
 			echo "TEST: $I, subtest $J" >> $FAILURE_LOG
+			ulimit -c unlimited
+			rm -f core*
 			bash $J		
+			if [ -e core* ]; then
+				echo "FAILED: Segmentation fault."
+			fi
 			#
 			# We can check for 0 (pass) or non-zero (fail)
 			#