5c189fccaf2147dfd682f27dd89c3e9d3243af09 |
|
27-Feb-2017 |
Alexey Kodanev <alexey.kodanev@oracle.com> |
lib: add safe_setsockopt/send/sendto functions Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
/external/ltp/lib/safe_net.c
|
d101cabf6356d7a3fb027b20ef709d235d708c2b |
|
14-Feb-2017 |
Cyril Hrubis <chrubis@suse.cz> |
lib: Redirect to tst_brk_() early This is first patch of a patchset that would allow us to use SAFE_MACROS() in newlib testcases. After the patch we redirect to tst_brk_() in case of newlib tests directly in the test library code. This is needed since the tst_brkm_() from the old library is marked as attribute ((noreturn)) and because of that the return address is not saved on stack and hence we cannot return from the function. Removing the atrribute is not an option either since that generates ~1000 "control reaches end of non-void function" warnings. This commit redefines tst_brkm in test.h for the test library code so that we branch depending on if we are running oldlib/newlib testcase and call corresponding tst_brk_() or tst_brkm_() function directly instead of branching in the tst_brkm_() code. We also had to add a few returns to various places in the test library so that we exit corresponding function in a case that tst_brkm() actually returned. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/lib/safe_net.c
|
5065a9eb67f7059b9cb98cd905218923d08bf301 |
|
16-Jun-2016 |
Alexey Kodanev <alexey.kodanev@oracle.com> |
lib: add safe_gethostname() Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/lib/safe_net.c
|
bbdb9f78378c7e038f463efa39d2470e1c51ad54 |
|
16-Mar-2016 |
Cyril Hrubis <chrubis@suse.cz> |
lib: Add new test library API The main features are: o The cleanup callback is not passed directly to various library functions but is set once globally in the structure that describes a test - this makes the test API easier to use - also fixes a few common mistakes such as passing cleanup callback to functions executed from a cleanup o Most of the boilerplate code is moved to library - no more copying standard looping code around :) o Various resources are initialized and freed automatically when requested - this means much less race conditions and ordering problems in cleanups o The result reporting functions now use shared memory to propagate test results from child processes - writing tests in child processes is now easier than ever + The test-writing-guidelines.txt were updated Many thanks to Jan who reviewed numerous respins of this patches and provided valuable suggestions and also to Alexey who pointed out some stupid mistakes of mine. Reviewed-by: Jan Stancek <jstancek@redhat.com> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/lib/safe_net.c
|
370a3a4637a1e36e5e0959841b7862dcd3a5a12d |
|
21-Oct-2015 |
Zeng Linggang <zenglg.jy@cn.fujitsu.com> |
SAFE_MACROS: Add socket(), bind(), listen(), connect() and getsockname() Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
/external/ltp/lib/safe_net.c
|