Always look here for latest version of these tests:
http://sourceforge.jp/projects/tomoyo/svn/view/trunk/2.2.x/kernel_test/?root=tomoyo

These testcases test the TOMOYO Security Module. And they are not part of
default LTP build/install/run.

A kernel with TOMOYO configured is required to run the TOMOYO testsuite.
The securityfs filesystem must be mounted at /sys/kernel/security .

Preparation steps are:

1) Download ccs-tools package from http://osdn.dl.sourceforge.jp/tomoyo/30298/
   and extract and build and install.

  # wget http://osdn.dl.sourceforge.jp/tomoyo/30298/ccs-tools-1.6.8-20090623.tar.gz
  # tar -zxf ccs-tools-1.6.8-20090623.tar.gz
  # make -C ccstools/ install 

  Programs are installed in /usr/lib/ccs/ directory and some symlinks are
  created in /usr/sbin/ directory with prefix "ccs-".

  You can make a RPM package by "rpmbuild -bb ccstools/ccs-tools.spec" and
  a DEB package by "alien -k" after "rpmbuild -bb".

2) Run /usr/lib/ccs/tomoyo_init_policy.sh .

   This will take several minutes.

   Hiding kernel source directory by "mount -t tmpfs none /usr/src/linux/"
   would save some time.

   Configuration files are saved in /etc/tomoyo/ directory.
   You can do "rm -fR /etc/tomoyo/" if you want to uninstall.

3) Reboot the system with TOMOYO enabled kernel.

   To make sure TOMOYO is selected, you can add security=tomoyo to kernel's
   command line.

4) Build the tests.

   # (extract the tar ball containing the tests.)
   # cd testcases/kernel/security/tomoyo/
   # make
   # find `/bin/pwd` -type f -perm +100 >> /etc/tomoyo/manager.conf
   # /usr/sbin/ccs-loadpolicy m

Test steps are:

1) Run the tests from the directory you ran "make".

   # ./testall.sh

   Please don't run the tests inside /tmp/ directory, for /tmp/ directory is
   hidden by "newns" (a wrapper program to run the test in a new namespace).

   You can use "| grep -vF OK" to pick up only failed tests as testall.sh does.
