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
90b2c9b4
Commit
90b2c9b4
authored
Feb 25, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zdtm: Print /proc/locks in lock tests to investigate random failures
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
e10b3ef4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
1 deletion
+17
-1
file_locks01.c
test/zdtm/live/static/file_locks01.c
+4
-0
file_locks02.c
test/zdtm/live/static/file_locks02.c
+4
-0
file_locks03.c
test/zdtm/live/static/file_locks03.c
+4
-0
file_locks04.c
test/zdtm/live/static/file_locks04.c
+4
-0
file_locks05.c
test/zdtm/live/static/file_locks05.c
+1
-1
No files found.
test/zdtm/live/static/file_locks01.c
View file @
90b2c9b4
...
@@ -85,7 +85,11 @@ static int check_file_locks()
...
@@ -85,7 +85,11 @@ static int check_file_locks()
if
(
!
fp_locks
)
if
(
!
fp_locks
)
return
-
1
;
return
-
1
;
test_msg
(
"C: %d/%d/%d
\n
"
,
inodes
[
0
],
inodes
[
1
],
inodes
[
2
]);
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
test_msg
(
"c: %s"
,
buf
);
if
(
strstr
(
buf
,
"->"
))
if
(
strstr
(
buf
,
"->"
))
continue
;
continue
;
...
...
test/zdtm/live/static/file_locks02.c
View file @
90b2c9b4
...
@@ -27,7 +27,11 @@ static int check_file_locks()
...
@@ -27,7 +27,11 @@ static int check_file_locks()
if
(
!
fp_locks
)
if
(
!
fp_locks
)
return
-
1
;
return
-
1
;
test_msg
(
"C: %d
\n
"
,
pid
);
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
test_msg
(
"c: %s"
,
buf
);
if
(
strstr
(
buf
,
"->"
))
if
(
strstr
(
buf
,
"->"
))
continue
;
continue
;
...
...
test/zdtm/live/static/file_locks03.c
View file @
90b2c9b4
...
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid)
...
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid)
if
(
!
fp_locks
)
if
(
!
fp_locks
)
return
-
1
;
return
-
1
;
test_msg
(
"C: %d/%d
\n
"
,
pid
,
alt_pid
);
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
test_msg
(
"c: %s"
,
buf
);
if
(
strstr
(
buf
,
"->"
))
if
(
strstr
(
buf
,
"->"
))
continue
;
continue
;
...
...
test/zdtm/live/static/file_locks04.c
View file @
90b2c9b4
...
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid, int fd)
...
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid, int fd)
if
(
!
fp_locks
)
if
(
!
fp_locks
)
return
-
1
;
return
-
1
;
test_msg
(
"C: %d/%d
\n
"
,
pid
,
alt_pid
);
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
while
(
fgets
(
buf
,
sizeof
(
buf
),
fp_locks
))
{
test_msg
(
"c: %s"
,
buf
);
if
(
strstr
(
buf
,
"->"
))
if
(
strstr
(
buf
,
"->"
))
continue
;
continue
;
...
...
test/zdtm/live/static/file_locks05.c
View file @
90b2c9b4
...
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
...
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
if
(
flock
(
fd2
,
LOCK_SH
)
==
0
)
if
(
flock
(
fd2
,
LOCK_SH
)
==
0
)
pass
();
pass
();
else
else
fail
(
"Flock file locks check failed
"
);
fail
(
"Flock file locks check failed
(%d)"
,
errno
);
close
(
fd
);
close
(
fd
);
close
(
fd2
);
close
(
fd2
);
...
...
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