[cfe-dev] Trying to understand some test "... 2>&1 >/dev/null | ..."

Baptiste Lepilleur baptiste.lepilleur at gmail.com
Tue Aug 11 15:13:06 PDT 2009


2009/8/11 Nuno Lopes <nunoplopes at sapo.pt>

> There is a bunch of failures caused by this kind of tests on windows, such
>> as Preprocessor\include-directive1.c. Here an example of a test command:
>> // RUN: clang-cc -E %s -fno-caret-diagnostics 2>&1 >/dev/null | grep 'file
>> successfully included' | count 3
>>
>>  From what I understand, first stderr is redirected to stdout and then
>>> stdout
>>>
>> to /dev/null, meaning if I understand thing well that both stderr and
>> stdout
>> goes into /dev/null and are not passed to the next process in the pipe. So
>> what it supposes to go in the following pipe? Obviously there is something
>> I
>> don't know...
>>
>
> nops. that means that stderr is passed through the pipe and stdout is
> discarded. The forwarding of fds is done in the specified order (and it
> matters).
> Nuno
>

Thanks for clarifying that. Got another 4 tests passing on Windows fixing
that bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090812/e7dcf0ca/attachment.html>


More information about the cfe-dev mailing list