[Openmp-commits] [PATCH] D49386: Make tests unsupported if libatomic cannot be found.

Taewook Oh via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jul 16 09:51:41 PDT 2018


twoh created this revision.
twoh added a reviewer: ABataev.

As https://reviews.llvm.org/rL336467 appends -latomic when -fopenmp is given, openmp unit tests are failing if libatomic cannot be found. This diff makes unit tests unsupported if there's no libatomic.

- Test

>From the build dir

  [~/llvms/upstream-git/build-Release] grep -r LIBOMP_HAVE_LIBATOMIC .
  ./CMakeCache.txt:LIBOMP_HAVE_LIBATOMIC:INTERNAL=

suggests that libatomic cannot be found. Without the diff,

  [~/llvms/upstream-git/build-Release] ninja check-openmp
  ...
      libomp :: worksharing/single/omp_single.c
      libomp :: worksharing/single/omp_single_copyprivate.c
      libomp :: worksharing/single/omp_single_nowait.c
      libomp :: worksharing/single/omp_single_private.c
  
    Expected Passes    : 2
    Expected Failures  : 1
    Unsupported Tests  : 2
    Unexpected Failures: 166

With the diff,

  [~/llvms/upstream-git/build-Release] ninja check-openmp
  [0/1] Running OpenMP tests
  Testing Time: 0.16s
    Expected Passes    : 2
    Unsupported Tests  : 169


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D49386

Files:
  runtime/test/lit.cfg


Index: runtime/test/lit.cfg
===================================================================
--- runtime/test/lit.cfg
+++ runtime/test/lit.cfg
@@ -53,6 +53,8 @@
     libs += " -lm"
 if config.has_libatomic:
     libs += " -latomic"
+elif '-fopenmp' in config.test_openmp_flags:
+    config.unsupported = True
 
 # Allow XFAIL to work
 config.target_triple = [ ]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49386.155712.patch
Type: text/x-patch
Size: 365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180716/5da93bab/attachment.bin>


More information about the Openmp-commits mailing list