From 78228d8a0c387deb61f3f74914121567075b6aa7 Mon Sep 17 00:00:00 2001
From: an7s <an7s@git.zephyr-software.com>
Date: Tue, 12 May 2015 22:25:30 +0000
Subject: [PATCH] better error checking to report when cinderella callbacks
 cannot be added to the cloned binary

Former-commit-id: 8b714991faa15af3efa30d906a8ad9106169acb9
---
 tools/do_cinderella.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/do_cinderella.sh b/tools/do_cinderella.sh
index bdf8bf595..ded348d75 100755
--- a/tools/do_cinderella.sh
+++ b/tools/do_cinderella.sh
@@ -31,9 +31,15 @@ $SECURITY_TRANSFORMS_HOME/tools/cinderella/cinderella_prep.exe $cloneid
 $SECURITY_TRANSFORMS_HOME/tools/cgclibc/display_functions.exe $cloneid | grep "^function" | cut -d' ' -f2 > cinderella.functions.all 
 
 # produce a zipr'd version so that we can dynamically test behavior
-echo "Cinderella: Produce zipr'ed test version: id: $cloneid"
+echo "cinderella: Produce zipr'ed test version: id: $cloneid"
 $ZIPR_INSTALL/bin/zipr.exe -v $cloneid -c $ZIPR_INSTALL/bin/callbacks.cinderella.exe -j $PS_OBJCOPY
 mv b.out.addseg $TESTABLE
+if [ ! $? -eq 0 ];then
+  echo "cinderella: ERROR -- unable to weave in cinderella testing zipr callback"
+  exit 1
+fi
+
+echo "cinderella: testable: $TESTABLE"
 
 #----------------------------------------------------------------
 # We now have a Zipr'd binary in which we inserted a testing loop
-- 
GitLab