From Kerrighed

Contents

Kerrighed regression tests : KTP

Kerrighed regression tests are mostly derivative work from Linux Test Project. KTP stands for Kerrighed Test Project. The goal of those tests is to check the conformance of Kerrighed to Linux user interface. Some tests have been written to check features that are available in Kerrighed but not in Linux kernel, such as Checkpoint/Restart of applications.

Install standard LTP tests

Note: Up to date links to archives and patches are on the Development Tools page.

Unarchive ltp-full-YYYYMMDD.tgz, patch, compile and install LTP in the NFS root.

cd /path/to/
tar xzf /somewhere/ltp-full-YYYYMMDD.tgz
cd ltp-full-YYYYMMDD
patch -p1 < /somewhere/LTP-YYYYMMDD-krg-*.patch
make

As user root:

make install

WARNING: make install will not install binaries /usr/local/bin/ or something like that but in /path/to/ltp-full-YYYYMMDD/testcases/bin/

WARNING: /path/to/ must be accessible by user nobody, so it must not equal to /root/


Configure your Kerrighed sources to install Kerrighed-specific tests

In the following section, we admit you already have a working Kerrighed development environment.

Set the LTP base directory

cd /path/to/kerrighed-source/tests
cd tests
./configure --with-ltp-base="/path/to/ltp-full-YYYYMMDD"
cd ..

Rebuild Kerrighed

make kernel
make

Then, as user root:

make install


Running KTP tests

To run the full Kerrighed regression tests, once you have started your cluster. As root, on one of the node:

krgltp-smp.sh

Please note that the krgltp.sh script (the non-SMP version) is outdated, and has even got removed from trunk, so don't use it.


Troubleshooting

If one encounters troubles with fsync02, that might be caused by the use of an initramfs (aka. initrd), which might be using some large R/W buffers, that interfere with the tests. One can then try and pass the rsize/wsize options to the kernel command-line, for example:

nfsroot=192.168.0.1:/opt/sid+kerrighed,rsize=4096,wsize=4096

If the cr-pre file is missing, that's a missing Kerrighed-specific test. The problem is likely that the aforementioned “Configure your Kerrighed sources to install Kerrighed-specific tests” step hasn't been completed.

If the checkpoint/restart tests fail, that's likely because the new scheduler infrastructure isn't configured. As of revision 4729, it's no longer assumed that this infrastructure has been configured.


Adding new KTP tests

You can create tests either in C or in shell (sh or bash, please avoid all other shell that are not available on all linux distributions). Currently, dedicated tests to Kerrighed are only in shell (bash).

Main folder for KTP tests is tests/ktp/.

Checkpoint/restart tests are in tests/ktp/cr/.

You can read the documentation about writing tests here:

http://ltp.sourceforge.net/documentation/how-to/ltp.php#_4

http://ltp.sourceforge.net/documentation/how-to/ltp.php#_5

Once you have written a test and installed it (you need to modify Makefile.am), you can run it with

krgltp-smp.sh -p 1 -s mytest


Please, take care that your tests must be written to allow several executions in parallel. To run test "mytest" with several instances in parallel:

krgltp-smp.sh -s mytest