554c270986c758a7ecbf315b5785d57a0957528b |
|
13-Feb-2017 |
Cyril Hrubis <chrubis@suse.cz> |
checkpoints: Add TST_SAFE_CHECKPOINT_WAIT2() The new macro allows user to pass timeout parameter as well. Signed-off-by: Cyril Hrubis <chrubis@suse.cz> Acked-by: Jan Stancek <jstancek@redhat.com>
/external/ltp/include/tst_checkpoint.h
|
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/include/tst_checkpoint.h
|
9f136a48c6205362cd8d35c726491ca93cb16514 |
|
17-Feb-2015 |
Cyril Hrubis <chrubis@suse.cz> |
lib: Rewrite checkpoint synchronization * Rewrite checkpoint synchronization (based on futexes now) * Fix all testcases to use the new interface * Update docs Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_checkpoint.h
|
4caa631c2eb013906c562f76c0fd14ac089c5386 |
|
06-Oct-2014 |
Jan Stancek <jstancek@redhat.com> |
checkpoints: introduce TST_CHECKPOINT_CREATE Rename tst_checkpoint_init to tst_checkpoint_create. Add tst_checkpoint_init, which only initializes checkpoint struct. Update existing testcases to use TST_CHECKPOINT_CREATE. Signed-off-by: Jan Stancek <jstancek@redhat.com> Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Acked-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_checkpoint.h
|
5b031505a81e9199802bb966962df708bd1f2339 |
|
02-Oct-2014 |
Matus Marhefka <mmarhefk@redhat.com> |
lib/tst_checkpoint.c: added support for unlimited number of named pipes Now both child and parent can wait for each other which was not possible using only one named pipe as it would cause race condition. Example of race condition which can be resolved by using two checkpoints instead of one (following is parent code): TST_CHECKPOINT_SIGNAL_CHILD(cleanup, &checkpoint); /* child now doing some action on which parent must wait to finish */ TST_CHECKPOINT_PARENT_WAIT(cleanup, &checkpoint); The problem here is that PARENT_WAIT() is usually executed immediately after SIGNAL_CHILD() which causes: 1) "Wrong data read from the pipe at ..." error message 2) that inside child, the call of CHILD_WAIT() hangs, because read was done from parent (by PARENT_WAIT() call) Signed-off-by: Matus Marhefka <mmarhefk@redhat.com> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_checkpoint.h
|
ab8388cbf2b9b2d1b85f89c5bd964cebdd2eefc1 |
|
28-Nov-2012 |
Cyril Hrubis <chrubis@suse.cz> |
Add easy to use API for parent-child synchronization. There are various places in LTP where execution of parent and child must be synchronized. Parent must run before the child or child must run before the parent. These situations are now handled by calls to sleep so that kernel scheduller has chance to run the process we need. This commit adds easy to use API to handle this problem correctly. It makes use of fifo as IPC mechanism which was used over pipe because pipe is not usable with LTP on uClinux. See lib/tests/tst_checkpoint_*.c for example usage. Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_checkpoint.h
|