summaryrefslogtreecommitdiffstats
path: root/tests/libcgrouptest.h
diff options
context:
space:
mode:
authorDhaval Giani <dhaval@linux.vnet.ibm.com>2008-07-01 14:09:44 +0000
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2008-07-01 14:09:44 +0000
commit1c34ab88c3269382d37f77dc1b03637617655e1a (patch)
tree57c468163deeb317c2f49af90df51270b8ea519b /tests/libcgrouptest.h
parent294c69b6d22d4c097f2deec277f1ffa3f431c841 (diff)
downloadlibcg-1c34ab88c3269382d37f77dc1b03637617655e1a.tar.gz
libcg-1c34ab88c3269382d37f77dc1b03637617655e1a.tar.xz
libcg-1c34ab88c3269382d37f77dc1b03637617655e1a.zip
From: Sudhir Kumar <skumar@linux.vnet.ibm.com>
libcgroup: adds sanity check in libcgroup testcases binary This patch adds a sanity check on cgroup file system info in testcases. If cgroup filesystem is not mounted and script sends the info as mounted, then the binar would have failed. This patch handles that. Signed-off-by: Sudhir Kumar <skumar@linux.vnet.ibm.com> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@95 4f4bb910-9a46-0410-90c8-c897d4f1cd53
Diffstat (limited to 'tests/libcgrouptest.h')
-rw-r--r--tests/libcgrouptest.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/libcgrouptest.h b/tests/libcgrouptest.h
index 1efc4b8..73c4a9b 100644
--- a/tests/libcgrouptest.h
+++ b/tests/libcgrouptest.h
@@ -20,6 +20,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <mntent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -67,6 +68,7 @@ static int set_controller(int controller, char *controller_name,
static int group_modified(char *path_control_file, int value_type);
struct cgroup *new_cgroup(char *group, char *controller_name,
char *control_file, int value_type);
+int check_fsmounted();
static inline pid_t cgrouptest_gettid()
{