]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
Add a new test command "proctest".
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Fri, 26 Jun 2009 06:11:16 +0000 (15:11 +0900)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Mon, 29 Jun 2009 11:23:21 +0000 (16:53 +0530)
commit81dda1ea06a62fb2db52af5c026ae196a2570702
tree35aec7252b412016ee9dd3a0cd499c2f9a95241c
parent20bbfbdfd8777de4cc1c83a9d583ace36c6f2cd2
Add a new test command "proctest".

Hi,

Changelog of v6:
================
 * New patch.

This patch adds a new test command "proctest" for testing both
cgroup_get_uid_gid_from_procfs() and cgroup_get_procname_from_procfs().

 # sleep 100 &
 [1] 28558
 # ./tests/proctest $$ 28558
   Pid  |        Process name              |  Uid  |  Gid
 -------+----------------------------------+-------+-------
  27219 |                        /bin/bash |     0 |     0
  28558 |                       /bin/sleep |     0 |     0
 #

The functions get a process information from /proc fs, and they are
fragile because the content of /proc fs is not stable. If changing
/proc fs in future, this test command will be useful for catching
the change.

Thanks
Ken'ichi Ohmichi

Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
tests/Makefile.am
tests/proctest.c [new file with mode: 0644]