* [LTP] [PATCH] controllers/cpuacct: tst_brkm() instead of exit
@ 2015-05-23 18:01 liaoqingwei
2015-05-23 11:02 ` [LTP] [PATCH v2] controllers/cpuacct: tst_brkm() instead of echo failed message LiaoQingwei
0 siblings, 1 reply; 3+ messages in thread
From: liaoqingwei @ 2015-05-23 18:01 UTC (permalink / raw)
To: ltp-list; +Cc: dingguofu, zhanyongming
From: l00194070 <liaoqingwei@huawei.com>
Most of the time,the reason of mount cgroup failed is the configuration
is not enabled,for example,CONFIG_CGROUP_CPUACCT=no.
I think use TCONF message is more helpful,and use basic test interface
tst_brkm instead of echo failed message.
Signed-off-by: Liao Qingwei <liaoqingwei@huawei.com>
---
testcases/kernel/controllers/cpuacct/cpuacct_setup.sh | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
index 6eab1b4..301d151 100755
--- a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
+++ b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
@@ -97,10 +97,8 @@ setup()
mount -t cgroup -ocpuacct none /dev/cpuacct 2> /dev/null
if [ $? -ne 0 ]
then
- echo "TFAIL: Could not mount cgroup filesystem"
- echo "Exiting test"
cleanup
- exit 1
+ tst_brkm TCONF "Could not mount cgroup filesystem,Maybe the configuration is not enabled"
fi
# Group created earlier may again be visible if not cleaned properly.
--
1.9.1
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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] [PATCH v2] controllers/cpuacct: tst_brkm() instead of echo failed message
2015-05-23 18:01 [LTP] [PATCH] controllers/cpuacct: tst_brkm() instead of exit liaoqingwei
@ 2015-05-23 11:02 ` LiaoQingwei
2015-05-25 2:51 ` Cui Bixuan
0 siblings, 1 reply; 3+ messages in thread
From: LiaoQingwei @ 2015-05-23 11:02 UTC (permalink / raw)
To: liaoqingwei; +Cc: ltp-list
Please forgive my careless,I send a wrong patch,please ignored.The patch v2 maybe right.
Thanks.
Most of the time,the reason of mount cgroup failed is the configuration
is not enabled,for example,CONFIG_CGROUP_CPUACCT=no.
I think use TCONF message is more helpful,and use basic test interface
tst_brkm instead of echo failed message.
Signed-off-by: Liao Qingwei <liaoqingwei@huawei.com>
---
testcases/kernel/controllers/cpuacct/cpuacct_setup.sh | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
index 6eab1b4..f9c4fb8 100755
--- a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
+++ b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
@@ -97,10 +97,8 @@ setup()
mount -t cgroup -ocpuacct none /dev/cpuacct 2> /dev/null
if [ $? -ne 0 ]
then
- echo "TFAIL: Could not mount cgroup filesystem"
- echo "Exiting test"
- cleanup
- exit 1
+ tst_brkm TCONF cleanup "Could not mount cgroup filesystem,Maybe the configuration is not enabled"
+ exit 0
fi
# Group created earlier may again be visible if not cleaned properly.
--
1.9.1
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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] [PATCH v2] controllers/cpuacct: tst_brkm() instead of echo failed message
2015-05-23 11:02 ` [LTP] [PATCH v2] controllers/cpuacct: tst_brkm() instead of echo failed message LiaoQingwei
@ 2015-05-25 2:51 ` Cui Bixuan
0 siblings, 0 replies; 3+ messages in thread
From: Cui Bixuan @ 2015-05-25 2:51 UTC (permalink / raw)
To: LiaoQingwei; +Cc: ltp-list
On 2015/5/23 19:02, LiaoQingwei wrote:
> Please forgive my careless,I send a wrong patch,please ignored.The patch v2 maybe right.
> Thanks.
>
> Most of the time,the reason of mount cgroup failed is the configuration
> is not enabled,for example,CONFIG_CGROUP_CPUACCT=no.
> I think use TCONF message is more helpful,and use basic test interface
> tst_brkm instead of echo failed message.
>
> Signed-off-by: Liao Qingwei <liaoqingwei@huawei.com>
> ---
> testcases/kernel/controllers/cpuacct/cpuacct_setup.sh | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
> index 6eab1b4..f9c4fb8 100755
> --- a/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
> +++ b/testcases/kernel/controllers/cpuacct/cpuacct_setup.sh
> @@ -97,10 +97,8 @@ setup()
> mount -t cgroup -ocpuacct none /dev/cpuacct 2> /dev/null
> if [ $? -ne 0 ]
> then
> - echo "TFAIL: Could not mount cgroup filesystem"
> - echo "Exiting test"
> - cleanup
> - exit 1
> + tst_brkm TCONF cleanup "Could not mount cgroup filesystem,Maybe the configuration is not enabled"
If want to call tst_brkm(), you should add the test.sh library in the case.
Or even better the test should do some clean up if use the test.sh library,
change "echo" to tst_resm INFO and "echo TFAIL" to tst_brkm TFAIL(remove the exit 1).
In addition, I don't think that call tst_brkm TCONF is suitable if mount failed.
Maybe we can add the message such as "Could not mount cgroup filesystem, and Maybe
the configuration is not enabled ..."
Also, check the patch with 'checkpatch.pl' script, fix warnings and errors.
> + exit 0
> fi
>
> # Group created earlier may again be visible if not cleaned properly.
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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:[~2015-05-25 2:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-23 18:01 [LTP] [PATCH] controllers/cpuacct: tst_brkm() instead of exit liaoqingwei
2015-05-23 11:02 ` [LTP] [PATCH v2] controllers/cpuacct: tst_brkm() instead of echo failed message LiaoQingwei
2015-05-25 2:51 ` Cui Bixuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox