• Pavel Tikhomirov's avatar
    zdtm/lib: add pre-dump-notify test flag · e071c2a6
    Pavel Tikhomirov authored
    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: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarPavel Tikhomirov <ptikhomirov@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    e071c2a6
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...