* [LTP] "cgroup_fj" and "cgroup" have problems?
@ 2009-12-11 9:21 Mitani
2009-12-11 9:45 ` Garrett Cooper
0 siblings, 1 reply; 6+ messages in thread
From: Mitani @ 2009-12-11 9:21 UTC (permalink / raw)
To: ltp-list
Hi,
Sorry for my many many mails today.
I ran tests with "ltp-2009-12-10" cvs.
In my system (kernel 2.6.18-164.el5), kernel does not support
control groups.
So, when I ran test of "cgroup_fj", I got following message and the
test faild by "FAIL 253".
------------
***error***:you must enable cgroup config in kernel
------------
In the investigation for above error message, I found that there may be
two problems,.
(a) "cgroup_fj" test failed in the system not support "control groups".
(b) "cgroup" test may passed by user-ID which isn't "root".
(a) "cgroup_fj" test
Above message is correct message, but exiting by "FAIL" is not
correct, I think.
Referring to the example of other tests, I think that the tests
for non-supported functions must be finished in "PASS 0" basically.
(For example, "move_pages{01...11}" tests exit in "PASS 0" and with
"NUMA support not provided" messages.)
I suggest following patch to resolve this problem.
============
--- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
+++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
@@ -40,7 +40,7 @@
if ! [ -f /proc/cgroups ]; then
echo "***error***:you must enable cgroup config in kernel";
- exit -3;
+ exit 0;
fi
if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
============
(b) "cgroup" test
I watched "cgroup" test source for hints for (a), and found another
problem.
If this test run by user-ID non-"root", it will exit in "PASS", I think.
But I think that it must exit in "FAIL".
Because this test cannot be tested only by "root" user.
=========
--- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
@@ -37,7 +37,7 @@
if [ "$USER" != root ]; then
tst_brkm TBROK ignored "Test must be run as root"
- exit 0
+ exit -1
fi
tst_kvercmp 2 6 29
=========
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] "cgroup_fj" and "cgroup" have problems?
2009-12-11 9:21 [LTP] "cgroup_fj" and "cgroup" have problems? Mitani
@ 2009-12-11 9:45 ` Garrett Cooper
2009-12-14 8:08 ` Mitani
0 siblings, 1 reply; 6+ messages in thread
From: Garrett Cooper @ 2009-12-11 9:45 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
On Dec 11, 2009, at 1:21 AM, Mitani wrote:
> Hi,
>
> Sorry for my many many mails today.
>
>
> I ran tests with "ltp-2009-12-10" cvs.
>
> In my system (kernel 2.6.18-164.el5), kernel does not support
> control groups.
> So, when I ran test of "cgroup_fj", I got following message and the
> test faild by "FAIL 253".
>
> ------------
> ***error***:you must enable cgroup config in kernel
> ------------
>
> In the investigation for above error message, I found that there may be
> two problems,.
>
> (a) "cgroup_fj" test failed in the system not support "control groups".
> (b) "cgroup" test may passed by user-ID which isn't "root".
>
>
> (a) "cgroup_fj" test
> Above message is correct message, but exiting by "FAIL" is not
> correct, I think.
> Referring to the example of other tests, I think that the tests
> for non-supported functions must be finished in "PASS 0" basically.
> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
> "NUMA support not provided" messages.)
>
> I suggest following patch to resolve this problem.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
> @@ -40,7 +40,7 @@
>
> if ! [ -f /proc/cgroups ]; then
> echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>
> ============
>
>
> (b) "cgroup" test
> I watched "cgroup" test source for hints for (a), and found another
> problem.
> If this test run by user-ID non-"root", it will exit in "PASS", I think.
> But I think that it must exit in "FAIL".
> Because this test cannot be tested only by "root" user.
>
> =========
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
> @@ -37,7 +37,7 @@
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit -1
> fi
>
> tst_kvercmp 2 6 29
1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you suggested).
2. Case 2 should have the equivalent exit code for TBROK (it's in include/test.h). $? -> -1 is undefined via POSIX and while it passes on bash, it doesn't pass on ash, and thus would fail with busybox.
Thanks,
-Garrett
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] "cgroup_fj" and "cgroup" have problems?
2009-12-11 9:45 ` Garrett Cooper
@ 2009-12-14 8:08 ` Mitani
2009-12-23 0:53 ` Garrett Cooper
0 siblings, 1 reply; 6+ messages in thread
From: Mitani @ 2009-12-14 8:08 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
I took your indication and changed the patch as follows.
Case 1:
I revised "[ -f /proc/cgroups ]" case to use "tst_resm TCONF"
instead of "echo".
But this revision is unbalanced with the other exit messages,
so I revised other cases too.
I don't know how to use exit code, so I use 0 or 1.
I might mistake those code.
============
--- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
+++ run_cgroup_test_fj.sh.new 2009-12-14 14:21:53.000000000 +0900
@@ -34,19 +34,19 @@
export CASENO2=0
if [ "$(id -ru)" -ne 0 ]; then
- echo "***error***:you must use root to test"
- exit -1
+ tst_brkm TBROK ignored "***error***:you must use root to test"
+ exit 1
fi
if ! [ -f /proc/cgroups ]; then
- echo "***error***:you must enable cgroup config in kernel";
- exit -3;
+ tst_resm TCONF "***error***:you must enable cgroup config in
kernel";
+ exit 0;
fi
if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
- echo "***warning***:file \"cgroup_fj_proc\" is not exist or not
executable";
- echo "please do make and check execution permission"
- exit -4;
+ tst_brkm TBROK ignored "***warning***:file \"cgroup_fj_proc\" is not
exist or not executable";
+ tst_brkm TBROK ignored "please do make and check execution
permission"
+ exit 1;
fi
CPUSET=`grep -w cpuset /proc/cgroups | cut -f1`;
@@ -83,10 +83,10 @@
SYBSYSCOMPILED="$SYBSYSCOMPILED devices,"
fi
if [ "$SYBSYSCOMPILED" = "" ];then # Warning and exit if all cgroup
subsystem are not compiled
- echo "CONTROLLERS TESTCASES: WARNING";
- echo "Kernel does not support for any cgroup subsystem";
- echo "Skipping all controllers testcases....";
- exit -2;
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING";
+ tst_resm TCONF "Kernel does not support for any cgroup subsystem";
+ tst_resm TCONF "Skipping all controllers testcases....";
+ exit 0;
fi
echo "Now, we start the test for cgroup...";
============
Case 2:
I revised "[ "$USER" != root ]" case, and revised
"[ ! -f /proc/cgroups ]" case to use "tst_resm" instead of "echocase"
for balance.
============
--- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-14 11:42:58.000000000 +0900
@@ -29,15 +29,15 @@
export TST_COUNT=1
if [ ! -f /proc/cgroups ]; then
- echo "CONTROLLERS TESTCASES: WARNING"
- echo "Kernel does not support for control groups";
- echo "Skipping all controllers testcases....";
+ tst_resm TCONF "CONTROLLERS TESTCASES: WARNING"
+ tst_resm TCONF "Kernel does not support for control groups"
+ tst_resm TCONF "Skipping all controllers testcases...."
exit 0
fi
if [ "$USER" != root ]; then
tst_brkm TBROK ignored "Test must be run as root"
- exit 0
+ exit 1
fi
tst_kvercmp 2 6 29
============
Regards--
-Tomonori Mitani
-----Original Message-----
From: Garrett Cooper [mailto:yanegomi@gmail.com]
Sent: Friday, December 11, 2009 6:45 PM
To: Mitani
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?
On Dec 11, 2009, at 1:21 AM, Mitani wrote:
> Hi,
>
> Sorry for my many many mails today.
>
>
> I ran tests with "ltp-2009-12-10" cvs.
>
> In my system (kernel 2.6.18-164.el5), kernel does not support
> control groups.
> So, when I ran test of "cgroup_fj", I got following message and the
> test faild by "FAIL 253".
>
> ------------
> ***error***:you must enable cgroup config in kernel
> ------------
>
> In the investigation for above error message, I found that there may be
> two problems,.
>
> (a) "cgroup_fj" test failed in the system not support "control groups".
> (b) "cgroup" test may passed by user-ID which isn't "root".
>
>
> (a) "cgroup_fj" test
> Above message is correct message, but exiting by "FAIL" is not
> correct, I think.
> Referring to the example of other tests, I think that the tests
> for non-supported functions must be finished in "PASS 0" basically.
> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
> "NUMA support not provided" messages.)
>
> I suggest following patch to resolve this problem.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
> @@ -40,7 +40,7 @@
>
> if ! [ -f /proc/cgroups ]; then
> echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>
> ============
>
>
> (b) "cgroup" test
> I watched "cgroup" test source for hints for (a), and found another
> problem.
> If this test run by user-ID non-"root", it will exit in "PASS", I think.
> But I think that it must exit in "FAIL".
> Because this test cannot be tested only by "root" user.
>
> =========
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
> @@ -37,7 +37,7 @@
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit -1
> fi
>
> tst_kvercmp 2 6 29
1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you
suggested).
2. Case 2 should have the equivalent exit code for TBROK (it's in
include/test.h). $? -> -1 is undefined via POSIX and while it passes on
bash, it doesn't pass on ash, and thus would fail with busybox.
Thanks,
-Garrett=
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] "cgroup_fj" and "cgroup" have problems?
@ 2009-12-22 1:46 Mitani
0 siblings, 0 replies; 6+ messages in thread
From: Mitani @ 2009-12-22 1:46 UTC (permalink / raw)
To: ltp-list
Hi,
I revised "cgroup_fi" testset and wrote it to mailing-list in 2009.12.14.
http://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg09000.html
But I received no reply and there is no update in
"SCM Repositories - ltp".
Please give me some opinion about the patch if you would.
I'm looking forward to your reply.
Regards--
-Tomonori Mitani
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] "cgroup_fj" and "cgroup" have problems?
2009-12-14 8:08 ` Mitani
@ 2009-12-23 0:53 ` Garrett Cooper
2010-01-04 7:14 ` Mitani
0 siblings, 1 reply; 6+ messages in thread
From: Garrett Cooper @ 2009-12-23 0:53 UTC (permalink / raw)
To: Mitani; +Cc: ltp-list
On Mon, Dec 14, 2009 at 12:08 AM, Mitani <mitani@ryobi.co.jp> wrote:
> I took your indication and changed the patch as follows.
>
> Case 1:
> I revised "[ -f /proc/cgroups ]" case to use "tst_resm TCONF"
> instead of "echo".
> But this revision is unbalanced with the other exit messages,
> so I revised other cases too.
> I don't know how to use exit code, so I use 0 or 1.
> I might mistake those code.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-14 14:21:53.000000000 +0900
> @@ -34,19 +34,19 @@
> export CASENO2=0
>
> if [ "$(id -ru)" -ne 0 ]; then
> - echo "***error***:you must use root to test"
> - exit -1
> + tst_brkm TBROK ignored "***error***:you must use root to test"
> + exit 1
> fi
>
> if ! [ -f /proc/cgroups ]; then
> - echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + tst_resm TCONF "***error***:you must enable cgroup config in
> kernel";
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
> - echo "***warning***:file \"cgroup_fj_proc\" is not exist or not
> executable";
> - echo "please do make and check execution permission"
> - exit -4;
> + tst_brkm TBROK ignored "***warning***:file \"cgroup_fj_proc\" is not
> exist or not executable";
> + tst_brkm TBROK ignored "please do make and check execution
> permission"
> + exit 1;
> fi
>
> CPUSET=`grep -w cpuset /proc/cgroups | cut -f1`;
> @@ -83,10 +83,10 @@
> SYBSYSCOMPILED="$SYBSYSCOMPILED devices,"
> fi
> if [ "$SYBSYSCOMPILED" = "" ];then # Warning and exit if all cgroup
> subsystem are not compiled
> - echo "CONTROLLERS TESTCASES: WARNING";
> - echo "Kernel does not support for any cgroup subsystem";
> - echo "Skipping all controllers testcases....";
> - exit -2;
> + tst_resm TCONF "CONTROLLERS TESTCASES: WARNING";
> + tst_resm TCONF "Kernel does not support for any cgroup subsystem";
> + tst_resm TCONF "Skipping all controllers testcases....";
> + exit 0;
> fi
>
> echo "Now, we start the test for cgroup...";
> ============
>
>
> Case 2:
> I revised "[ "$USER" != root ]" case, and revised
> "[ ! -f /proc/cgroups ]" case to use "tst_resm" instead of "echocase"
> for balance.
>
> ============
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-14 11:42:58.000000000 +0900
> @@ -29,15 +29,15 @@
> export TST_COUNT=1
>
> if [ ! -f /proc/cgroups ]; then
> - echo "CONTROLLERS TESTCASES: WARNING"
> - echo "Kernel does not support for control groups";
> - echo "Skipping all controllers testcases....";
> + tst_resm TCONF "CONTROLLERS TESTCASES: WARNING"
> + tst_resm TCONF "Kernel does not support for control groups"
> + tst_resm TCONF "Skipping all controllers testcases...."
> exit 0
> fi
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit 1
> fi
>
> tst_kvercmp 2 6 29
> ============
>
>
> Regards--
>
>
> -Tomonori Mitani
>
>
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Friday, December 11, 2009 6:45 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?
>
> On Dec 11, 2009, at 1:21 AM, Mitani wrote:
>
>> Hi,
>>
>> Sorry for my many many mails today.
>>
>>
>> I ran tests with "ltp-2009-12-10" cvs.
>>
>> In my system (kernel 2.6.18-164.el5), kernel does not support
>> control groups.
>> So, when I ran test of "cgroup_fj", I got following message and the
>> test faild by "FAIL 253".
>>
>> ------------
>> ***error***:you must enable cgroup config in kernel
>> ------------
>>
>> In the investigation for above error message, I found that there may be
>> two problems,.
>>
>> (a) "cgroup_fj" test failed in the system not support "control groups".
>> (b) "cgroup" test may passed by user-ID which isn't "root".
>>
>>
>> (a) "cgroup_fj" test
>> Above message is correct message, but exiting by "FAIL" is not
>> correct, I think.
>> Referring to the example of other tests, I think that the tests
>> for non-supported functions must be finished in "PASS 0" basically.
>> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
>> "NUMA support not provided" messages.)
>>
>> I suggest following patch to resolve this problem.
>>
>> ============
>> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
>> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
>> @@ -40,7 +40,7 @@
>>
>> if ! [ -f /proc/cgroups ]; then
>> echo "***error***:you must enable cgroup config in kernel";
>> - exit -3;
>> + exit 0;
>> fi
>>
>> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>>
>> ============
>>
>>
>> (b) "cgroup" test
>> I watched "cgroup" test source for hints for (a), and found another
>> problem.
>> If this test run by user-ID non-"root", it will exit in "PASS", I think.
>> But I think that it must exit in "FAIL".
>> Because this test cannot be tested only by "root" user.
>>
>> =========
>> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
>> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
>> @@ -37,7 +37,7 @@
>>
>> if [ "$USER" != root ]; then
>> tst_brkm TBROK ignored "Test must be run as root"
>> - exit 0
>> + exit -1
>> fi
>>
>> tst_kvercmp 2 6 29
>
> 1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you
> suggested).
> 2. Case 2 should have the equivalent exit code for TBROK (it's in
> include/test.h). $? -> -1 is undefined via POSIX and while it passes on
> bash, it doesn't pass on ash, and thus would fail with busybox.
> Thanks,
> -Garrett
Committed -- thanks!
-Garrett
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [LTP] "cgroup_fj" and "cgroup" have problems?
2009-12-23 0:53 ` Garrett Cooper
@ 2010-01-04 7:14 ` Mitani
0 siblings, 0 replies; 6+ messages in thread
From: Mitani @ 2010-01-04 7:14 UTC (permalink / raw)
To: 'Garrett Cooper'; +Cc: ltp-list
Hi,
Thank you for fixing "cgroup" and "cgroup_fj".
However, I found a new problem in revised "cgroup" testcases.
It's in "cgroup_regression_test.sh".
In my original patch, I didn't revise about "tst_kvercmp 2 6 29"
judgment.
But in fixed version, the error route of above judgment revised
from "TBROK" to "TCONF".
If "TCONF" is used, the shell should end by exit 0, I think.
But "cgroup_regression_test.sh" does not end by exit 0.
Please consider about the following patch:
============
--- cgroup_regression_test.sh 2009-12-23 09:52:18.000000000 +0900
+++ cgroup_regression_test.sh.new 2009-12-24 15:47:06.000000000 +0900
@@ -31,7 +31,7 @@
tst_kvercmp 2 6 29
if [ $? -eq 0 ]; then
tst_brkm TCONF ignored "test must be run with kernel 2.6.29 or
newer"
- exit 1
+ exit 0
elif [ ! -f /proc/cgroups ]; then
tst_brkm TCONF ignored "Kernel does not support for control groups;
skipping testcases";
exit 0
============
Regards--
-Tomonori Miatani
-----Original Message-----
From: Garrett Cooper [mailto:yanegomi@gmail.com]
Sent: Wednesday, December 23, 2009 9:53 AM
To: Mitani
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?
On Mon, Dec 14, 2009 at 12:08 AM, Mitani <mitani@ryobi.co.jp> wrote:
> I took your indication and changed the patch as follows.
>
> Case 1:
> I revised "[ -f /proc/cgroups ]" case to use "tst_resm TCONF"
> instead of "echo".
> But this revision is unbalanced with the other exit messages,
> so I revised other cases too.
> I don't know how to use exit code, so I use 0 or 1.
> I might mistake those code.
>
> ============
> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
> +++ run_cgroup_test_fj.sh.new 2009-12-14 14:21:53.000000000 +0900
> @@ -34,19 +34,19 @@
> export CASENO2=0
>
> if [ "$(id -ru)" -ne 0 ]; then
> - echo "***error***:you must use root to test"
> - exit -1
> + tst_brkm TBROK ignored "***error***:you must use root to test"
> + exit 1
> fi
>
> if ! [ -f /proc/cgroups ]; then
> - echo "***error***:you must enable cgroup config in kernel";
> - exit -3;
> + tst_resm TCONF "***error***:you must enable cgroup config in
> kernel";
> + exit 0;
> fi
>
> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
> - echo "***warning***:file \"cgroup_fj_proc\" is not exist or not
> executable";
> - echo "please do make and check execution permission"
> - exit -4;
> + tst_brkm TBROK ignored "***warning***:file \"cgroup_fj_proc\" is
not
> exist or not executable";
> + tst_brkm TBROK ignored "please do make and check execution
> permission"
> + exit 1;
> fi
>
> CPUSET=`grep -w cpuset /proc/cgroups | cut -f1`;
> @@ -83,10 +83,10 @@
> SYBSYSCOMPILED="$SYBSYSCOMPILED devices,"
> fi
> if [ "$SYBSYSCOMPILED" = "" ];then # Warning and exit if all cgroup
> subsystem are not compiled
> - echo "CONTROLLERS TESTCASES: WARNING";
> - echo "Kernel does not support for any cgroup subsystem";
> - echo "Skipping all controllers testcases....";
> - exit -2;
> + tst_resm TCONF "CONTROLLERS TESTCASES: WARNING";
> + tst_resm TCONF "Kernel does not support for any cgroup subsystem";
> + tst_resm TCONF "Skipping all controllers testcases....";
> + exit 0;
> fi
>
> echo "Now, we start the test for cgroup...";
> ============
>
>
> Case 2:
> I revised "[ "$USER" != root ]" case, and revised
> "[ ! -f /proc/cgroups ]" case to use "tst_resm" instead of "echocase"
> for balance.
>
> ============
> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
> +++ cgroup_regression_test.sh.new 2009-12-14 11:42:58.000000000
+0900
> @@ -29,15 +29,15 @@
> export TST_COUNT=1
>
> if [ ! -f /proc/cgroups ]; then
> - echo "CONTROLLERS TESTCASES: WARNING"
> - echo "Kernel does not support for control groups";
> - echo "Skipping all controllers testcases....";
> + tst_resm TCONF "CONTROLLERS TESTCASES: WARNING"
> + tst_resm TCONF "Kernel does not support for control groups"
> + tst_resm TCONF "Skipping all controllers testcases...."
> exit 0
> fi
>
> if [ "$USER" != root ]; then
> tst_brkm TBROK ignored "Test must be run as root"
> - exit 0
> + exit 1
> fi
>
> tst_kvercmp 2 6 29
> ============
>
>
> Regards--
>
>
> -Tomonori Mitani
>
>
> -----Original Message-----
> From: Garrett Cooper [mailto:yanegomi@gmail.com]
> Sent: Friday, December 11, 2009 6:45 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] "cgroup_fj" and "cgroup" have problems?
>
> On Dec 11, 2009, at 1:21 AM, Mitani wrote:
>
>> Hi,
>>
>> Sorry for my many many mails today.
>>
>>
>> I ran tests with "ltp-2009-12-10" cvs.
>>
>> In my system (kernel 2.6.18-164.el5), kernel does not support
>> control groups.
>> So, when I ran test of "cgroup_fj", I got following message and the
>> test faild by "FAIL 253".
>>
>> ------------
>> ***error***:you must enable cgroup config in kernel
>> ------------
>>
>> In the investigation for above error message, I found that there may be
>> two problems,.
>>
>> (a) "cgroup_fj" test failed in the system not support "control groups".
>> (b) "cgroup" test may passed by user-ID which isn't "root".
>>
>>
>> (a) "cgroup_fj" test
>> Above message is correct message, but exiting by "FAIL" is not
>> correct, I think.
>> Referring to the example of other tests, I think that the tests
>> for non-supported functions must be finished in "PASS 0" basically.
>> (For example, "move_pages{01...11}" tests exit in "PASS 0" and with
>> "NUMA support not provided" messages.)
>>
>> I suggest following patch to resolve this problem.
>>
>> ============
>> --- run_cgroup_test_fj.sh 2009-10-26 23:49:23.000000000 +0900
>> +++ run_cgroup_test_fj.sh.new 2009-12-11 16:10:39.000000000 +0900
>> @@ -40,7 +40,7 @@
>>
>> if ! [ -f /proc/cgroups ]; then
>> echo "***error***:you must enable cgroup config in kernel";
>> - exit -3;
>> + exit 0;
>> fi
>>
>> if [ ! -x $TESTROOT/cgroup_fj_proc ]; then
>>
>> ============
>>
>>
>> (b) "cgroup" test
>> I watched "cgroup" test source for hints for (a), and found another
>> problem.
>> If this test run by user-ID non-"root", it will exit in "PASS", I think.
>> But I think that it must exit in "FAIL".
>> Because this test cannot be tested only by "root" user.
>>
>> =========
>> --- cgroup_regression_test.sh 2009-11-30 17:41:37.000000000 +0900
>> +++ cgroup_regression_test.sh.new 2009-12-11 16:22:14.000000000 +0900
>> @@ -37,7 +37,7 @@
>>
>> if [ "$USER" != root ]; then
>> tst_brkm TBROK ignored "Test must be run as root"
>> - exit 0
>> + exit -1
>> fi
>>
>> tst_kvercmp 2 6 29
>
> 1. Case 1 should be tst_brkm TCONF and should have exit 0 (like you
> suggested).
> 2. Case 2 should have the equivalent exit code for TBROK (it's in
> include/test.h). $? -> -1 is undefined via POSIX and while it passes on
> bash, it doesn't pass on ash, and thus would fail with busybox.
> Thanks,
> -Garrett
Committed -- thanks!
-Garrett
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-01-04 7:14 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-11 9:21 [LTP] "cgroup_fj" and "cgroup" have problems? Mitani
2009-12-11 9:45 ` Garrett Cooper
2009-12-14 8:08 ` Mitani
2009-12-23 0:53 ` Garrett Cooper
2010-01-04 7:14 ` Mitani
-- strict thread matches above, loose matches on Subject: below --
2009-12-22 1:46 Mitani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox