# Linux Kernel Module Cheat

#### 17.19.1. Linux Test Project

https://github.com/linux-test-project/ltp

Tests a lot of Linux and POSIX userland visible interfaces.

Buildroot already has a package, so it is trivial to build it:

    ./build-buildroot --config 'BR2_PACKAGE_LTP_TESTSUITE=y'

So now let’s try and see if the `exit` system call is working:

    /usr/lib/ltp-testsuite/testcases/bin/exit01

which gives successful output:

    exit01      1  TPASS  :  exit() test PASSED

and has source code at: https://github.com/linux-test-project/ltp/blob/20190115/testcases/kernel/syscalls/exit/exit01.c

Besides testing any kernel modifications you make, LTP can also be used to the system call implementation of User mode simulation as shown at User mode Buildroot executables:

    ./run --userland "$(./getvar buildroot_target_dir)/usr/lib/ltp-testsuite/testcases/bin/exit01"

Tested at: 287c83f3f99db8c1ff9bbc85a79576da6a78e986 + 1.