[PATCH] D56062: [compiler-rt] [test] Detect glibc-2.27+ and XFAIL appropriate tests

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 9 05:31:18 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT350717: [test] Detect glibc-2.27+ and XFAIL appropriate tests (authored by mgorny, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56062?vs=179456&id=180824#toc

Repository:
  rCRT Compiler Runtime

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

https://reviews.llvm.org/D56062

Files:
  test/lit.common.cfg
  test/lsan/TestCases/Linux/use_tls_dynamic.cc
  test/msan/dtls_test.c


Index: test/lit.common.cfg
===================================================================
--- test/lit.common.cfg
+++ test/lit.common.cfg
@@ -289,6 +289,21 @@
   if android_api_level >= 28:
     config.available_features.add('android-28')
 
+if config.host_os == 'Linux':
+  # detect whether we are using glibc, and which version
+  # NB: 'ldd' is just one of the tools commonly installed as part of glibc
+  ldd_ver_cmd = subprocess.Popen(['ldd', '--version'],
+                                 stdout=subprocess.PIPE,
+                                 env={'LANG': 'C'})
+  sout, _ = ldd_ver_cmd.communicate()
+  ver_line = sout.splitlines()[0]
+  if ver_line.startswith(b"ldd "):
+    from distutils.version import LooseVersion
+    ver = LooseVersion(ver_line.split()[-1].decode())
+    # 2.27 introduced some incompatibilities
+    if ver >= LooseVersion("2.27"):
+      config.available_features.add("glibc-2.27")
+
 sancovcc_path = os.path.join(config.llvm_tools_dir, "sancov")
 if os.path.exists(sancovcc_path):
   config.available_features.add("has_sancovcc")
Index: test/msan/dtls_test.c
===================================================================
--- test/msan/dtls_test.c
+++ test/msan/dtls_test.c
@@ -11,6 +11,11 @@
 
    // Reports use-of-uninitialized-value, not analyzed
    XFAIL: netbsd
+
+   // This is known to be broken with glibc-2.27+
+   // https://bugs.llvm.org/show_bug.cgi?id=37804
+   XFAIL: glibc-2.27
+
 */
 
 #ifndef BUILD_SO
Index: test/lsan/TestCases/Linux/use_tls_dynamic.cc
===================================================================
--- test/lsan/TestCases/Linux/use_tls_dynamic.cc
+++ test/lsan/TestCases/Linux/use_tls_dynamic.cc
@@ -1,4 +1,9 @@
 // Test that dynamically allocated TLS space is included in the root set.
+
+// This is known to be broken with glibc-2.27+
+// https://bugs.llvm.org/show_bug.cgi?id=37804
+// XFAIL: glibc-2.27
+
 // RUN: LSAN_BASE="report_objects=1:use_stacks=0:use_registers=0:use_ld_allocations=0"
 // RUN: %clangxx %s -DBUILD_DSO -fPIC -shared -o %t-so.so
 // RUN: %clangxx_lsan %s -o %t


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56062.180824.patch
Type: text/x-patch
Size: 2080 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190109/9a2076d0/attachment.bin>


More information about the cfe-commits mailing list