[CRIU] [PATCH cr] zdtm: add new test case for testing logic about
COW memory (v2)
Stanislav Kinsbursky
skinsbursky at parallels.com
Thu Nov 1 04:05:45 EDT 2012
01.11.2012 00:02, Andrey Vagin пишет:
> This test tests the following combinations:
>
> 1. parent and child have a cow-ed mapping
> 2. parent and child have just coinciding mappings
>
> the pages state in both should be in all possible combinations of
>
> a. write mapped
> b. read mapped
> c. not touched
> d. before fork
> e. after fork
>
> v2: * wait until a child are not prepared
> * check a FILE | PRIVATE mappings
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> test/zdtm.sh | 1 +
> test/zdtm/lib/datagen.c | 25 +++
> test/zdtm/lib/zdtmtst.h | 4 +
> test/zdtm/live/static/Makefile | 1 +
> test/zdtm/live/static/cow01.c | 405 ++++++++++++++++++++++++++++++++++++++++
> 5 files changed, 436 insertions(+), 0 deletions(-)
> create mode 100644 test/zdtm/live/static/cow01.c
>
> diff --git a/test/zdtm.sh b/test/zdtm.sh
> index 094fe96..950e8ef 100644
> --- a/test/zdtm.sh
> +++ b/test/zdtm.sh
> @@ -63,6 +63,7 @@ static/pty00
> static/pty01
> static/pty04
> static/cow00
> +static/cow01
> "
> # Duplicate list with ns/ prefix
> TEST_LIST=$TEST_LIST$(echo $TEST_LIST | tr ' ' '\n' | sed 's#^#ns/#')
> diff --git a/test/zdtm/lib/datagen.c b/test/zdtm/lib/datagen.c
> index 29d0993..fc4be3d 100644
> --- a/test/zdtm/lib/datagen.c
> +++ b/test/zdtm/lib/datagen.c
> @@ -37,6 +37,23 @@ void datagen(uint8_t *buffer, unsigned length, uint32_t *crc)
> }
> }
>
> +void datagen2(uint8_t *buffer, unsigned length, uint32_t *crc)
If this is going to be a part of generic library, then name should be more
convenient for further use.
--
Best regards,
Stanislav Kinsbursky
More information about the CRIU
mailing list