Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
fd0d3801
Commit
fd0d3801
authored
Mar 01, 2013
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Test HUGE mappings to dump/restore OK
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
cf01381c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
zdtm.sh
test/zdtm.sh
+1
-0
Makefile
test/zdtm/live/static/Makefile
+1
-0
maps04.c
test/zdtm/live/static/maps04.c
+48
-0
No files found.
test/zdtm.sh
View file @
fd0d3801
...
...
@@ -11,6 +11,7 @@ static/env00
static/maps00
static/maps01
static/maps02
static/maps04
static/mprotect00
static/mtime_mmap
static/sleeping00
...
...
test/zdtm/live/static/Makefile
View file @
fd0d3801
...
...
@@ -61,6 +61,7 @@ TST_NOFILE = \
maps01
\
maps02
\
maps03
\
maps04
\
xids00
\
groups
\
file_fown
\
...
...
test/zdtm/live/static/maps04.c
0 → 100644
View file @
fd0d3801
#include <errno.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <linux/limits.h>
#include "zdtmtst.h"
#define PAGE_SIZE 4096
#define MEM_SIZE (1L << 29)
const
char
*
test_doc
=
"Test big mappings"
;
const
char
*
test_author
=
"Andrew Vagin <avagin@openvz.org"
;
int
main
(
int
argc
,
char
**
argv
)
{
void
*
m
;
uint32_t
crc
;
test_init
(
argc
,
argv
);
m
=
mmap
(
NULL
,
MEM_SIZE
,
PROT_WRITE
|
PROT_READ
,
MAP_PRIVATE
|
MAP_ANONYMOUS
,
-
1
,
0
);
if
(
m
==
MAP_FAILED
)
{
fail
();
return
1
;
}
crc
=
~
0
;
datagen
(
m
,
MEM_SIZE
,
&
crc
);
test_daemon
();
test_waitsig
();
crc
=
~
0
;
if
(
datachk
(
m
,
MEM_SIZE
,
&
crc
))
fail
(
"Mem corrupted"
);
else
pass
();
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment