Skip to content

Commit

Permalink
diotest: Fix the repeated log printing problem
Browse files Browse the repository at this point in the history
Fix the problem of repeated printing logs when the dio module specifies
the output log file. This is a typical buffer problem. In the
diotest6/diotes3 third step will fork lots of process. If the cache
subprocess is not cleaned up, the cache generated in the previous step
will be copied, and then when each process exits, a large number of
repeated prints will be generated.

Signed-off-by: Duncan.chu <[email protected]>
Reviewed-by: Cyril Hrubis <[email protected]>
  • Loading branch information
LinuxVWQH authored and metan-ucw committed Jul 12, 2023
1 parent 4344cca commit bf4e683
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions testcases/kernel/io/direct_io/diotest3.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ int main(int argc, char *argv[])
}
unlink(filename);
free(pidlst);
fflush(stdout);
total++;

/* Testblock-2: Write with Direct IO, Read without */
Expand All @@ -309,6 +310,7 @@ int main(int argc, char *argv[])
}
unlink(filename);
free(pidlst);
fflush(stdout);
total++;

/* Testblock-3: Read, Write with Direct IO. */
Expand Down
2 changes: 2 additions & 0 deletions testcases/kernel/io/direct_io/diotest6.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ int main(int argc, char *argv[])
}
unlink(filename);
free(pidlst);
fflush(stdout);
total++;

/* Testblock-2: Write with Direct IO, Read without */
Expand All @@ -337,6 +338,7 @@ int main(int argc, char *argv[])
}
unlink(filename);
free(pidlst);
fflush(stdout);
total++;

/* Testblock-3: Read, Write with Direct IO. */
Expand Down

0 comments on commit bf4e683

Please sign in to comment.