From e3ef7da80d289fe62a547fc5a36fd4ec28f8a5ab Mon Sep 17 00:00:00 2001
From: jdh8d <jdh8d@git.zephyr-software.com>
Date: Wed, 2 May 2012 14:57:34 +0000
Subject: [PATCH] Removing built files

Former-commit-id: 0c60fc9c9edd9cec84a9d72acbf0a87fd5fed008
---
 tools/do_concolic.sh |  2 +-
 tools/ps_analyze.sh  | 25 +++++++++++++++----------
 tools/ps_run.sh      |  4 ++++
 3 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/tools/do_concolic.sh b/tools/do_concolic.sh
index 0535e86a9..23195bc27 100755
--- a/tools/do_concolic.sh
+++ b/tools/do_concolic.sh
@@ -38,7 +38,7 @@ if [ ! -f $sym ]; then
 fi
 
 
-echo STRATA_GRACE=1 $GRACE_HOME/concolic/src/util/linux/run $extra_args  -s $sym $strata_exe
+echo STRATA_GRACE=1 $GRACE_HOME/concolic/bin/pgrp-timeout $GRACE_TIMEOUT_VALUE $GRACE_HOME/concolic/src/util/linux/run $extra_args  -s $sym $strata_exe
      STRATA_GRACE=1 $GRACE_HOME/concolic/bin/pgrp-timeout $GRACE_TIMEOUT_VALUE $GRACE_HOME/concolic/src/util/linux/run $extra_args  -s $sym $strata_exe
 
 
diff --git a/tools/ps_analyze.sh b/tools/ps_analyze.sh
index 71656bc0b..3ff1cce66 100755
--- a/tools/ps_analyze.sh
+++ b/tools/ps_analyze.sh
@@ -336,18 +336,23 @@ check_files()
 
 }
 
-check_for_iconv()
+check_for_bad_funcs()
 {
 	my_name=$1
-	nm $my_name|grep iconv_open  > /dev/null 2> /dev/null 
+	bad_funcs="htons ntohs ntohl htonl iconv_open"
+
+	for ducs_i in $bad_funcs
+	do
+		nm $my_name|grep $ducs_i  > /dev/null 2> /dev/null 
 	
-	if [ $? = 0 ]; then
-		echo Found iconv in executable, we should skip this test.
-		echo SKIP
-		echo Skip
-		echo skip
-		exit 255
-	fi
+		if [ $? = 0 ]; then
+			echo "Found bad function ($ducs_i) in executable, we should skip this test."
+			echo SKIP
+			echo Skip
+			echo skip
+			exit 255
+		fi
+	done
 }
 
 #
@@ -440,7 +445,7 @@ rm -f $stratafied_exe
 # and switch to that dir
 cd $newdir
 
-check_for_iconv $newname.ncexe
+check_for_bad_funcs $newname.ncexe
 
 # next, create a location for our log files
 mkdir logs 	
diff --git a/tools/ps_run.sh b/tools/ps_run.sh
index dea4b8c6c..a64497e6f 100755
--- a/tools/ps_run.sh
+++ b/tools/ps_run.sh
@@ -94,4 +94,8 @@ if [ -f $datapath/diagnostics.out ]; then
 	fi
 fi
 
+# final check, in case we couldn't catch the signal
+if [ $SAVE_EXIT_CODE = 139 ]; then
+	exit 200
+fi
 exit $SAVE_EXIT_CODE
-- 
GitLab