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
b0aa868d
Commit
b0aa868d
authored
Apr 10, 2012
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Add test for close-on-exec bits
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
05e3c4d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
file_shared.c
test/zdtm/live/static/file_shared.c
+14
-0
No files found.
test/zdtm/live/static/file_shared.c
View file @
b0aa868d
...
@@ -43,6 +43,7 @@ int main(int argc, char **argv)
...
@@ -43,6 +43,7 @@ int main(int argc, char **argv)
if
(
pid
==
-
1
)
if
(
pid
==
-
1
)
return
1
;
return
1
;
else
if
(
pid
)
{
else
if
(
pid
)
{
fcntl
(
fd2
,
F_SETFD
,
1
);
test_waitsig
();
test_waitsig
();
off
=
lseek
(
fd
,
OFFSET
,
SEEK_SET
);
off
=
lseek
(
fd
,
OFFSET
,
SEEK_SET
);
if
(
off
==
(
off_t
)
-
1
)
if
(
off
==
(
off_t
)
-
1
)
...
@@ -77,6 +78,19 @@ int main(int argc, char **argv)
...
@@ -77,6 +78,19 @@ int main(int argc, char **argv)
fail
(
"offset2 fail
\n
"
);
fail
(
"offset2 fail
\n
"
);
return
1
;
return
1
;
}
}
ret
=
fcntl
(
fd
,
F_GETFD
,
0
);
if
(
ret
!=
0
)
{
fail
(
"fd cloexec broken
\n
"
);
return
1
;
}
ret
=
fcntl
(
fd2
,
F_GETFD
,
0
);
if
(
ret
!=
1
)
{
fail
(
"fd2 cloexec broken
\n
"
);
return
1
;
}
}
else
{
}
else
{
test_waitsig
();
test_waitsig
();
off
=
lseek
(
fd
,
0
,
SEEK_CUR
);
off
=
lseek
(
fd
,
0
,
SEEK_CUR
);
...
...
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