criu/test
Eugene Batalov 40a7f3854f test: fix race in transition/maps008 that lead to fail of test
Running test/zdtm.py run -t zdtm/transition/maps008 --snap --pre 30
in a loop I got test failure with "Mem differs"
error each ~20 minutes. The cause of the bug is in lack of
synchronization between processes that still do datagen stage of
test and processes that already do datacheck stage of test.
As a result we can get "Mem differs" error if:
1. Process P1 being on datacheck stage fetches a byte with
   offset X from ashmem vma VMA1 into CPU register.
2. Process P2 still being on datagen stage changes byte with offset X
   in the same ashmem vma VMA1.
3. Process P1 fetches byte with offset X from another ashmem vma VMA2
   mapped to the same physical memory as VMA1.
4. Process P1 compares two fetched bytes and finds out that they
   have different values.
5. Process P1 reports "Mem differs" error.

Race is fixed by waiting for all processes to exit datagen stage
before proceeding to datacheck stage.

Signed-off-by: Eugene Batalov <eabatalov89@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-09-06 19:31:20 +03:00
..
inhfd test: check restoring external fifo-s 2016-02-17 13:50:46 +03:00
jenkins test: don't do MS_REC|MS_PRIVATE for host mounts 2016-09-06 19:31:20 +03:00
others test/other: check criu exec 2016-08-01 16:51:33 +03:00
zdtm test: fix race in transition/maps008 that lead to fail of test 2016-09-06 19:31:20 +03:00
.gitignore gitignore: add zdtm_mount_cgroups.lock 2016-02-26 14:58:08 +03:00
abrt.sh travis: catch core dump files in error cases 2016-09-06 19:31:20 +03:00
check_actions.py test: Check action scripts to work as we expect 2016-05-06 14:39:25 +03:00
crit-recode.py test/crit-recode: skip images with zero size 2016-06-28 13:12:26 +03:00
groups.desc zdtm.py: Generator of groups of tests 2015-12-08 14:54:41 +03:00
inhfd.desc zdtm.py: Add inhfd tests for --inherit-fd option 2015-10-19 12:42:01 +03:00
Makefile zdtm: check mounts of external devices 2016-05-27 13:31:14 +03:00
show_action.sh test: Check action scripts to work as we expect 2016-05-06 14:39:25 +03:00
zdtm.desc test: Get rid of live directory 2016-02-20 13:40:52 +03:00
zdtm.py travis: catch core dump files in error cases 2016-09-06 19:31:20 +03:00
zdtm_ct.c test: don't do MS_REC|MS_PRIVATE for host mounts 2016-09-06 19:31:20 +03:00
zdtm_mount_cgroups tests: prevent zdtm_mount_cgroups from failing w/ EBUSY 2016-02-03 16:25:28 +03:00