criu/test/zdtm/lib
Pavel Tikhomirov 348c39bf14 zdtm/lib: add pre-dump-notify test flag
If pre-dump-notify flag is set, zdtm sends a notify to the test after
pre-dump was finished and waits for the test to send back a reply that
test did all it's work and now is ready for a next pre-dump/dump.

How it can be used:

while (!test_wait_pre_dump()) {
	/* Do something after predump */
	test_wait_pre_dump_ack();
}
/* Do something after restore */

Internally we open two pipes for the test one for receiving notify (with
two open ends) and one for replying to it (only write end open). Fds of
pipes are dupped to predefined numbers and zdtm opens these fds through
/proc/<test-pid>/fd/{100,101} and communicates with the test.

v9: switch to two way interface to remove race then operation we try to
run after predump may be yet unfinished at the time of next dump.

Suggested-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-04-27 01:04:15 +03:00
..
arch s390/zdtm: Also support z900 (debian) 2017-08-09 18:51:41 +03:00
cpuid.h zdtm: Add cpuid.h 2012-12-21 17:35:44 +04:00
datagen.c zdtm: avoid arithmetic overflow in datagen and datachk 2017-10-22 06:34:53 +03:00
fs.c zdtm: fix gcc-8 warnings 2018-02-13 10:16:36 +03:00
fs.h include sys/sysmacros.h for minor/major/makedev funcs 2016-12-09 22:42:27 +03:00
groups.c zdtm: Get dir of init.pid file 2016-03-09 12:49:52 +03:00
groups.desc zdtm.py: The groups_test class for running groups 2015-12-08 14:54:52 +03:00
lock.c zdtm: rely on -D_GNU_SOURCE passed from Makefiles 2017-04-11 09:01:08 +03:00
lock.h zdtm: calling futex via syscall saves error codes in errno 2018-04-26 22:03:35 +03:00
Makefile test/make: Include .d files 2018-04-26 22:03:35 +03:00
msg.c test_msg(): avoid recursion 2015-10-26 12:12:54 +03:00
ns.c zdtm/lib: add pre-dump-notify test flag 2018-04-27 01:04:15 +03:00
ns.h zdtm/lib: add pre-dump-notify test flag 2018-04-27 01:04:15 +03:00
parseargs.c zdtm: close an external tty 2012-09-13 16:09:13 +04:00
parseargs.sh zdtm: Zero Downtime Migration Test Suite 2011-12-02 17:49:08 +04:00
stop_and_chk.sh zdtm: Zero Downtime Migration Test Suite 2011-12-02 17:49:08 +04:00
streamutil.c zdtm: lib: add {read,write}_data helpers 2017-11-30 21:58:59 +03:00
tcp.c zdtm: check a case when one port is shared between two sockets 2017-11-23 20:23:14 +03:00
test.c zdtm/lib: add pre-dump-notify test flag 2018-04-27 01:04:15 +03:00
zdtmtst.h zdtm/lib: add pre-dump-notify test flag 2018-04-27 01:04:15 +03:00