[LLVMbugs] [Bug 14892] New: Improve support for testing on Linux

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 10 02:35:12 PST 2013


             Bug #: 14892
           Summary: Improve support for testing on Linux
           Product: libc++
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: All Bugs
        AssignedTo: hhinnant at apple.com
        ReportedBy: r1mikey at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 9851
  --> http://llvm.org/bugs/attachment.cgi?id=9851
Add Linux locale names to testing platform support

With the attached patches, applied on top of trunk r172050 with the patches in
attached to bug #14648, I can get consistent test results.

These patches do the following:
  linux-locale-names.patch: Adjust locale names to match those in Linux
  adjust-lit-for-linux.patch: Multiple changes, see below

The lit changes look extensive, but are really not all that far reaching.

The first change adjusts execute_command to include the notion of the current
working directory.  This is needed for tests that reference data files (.dat)
in the source tree.  There are a few extra lines added to execute all tests
from within their source directory, allowing tests that do need data files to
find those files.

The second change unconditionally defines __STDC_FORMAT_MACROS,
__STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS on Linux.  This is needed due to
poor modern C++ support from the C library on my version of Linux (Ubuntu

The third change deals with reliability.  I see spurious test failures do to
ETXTBSY being raised in a OSError from "execute".  To get around this I rename
and wrap "execute" to retry tests when ETXTBSY is encountered.

And, finally, many tests were failing due to pthread not being linked, so I
adjusted "libraries" to include -lpthread.  I also reordered -lgcc_eh and
-lsupc++ to place -lsupc++ first (for single-pass linking).

With these changes I consistently get the following results:
  Expected Passes    : 4243
  Unexpected Failures: 99

To get this running on Ubuntu the following is needed:

$ sudo apt-get install language-pack-cs language-pack-zh-hans
language-pack-zh-hant language-pack-ru language-pack-fr language-pack-en

Ensure that the following entries are in "/var/lib/locales/supported.d/local":
  en_US.UTF-8 UTF-8
  fr_FR.UTF-8 UTF-8
  ru_RU.UTF-8 UTF-8
  zh_CN.UTF-8 UTF-8
  cs_CZ.ISO-8859-2 ISO-8859-2
  fr_CA.ISO-8859-1 ISO-8859-1

$ sudo dpkg-reconfigure locales

Compiled with:
CC=/opt/clang-trunk/bin/clang CXX=/opt/clang-trunk/bin/clang++ cmake
-DLIT_EXECUTABLE=/home/michael/development/llvm/llvm/utils/lit/lit.py ../libcxx
make -j 4
make check-libcxx

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list