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
5975c94e
Commit
5975c94e
authored
Apr 23, 2014
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Add testing of irmap cache generation
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
a20011ac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
0 deletions
+77
-0
zdtm.sh
test/zdtm.sh
+6
-0
Makefile
test/zdtm/live/static/Makefile
+1
-0
inotify_irmap.c
test/zdtm/live/static/inotify_irmap.c
+70
-0
No files found.
test/zdtm.sh
View file @
5975c94e
...
@@ -68,6 +68,7 @@ static/unlink_mmap02
...
@@ -68,6 +68,7 @@ static/unlink_mmap02
static/eventfs00
static/eventfs00
static/signalfd00
static/signalfd00
static/inotify00
static/inotify00
static/inotify_irmap
static/fanotify00
static/fanotify00
static/unbound_sock
static/unbound_sock
static/fifo-rowo-pair
static/fifo-rowo-pair
...
@@ -162,6 +163,7 @@ maps007
...
@@ -162,6 +163,7 @@ maps007
tempfs
tempfs
bind-mount
bind-mount
mountpoints
mountpoints
inotify_irmap
"
"
source
$(
readlink
-f
`
dirname
$0
`
/env.sh
)
||
exit
1
source
$(
readlink
-f
`
dirname
$0
`
/env.sh
)
||
exit
1
...
@@ -469,6 +471,10 @@ EOF
...
@@ -469,6 +471,10 @@ EOF
ps_args
=
"--auto-dedup"
ps_args
=
"--auto-dedup"
fi
fi
if
echo
$tname
| fgrep
-q
'irmap'
;
then
args
=
"
$args
--force-irmap"
fi
for
i
in
`
seq
$ITERATIONS
`
;
do
for
i
in
`
seq
$ITERATIONS
`
;
do
local
dump_only
=
local
dump_only
=
local
postdump
=
local
postdump
=
...
...
test/zdtm/live/static/Makefile
View file @
5975c94e
...
@@ -73,6 +73,7 @@ TST_NOFILE = \
...
@@ -73,6 +73,7 @@ TST_NOFILE = \
eventfs00
\
eventfs00
\
signalfd00
\
signalfd00
\
inotify00
\
inotify00
\
inotify_irmap
\
fanotify00
\
fanotify00
\
uptime_grow
\
uptime_grow
\
session00
\
session00
\
...
...
test/zdtm/live/static/inotify_irmap.c
0 → 100644
View file @
5975c94e
#define _GNU_SOURCE
/* See feature_test_macros(7) */
#include <unistd.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <sys/inotify.h>
#include <unistd.h>
#include <stdlib.h>
#include "zdtmtst.h"
const
char
*
test_doc
=
"Check for irmap"
;
const
char
*
test_author
=
"Pavel Emelyanov <xemul@parallels.com>"
;
#define TDIR "/etc"
#define TFIL TDIR"/zdtm-test"
#define BUFF_SIZE ((sizeof(struct inotify_event) + PATH_MAX))
int
main
(
int
argc
,
char
*
argv
[])
{
char
buf
[
BUFF_SIZE
];
int
fd
,
wd
;
test_init
(
argc
,
argv
);
mkdir
(
TDIR
,
0600
);
unlink
(
TFIL
);
if
(
creat
(
TFIL
,
0600
)
<
0
)
{
err
(
"Can't make test file"
);
exit
(
1
);
}
fd
=
inotify_init1
(
IN_NONBLOCK
);
if
(
fd
<
0
)
{
fail
(
"inotify_init failed"
);
unlink
(
TFIL
);
exit
(
1
);
}
wd
=
inotify_add_watch
(
fd
,
TFIL
,
IN_OPEN
);
if
(
wd
<
0
)
{
fail
(
"inotify_add_watch failed"
);
unlink
(
TFIL
);
exit
(
1
);
}
test_daemon
();
test_waitsig
();
memset
(
buf
,
0
,
sizeof
(
buf
));
wd
=
open
(
TFIL
,
O_RDONLY
);
if
(
read
(
fd
,
buf
,
sizeof
(
buf
))
<=
0
)
{
unlink
(
TFIL
);
fail
(
"No events in queue"
);
exit
(
1
);
}
close
(
wd
);
close
(
fd
);
unlink
(
TFIL
);
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