[LTP] [PATCH] securebits: some cleanup

Zeng Linggang
2014-08-07T09:07:46Z

* Add Copyright for run_securebits.sh

* Use test.sh for run_securebits.sh

* Somecleanup for Makefile

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
---
testcases/kernel/security/securebits/Makefile | 7 +--
.../kernel/security/securebits/run_securebits.sh | 51 +++++++++++++++-------
2 files changed, 39 insertions(+), 19 deletions(-)

diff --git a/testcases/kernel/security/securebits/Makefile b/testcases/kernel/security/securebits/Makefile
index 51018d9..47271c9 100644
--- a/testcases/kernel/security/securebits/Makefile
+++ b/testcases/kernel/security/securebits/Makefile
@@ -4,7 +4,8 @@
## ##
## This program is free software; you can redistribute it and#or modify ##
## it under the terms of the GNU General Public License as published by ##
-## the Free Software Foundation; either version 2 of the License, or ## ## (at your option) any later version. ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, but ##
## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
@@ -12,8 +13,8 @@
## for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
-## along with this program; if not, write to the Free Software ##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
+## along with this program; if not, write to the Free Software Foundation, ##
+## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ##
## ##
################################################################################

diff --git a/testcases/kernel/security/securebits/run_securebits.sh b/testcases/kernel/security/securebits/run_securebits.sh
index 4d9e272..c3a301c 100644
--- a/testcases/kernel/security/securebits/run_securebits.sh
+++ b/testcases/kernel/security/securebits/run_securebits.sh
@@ -1,20 +1,39 @@
#!/bin/sh
+################################################################################
+## ##
+## Copyright (c) Linux Test Project, 2014 ##
+## ##
+## This program is free software; you can redistribute it and/or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## This program is distributed in the hope that it will be useful, ##
+## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
+## GNU Library General Public License for more details. ##
+## ##
+################################################################################

-echo "testing keepcaps"
-check_keepcaps 1
-tmp=$?
-if [ $tmp -ne 0 ]; then
- exit_code=$tmp
-fi
-check_keepcaps 2
-tmp=$?
-if [ $tmp -ne 0 ]; then
- exit_code=$tmp
-fi
-check_keepcaps 3
-tmp=$?
-if [ $tmp -ne 0 ]; then
- exit_code=$tmp
+TCID="keepcaps"
+TST_TOTAL=1
+
+. test.sh
+
+exit_code=0
+for i in 1 2 3
+do
+ check_keepcaps $i
+ ret=$?
+ if [ $ret -ne 0 ]; then
+ exit_code=$ret
+ fi
+done
+
+if [ $exit_code -ne 0 ]; then
+ tst_resm TFAIL "Test $TCID FAIL"
+else
+ tst_resm TPASS "Test $TCID PASS"
fi

-exit $exit_code
+tst_exit
--
1.9.3

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.