From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1P8YCo-0004yD-FO for ltp-list@lists.sourceforge.net; Wed, 20 Oct 2010 12:55:46 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.69) id 1P8YCn-0006Wq-F2 for ltp-list@lists.sourceforge.net; Wed, 20 Oct 2010 12:55:46 +0000 Date: Wed, 20 Oct 2010 07:55:37 -0500 From: "Serge E. Hallyn" Message-ID: <20101020125537.GA3623@hallyn.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [LTP] smack testcase List-Id: Linux Test Project General Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-list-bounces@lists.sourceforge.net To: ARJIT SHARMA Cc: ltp-list@lists.sourceforge.net Quoting ARJIT SHARMA (joyarjit@gmail.com): > Hi, > > Inside the smack testcase, the sript "smack_common.sh" has a function > named "check_onlycap()" , please tell me its functionality as every time > this function is reporting that onlycap is "" not the expected "". > > the log of the testcase is as follows--- Yeah the check seems backward. Does this patch help? >From efe6116a6b284bb409b7fe9946cf990092183650 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Wed, 20 Oct 2010 07:54:21 -0500 Subject: [PATCH 1/1] Fix inverted logic testing for string which is NOT empty Signed-off-by: Serge Hallyn --- testcases/kernel/security/smack/smack_common.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/testcases/kernel/security/smack/smack_common.sh b/testcases/kernel/security/smack/smack_common.sh index eb339f3..25405fe 100755 --- a/testcases/kernel/security/smack/smack_common.sh +++ b/testcases/kernel/security/smack/smack_common.sh @@ -36,7 +36,7 @@ check_mounted() { check_onlycap() { onlycap=`cat "$smackfsdir/onlycap" 2>/dev/null` - if [ -z "$onlycap" ]; then + if [ ! -z "$onlycap" ]; then cat <