[all-commits] [llvm/llvm-project] ba9426: [OpenMP] Add scaffolding for negative runtime tests

Joel E. Denny via All-commits all-commits at lists.llvm.org
Tue Apr 21 14:13:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ba942610f6be63fe11b61e637ca5db2c4ef9ba8a
      https://github.com/llvm/llvm-project/commit/ba942610f6be63fe11b61e637ca5db2c4ef9ba8a
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-04-21 (Tue, 21 Apr 2020)

  Changed paths:
    M openmp/README.rst
    M openmp/cmake/OpenMPTesting.cmake
    M openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
    M openmp/libomptarget/deviceRTLs/nvptx/test/lit.site.cfg.in
    M openmp/libomptarget/test/lit.cfg
    M openmp/libomptarget/test/lit.site.cfg.in
    M openmp/runtime/test/lit.cfg
    M openmp/runtime/test/lit.site.cfg.in
    M openmp/tools/archer/tests/lit.cfg
    M openmp/tools/archer/tests/lit.site.cfg.in

  Log Message:
  -----------
  [OpenMP] Add scaffolding for negative runtime tests

Without this patch, the openmp project's test suites do not appear to
have support for negative tests.  However, D78170 needs to add a test
that an expected runtime failure occurs.

This patch makes `not` visible in all of the openmp project's test
suites.  In all but `libomptarget/test`, it should be possible for a
test author to insert `not` before a use of the lit substitution for
running a test program.  In `libomptarget/test`, that substitution is
target-specific, and its value is `echo` when the target is not
available.  In that case, inserting `not` before a lit substitution
would expect an `echo` fail, so this patch instead defines a separate
lit substitution for expected runtime fails.

Reviewed By: jdoerfert, Hahnfeld

Differential Revision: https://reviews.llvm.org/D78566


  Commit: 5f6aa9680c19534a382cb652178e0ff6edbe78de
      https://github.com/llvm/llvm-project/commit/5f6aa9680c19534a382cb652178e0ff6edbe78de
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2020-04-21 (Tue, 21 Apr 2020)

  Changed paths:
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/mapping/alloc_fail.c

  Log Message:
  -----------
  [OpenMP] target_data_begin: fail on device alloc fail

Without this patch, target_data_begin continues after an illegal
mapping or an out-of-memory error on the device.  With this patch, it
terminates the runtime with an error instead.

The new test exercises only illegal mappings.  I didn't think of a
good way to exercise out-of-memory errors from the test suite.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D78170


Compare: https://github.com/llvm/llvm-project/compare/060efd24c7f0...5f6aa9680c19


More information about the All-commits mailing list