-
Notifications
You must be signed in to change notification settings - Fork 7
LTP Library API Writing Guidelines
Note
|
See also Test Writing Guidelines, C Test API, Shell Test API. |
For extending library API it applies the same general rules as for writing tests, (see Test Writing Guidelines, offline: doc/test-writing-guidelines.txt), with strong focus on readability and simplicity.
Library tests are in lib/newlib_tests directory.
Don’t forget to update docs when you change the API.
API source code is in headers include/*.h
, include/lapi/*.h
(backward
compatibility for old kernel and libc) and C sources in lib/*.c
. Files have
tst_ prefix.
The test author is guaranteed that the test API will not modify these variables. This prevents silent errors where the return value and errno are overwritten before the test has chance to check them.
The macros which are clearly intended to update these variables. That
is TEST
and those in tst_test_macros.h. Are of course allowed to
update these variables.