[Openmp-commits] [PATCH] D74956: OpenMP 5.1 omp_display_env function implementation.

Jonathan Peyton via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 2 13:44:08 PST 2020


jlpeyton added a comment.

In D74956#1901473 <https://reviews.llvm.org/D74956#1901473>, @AndreyChurbanov wrote:

> In D74956#1887883 <https://reviews.llvm.org/D74956#1887883>, @jdoerfert wrote:
>
> > We can have filechek tests, right? We should verify a bit more than the existence of a function that will return.
>
>
> I am not sure how to pipe error output (stderr) to filecheck.  I saw some examples of the "2>&1 |", this works in bash, but does not work in c shell. Maybe "|2" can be used?
>
> Could somebody please advise how to better pipe stderr to filecheck? Is the "2>&1 |" appropriate?  I personally work in bash usually, but some systems may have other shell by default.


Lit parses the 2>&1 directly, redirection is set (probably for subprocess python module), and the text is not sent to an underlying shell.  So lit acts as a limited, platform-independent Bourne shell.  So It is safe to use 2>&1.

>From https://llvm.org/docs/TestingGuide.html:

> RUN lines are specified in the comments of the test program using the keyword ``RUN`` followed by a colon, and lastly the command (pipeline)
>  to execute. Together, these lines form the "script" that :program:`lit`  executes to run the test case. The syntax of the RUN lines is similar to a
>  shell's syntax for pipelines including I/O redirection and variable  substitution. However, even though these lines may *look* like a shell
>  script, they are not. RUN lines are interpreted by :program:`lit`. Consequently, the syntax differs from shell in a few ways. You can specify
>  as many RUN lines as needed.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74956/new/

https://reviews.llvm.org/D74956





More information about the Openmp-commits mailing list