Skip to content
Snippets Groups Projects
Commit 04d5cc22 authored by Moe Jette's avatar Moe Jette
Browse files

Add some more debugging for open file test.

parent dbf56c2b
No related branches found
No related tags found
No related merge requests found
...@@ -132,7 +132,7 @@ expect { ...@@ -132,7 +132,7 @@ expect {
} }
} }
if {$matches != 0} { if {$matches != 0} {
send_user "FAILURE: $matches of $interations tests failed\n" send_user "\nFAILURE: $matches of [expr $interations + 1] tests failed\n"
send_user " This should happen very rarely when JobAcctFrequency\n" send_user " This should happen very rarely when JobAcctFrequency\n"
send_user " is set to a small value and typically is indicative\n" send_user " is set to a small value and typically is indicative\n"
send_user " of a non-checkpointable job. For more information,\n" send_user " of a non-checkpointable job. For more information,\n"
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#define _DEBUG 0
main (int argc, char **argv) main (int argc, char **argv)
{ {
int i; int i;
...@@ -36,8 +38,17 @@ main (int argc, char **argv) ...@@ -36,8 +38,17 @@ main (int argc, char **argv)
/* start at fd=3 /* start at fd=3
* skip stdin, stdout, and stderr */ * skip stdin, stdout, and stderr */
for (i=3; i<256; i++) { for (i=3; i<256; i++) {
if (fstat(i, &buf) == 0) if (fstat(i, &buf))
printf("FAILED: File descriptor %d is open\n", i); continue;
printf("FAILED: File descriptor %d is open\n", i);
#if _DEBUG
printf(" st_mode: 0%o\n",(int) buf.st_mode);
printf(" st_uid: %d\n", (int) buf.st_uid);
printf(" st_gid: %d\n", (int) buf.st_gid);
printf(" st_size: %d\n", (int) buf.st_size);
printf(" st_ino: %d\n", (int) buf.st_ino);
printf(" st_dev: %d\n", (int) buf.st_dev);
#endif
} }
exit(0); exit(0);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment