mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
zdtm: Print /proc/locks in lock tests to investigate random failures
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -85,7 +85,11 @@ static int check_file_locks()
|
||||
if (!fp_locks)
|
||||
return -1;
|
||||
|
||||
test_msg("C: %d/%d/%d\n", inodes[0], inodes[1], inodes[2]);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp_locks)) {
|
||||
test_msg("c: %s", buf);
|
||||
|
||||
if (strstr(buf, "->"))
|
||||
continue;
|
||||
|
||||
|
@@ -27,7 +27,11 @@ static int check_file_locks()
|
||||
if (!fp_locks)
|
||||
return -1;
|
||||
|
||||
test_msg("C: %d\n", pid);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp_locks)) {
|
||||
test_msg("c: %s", buf);
|
||||
|
||||
if (strstr(buf, "->"))
|
||||
continue;
|
||||
|
||||
|
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid)
|
||||
if (!fp_locks)
|
||||
return -1;
|
||||
|
||||
test_msg("C: %d/%d\n", pid, alt_pid);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp_locks)) {
|
||||
test_msg("c: %s", buf);
|
||||
|
||||
if (strstr(buf, "->"))
|
||||
continue;
|
||||
|
||||
|
@@ -27,7 +27,11 @@ static int check_file_locks(int alt_pid, int fd)
|
||||
if (!fp_locks)
|
||||
return -1;
|
||||
|
||||
test_msg("C: %d/%d\n", pid, alt_pid);
|
||||
|
||||
while (fgets(buf, sizeof(buf), fp_locks)) {
|
||||
test_msg("c: %s", buf);
|
||||
|
||||
if (strstr(buf, "->"))
|
||||
continue;
|
||||
|
||||
|
@@ -42,7 +42,7 @@ int main(int argc, char **argv)
|
||||
if (flock(fd2, LOCK_SH) == 0)
|
||||
pass();
|
||||
else
|
||||
fail("Flock file locks check failed");
|
||||
fail("Flock file locks check failed (%d)", errno);
|
||||
|
||||
close(fd);
|
||||
close(fd2);
|
||||
|
Reference in New Issue
Block a user