public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] controllers/cpuacct: add kernel version check
@ 2015-11-19  9:49 Xiao Yang
  2015-11-19 12:05 ` Cyril Hrubis
  0 siblings, 1 reply; 5+ messages in thread
From: Xiao Yang @ 2015-11-19  9:49 UTC (permalink / raw)
  To: ltp

Cpuacct should be supported with kernel 2.6.30 or newer

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---
 testcases/kernel/controllers/cpuacct/cpuacct.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testcases/kernel/controllers/cpuacct/cpuacct.sh b/testcases/kernel/controllers/cpuacct/cpuacct.sh
index 8552b5e..9916367 100755
--- a/testcases/kernel/controllers/cpuacct/cpuacct.sh
+++ b/testcases/kernel/controllers/cpuacct/cpuacct.sh
@@ -48,6 +48,11 @@ setup()
 {
 	tst_require_root
 
+	tst_kvercmp 2 6 30
+	if [ $? -eq 0 ]; then
+		tst_brkm TCONF "Test should be run with kernel 2.6.30 or newer"
+	fi
+
 	mount_point=`grep -w cpuacct /proc/mounts | cut -f 2 | cut -d " " -f2`
 	tst_resm TINFO "cpuacct: $mount_point"
 	if [ "$mount_point" = "" ]; then
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-11-24 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-19  9:49 [LTP] [PATCH] controllers/cpuacct: add kernel version check Xiao Yang
2015-11-19 12:05 ` Cyril Hrubis
2015-11-20  3:10   ` yangxiao
2015-11-20  5:36   ` [LTP] [PATCH v2] controllers/cpuacct: add cpuacct availability check Xiao Yang
2015-11-24 13:02     ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox