[LTP] Test library API changes

Cyril Hrubis chrubis@suse.cz
Wed Mar 2 15:44:21 CET 2016


Hi!
The up to date version is at usuall place at:

https://github.com/metan-ucw/ltp


The changes are:

* acnt was removed completly

* the bitflags in struct tst_test were fixed to be 1 bit wide

* the headers were changed so that most of the old headers starts with
  old_ prefix

  The safe_macros.h and test.h were left intact at the moment since
  these are included in numerous testcases. We can rename them in a
  separate patch if needed.

* Added macro TST_TEST_TCONF() to ease writing testcases that are
  guarded by #ifdefs, see newly converted llistxattr testcases

* Few more converted testcases

* Started to update Test-Writing-Guidelines for new API


The open issues:

* The SHM base file path propagation
  - we will probably go with the env variable

* Finishing rewrite of Test Writing Guidelines
  - needs just a bit more work

* Should we allow SAFE_MACROS() in cleanup?

  - we can easily do that since cleanup is executed from the test
    library and we can change tst_brk() to return to the caller
    if cleanup was entered

  - plus point is that writing cleanup is bit easier

  - minus point is that tst_brk() can now return and as a side effect
    tst_brkm() has to return as well (since tst_brkm() from safe macros
    is redirected to tst_brk()) and because of that we have to drop
    the __attribute__((noreturn)) since that causes gcc to optimize out
    return statements from the function which generates compilation
    warnings in some cases


Is there anything else?

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list