* [LTP] smack testcase
@ 2010-10-20 6:00 ARJIT SHARMA
2010-10-20 12:55 ` Serge E. Hallyn
0 siblings, 1 reply; 3+ messages in thread
From: ARJIT SHARMA @ 2010-10-20 6:00 UTC (permalink / raw)
To: ltp-list, Garrett Cooper
[-- Attachment #1.1: Type: text/plain, Size: 5690 bytes --]
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---
INFO: creating /opt/ltp/results directory
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
Linux 192.168.1.10 2.6.32 #2 SMP Tue Oct 19 17:34:35 IST 2010 armv7l unknown
unknown GNU/Linux
Gnu C gcc (GCC) 4.5.0
Gnu make 3.81
util-linux ng 2.16.1)
mount ng 2.16.1 (with libblkid support)
modutils 3.1
e2fsprogs 1.41.9
PPP 2.4.4
Linux C Library 2.10.1
Dynamic linker (ldd) 2.10.1
Linux C++ Library 6.0.14
Procps 3.2.7
Net-tools 1.60
iproute2 iproute2-ss100224
Console-tools 0.2.3
Sh-utils 5.2.1
Modules Loaded
free reports:
total used free shared buffers cached
Mem: 255368 21240 234128 0 0 11764
-/+ buffers/cache: 9476 245892
Swap: 0 0 0
/proc/cpuinfo
Processor : ARMv7 Processor rev 1 (v7l)
processor : 0
BogoMIPS : 996.14
processor : 1
BogoMIPS : 996.14
Features : swp half thumb fastmult vfp edsp vfpv3 vfpv3d16
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x1
CPU part : 0xc09
CPU revision : 1
Hardware : ST-SPEAR1300-EVB
Revision : 0000
Serial : 0000000000000000
remove test cases which require the block device.
You can specify it with option -b
COMMAND: /opt/ltp/bin/ltp-pan -e -S -a 1255 -n 1255 -p -f
/tmp/ltp-MqPLzA1261/alltests -l /opt/ltp/results/smack.result -C
/opt/ltp/output/LTP_RUN_ON-smack.result.failed
LOG File: /opt/ltp/results/smack.result
FAILED COMMAND File: /opt/ltp/output/LTP_RUN_ON-smack.result.failed
Running tests.......
<<<test_start>>>
tag=smack_set_ambient stime=618
cmdline="smack_set_ambient.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=5
<<<test_end>>>
<<<test_start>>>
tag=smack_set_current stime=618
cmdline="smack_set_current.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=1 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=5
<<<test_end>>>
<<<test_start>>>
tag=smack_set_doi stime=619
cmdline=" smack_set_doi.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=2 cstime=6
<<<test_end>>>
<<<test_start>>>
tag=smack_set_netlabel stime=619
cmdline="smack_set_netlabel.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=3 cstime=3
<<<test_end>>>
<<<test_start>>>
tag=smack_set_socket_labels stime=619
cmdline="smack_set_socket_labels"
contacts=""
analysis=exit
<<<test_output>>>
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=0
<<<test_end>>>
<<<test_start>>>
tag=smack_set_cipso stime=619
cmdline=" smack_set_cipso.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=2 cstime=4
<<<test_end>>>
<<<test_start>>>
tag=smack_set_direct stime=619
cmdline="smack_set_direct.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=4
<<<test_end>>>
<<<test_start>>>
tag=smack_set_load stime=619
cmdline=" smack_set_load.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=5
<<<test_end>>>
<<<test_start>>>
tag=smack_set_onlycap stime=619
cmdline="smack_set_onlycap.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=6
<<<test_end>>>
<<<test_start>>>
tag=smack_file_access stime=619
cmdline="smack_file_access.sh"
contacts=""
analysis=exit
<<<test_output>>>
The smack label reported for /smack/onlycap is "", not the expected "".
incrementing stop
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=1 cstime=6
<<<test_end>>>
INFO: ltp-pan reported some tests FAIL
LTP Version: LTP-20100131
###############################################################"
Done executing testcases."
LTP Version: LTP-20100131
###############################################################"
--
Best Regards,
Arjit Sharma.
[-- Attachment #1.2: Type: text/html, Size: 7812 bytes --]
[-- Attachment #2: Type: text/plain, Size: 369 bytes --]
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [LTP] smack testcase
2010-10-20 6:00 [LTP] smack testcase ARJIT SHARMA
@ 2010-10-20 12:55 ` Serge E. Hallyn
2010-10-20 18:29 ` Garrett Cooper
0 siblings, 1 reply; 3+ messages in thread
From: Serge E. Hallyn @ 2010-10-20 12:55 UTC (permalink / raw)
To: ARJIT SHARMA; +Cc: ltp-list
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 <serge.hallyn@canonical.com>
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 <serge.hallyn@canonical.com>
---
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 <<EOM
The smack label reported for $smackfsdir/onlycap is "$onlycap", not the expected "".
EOM
--
1.7.1
------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [LTP] smack testcase
2010-10-20 12:55 ` Serge E. Hallyn
@ 2010-10-20 18:29 ` Garrett Cooper
0 siblings, 0 replies; 3+ messages in thread
From: Garrett Cooper @ 2010-10-20 18:29 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: ltp-list
On Wed, Oct 20, 2010 at 5:55 AM, Serge E. Hallyn
<serge.hallyn@canonical.com> wrote:
> 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 <serge.hallyn@canonical.com>
> 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 <serge.hallyn@canonical.com>
> ---
> 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 <<EOM
> The smack label reported for $smackfsdir/onlycap is "$onlycap", not the expected "".
> EOM
Yes, the logic was backwards. Please try the code I just pushed to
git to see whether or not it works for you (its intent is like
Serge's, but I improved the mount check as well, as it previously just
checked to see whether or not the directory existed, which was silly).
Thanks!
-Garrett
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-10-20 18:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-20 6:00 [LTP] smack testcase ARJIT SHARMA
2010-10-20 12:55 ` Serge E. Hallyn
2010-10-20 18:29 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox