[Lldb-commits] [lldb] r228306 - In fd leak test report all open fds, not only first failure
Ed Maste
emaste at freebsd.org
Thu Feb 5 08:11:33 PST 2015
Author: emaste
Date: Thu Feb 5 10:11:33 2015
New Revision: 228306
URL: http://llvm.org/viewvc/llvm-project?rev=228306&view=rev
Log:
In fd leak test report all open fds, not only first failure
Modified:
lldb/trunk/test/functionalities/avoids-fd-leak/main.c
Modified: lldb/trunk/test/functionalities/avoids-fd-leak/main.c
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/avoids-fd-leak/main.c?rev=228306&r1=228305&r2=228306&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/avoids-fd-leak/main.c (original)
+++ lldb/trunk/test/functionalities/avoids-fd-leak/main.c Thu Feb 5 10:11:33 2015
@@ -8,7 +8,7 @@ int
main (int argc, char const **argv)
{
struct stat buf;
- int i;
+ int i, rv = 0;
// Make sure stdin/stdout/stderr exist.
for (i = 0; i <= 2; ++i) {
@@ -20,9 +20,9 @@ main (int argc, char const **argv)
for (i = 3; i <= 256; ++i) {
if (fstat(i, &buf) == 0 || errno != EBADF) {
fprintf(stderr, "File descriptor %d is open.\n", i);
- return 2;
+ rv = 2;
}
}
- return 0;
+ return rv;
}
More information about the lldb-commits
mailing list