[LTP] Test library API changes
Jan Stancek
jstancek@redhat.com
Fri Mar 18 10:44:42 CET 2016
----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: ltp@lists.linux.it
> Sent: Thursday, 17 March, 2016 5:06:06 PM
> Subject: Re: [LTP] Test library API changes
>
> Hi!
> I've rethinked the thread safety and LTP library and rewrote the
> documentation, there are no changes to the library as the ideal place to
> deal with thread safety is the user supplied cleanup.
>
> Can you please review:
>
> https://github.com/metan-ucw/ltp/blob/master/doc/test-writing-guidelines.txt#L732
Looks good to me.
"Only the main thread must return from the 'test()' function to the test
library"
We could also use an atomic flag in library to detect that
more threads escaped.
- in run_tests() after test_all() / test()
- in do_cleanup() after cleanup()
If flag is more then 1 then we know something is wrong,
e.g. more than 1 thread escaped cleanup() or test().
Regards,
Jan
>
> There is also a new test at:
>
> https://github.com/metan-ucw/ltp/blob/master/lib/newlib_tests/test08.c
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
More information about the ltp
mailing list