[Lldb-commits] [lldb] r228306 - In fd leak test report all open fds, not only first failure

Vince Harron vharron at google.com
Thu Feb 5 08:19:28 PST 2015


Hi Ed,

What is the motivation for this change?
On Feb 5, 2015 8:14 AM, "Ed Maste" <emaste at freebsd.org> wrote:

> 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;
>  }
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150205/f35df349/attachment.html>


More information about the lldb-commits mailing list