• Pavel Emelyanov's avatar
    test, pipes: Exhaustive test of shared pipes · e51960ea
    Pavel Emelyanov authored
    So, here's the next test that just enumerates all possible states and checks
    that CRIU C/R-s it well. This time -- pipes. The goal of the test is to load
    the fd-sharing engine, so pipes are chosen, as they not only generate shared
    struct files, but also produce 2 descriptors in CRIU's fdesc->open callback
    which is handled separately.
    
    It's implemented slightly differently from the unix test, since we don't want
    to check sequences of syscalls on objects, we need to check the task to pipe
    relations in all possible ways.
    
    The 'state' is several tasks, several pipes and each generated test includes
    pipe ends sitting in all possible combinations in the tasks' FDTs.
    
    Also note, that states, that seem to be equal to each other, e.g. pipe between
    tasks A->B and pipe B->A, are really different as CRIU picks the pipe-restorer
    based in task PIDs. So whether the picked task has read end or write end at
    his FDT makes a difference on restore.
    
    Number of tasks is limited with --tasks option, number of pipes with the
    --pipes one. Test just runs all -- generates states, makes them and C/R-s
    them. To check the restored result the /proc/pid/fd/ and /proc/pid/fdinfo/
    for all restored tasks is analyzed.
    
    Right now CRIU works OK for --tasks 2 --pipes 2 (for more -- didn't check).
    Kirill, please, check that your patches pass this test.
    
    TODO:
    
     - Randomize FDs under which tasks see the pipes. Now all tasks if they have
       some pipe, all see it under the same set of FDs.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    e51960ea
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...