Howto write LTP testcases

From openSUSE

This article needs to be expanded. If you can help please do so in line with the openSUSE Style Guide.

If you are looking for something to do, see the other articles that need expanding

Contents

What is the LTP?

Official Site

Libraries


How should a testcase be desinged?

Describe what the testcase should do and what it is going to test. If you use special data (thresholds) for comparison then explain how did you get this data. Some (timing-related) testcases are now buggy (behaving randomly) because the hardware is now faster, since they were written and without an clue of getting acceptable (reliable) new thresholds the testcase is less useable.

Return Codes


Example:

As example is the Cell platform implemention in the Linux kernel choosen, because there are not yet testcases in the LTP. Functions: register_spu_syscalls and unregister_spu_syscalls from file: linux-2.6.16/arch/powerpc/platforms/cell/spu_syscalls.c. The aim of the testcase is, to verify the working (in the meaning of: behavior & workflow) of the booth functions. So the first step is to have a look at the file spu_syscalls.c to obtain the definition and needed dependencies.


Links