The Linux Foundation is a non-profit consortium dedicated to fostering the growth of Linux.
Contents |
This is the devchk test suite, also known as lsb-hdrchk. It is used for development environment verification. This test suite verifies different values in specific header files that might affect the ABI sepcified by LSB. At the moment, this test is only used for internal activities and is not released as part of the certification program.
Note: this test can be built in TET (emulation) and non-TET mode. TET mode is not currently being used, but would be needed if the test were released externally.
DevChk tests are generated by the mktests script located at misc-test/devchk/ts/devchk directory. It requires target LSB version to be passed using '-v' option, i.e.
./mktests -v 4.0
The script uses common variables (LSBDB, LSBUSER, LSBDBHOST and LSBDBPASSWD) to access the database.
The script generates one *.c file per header, hdrchk.c file that calls all the tests and makefile to compile them all.
DevChk can be built to either check the system headers (simply run make) or to test LSB SDK headers located at the /opt/lsb/include directory (to do this, set LSB_PRODUCT variable to any non-empty value before running make).
As a result of the build process, `hdrchk` executable is created that should be executed to obtain the test results. Note: For many kinds of issues dechk suggests SQL queris that should be executed to fix the database data.
When building devchk with upstream headers, one may explore some issues which are caused by changes in headers that actually don't break the ABI and thus should be ignored. Since devchk tests are generated from the database, it is not good to make any fixes in the source files themselves. Instead, one should place necessary code that should be added to the test of particular header to the appropriate file with 'inc' suffix. The content of such file is inserted in the generated test before the target header inclusion. This is not very flexoble, but helps to easily solve most of issues.