Page MenuHomePhabricator

[libc] Add llvm-lit testing infrastructure
AbandonedPublic

Authored by abrachet on Mar 1 2020, 1:08 PM.

Details

Summary

This patch is a work in progress. Is this even something we think will be useful?

These lit tests are meant to be for correctness of the environment not of the implementations necessarily.

Diff Detail

Event Timeline

abrachet created this revision.Mar 1 2020, 1:08 PM
abrachet marked 3 inline comments as done.Mar 1 2020, 1:23 PM
abrachet added inline comments.
libc/test/test/lit.cfg.py
49

I just realized I should use CMAKE_C_COMPILER in lit.site.cfg.py.in instead of just using clang, I will do that in the next round.

libc/test/test/sanity/includes.c
9

This one also fails currently because <linux/errno.h> is not found because %clang_libc compiles with -nostdinc

libc/test/test/src/assert/assert.c
1

This test is erroneous because it is linking against glibc's __assert_fail not ours. Which is surprising because __assert_fail is in libllvmlibc.a. I'm not sure why ld is not linking against libllvmlibc.a's __assert_fail.

Just answering the question in the "Summary": Yes, something like this is useful to check the integrity of llvmlibc.a and the public header files. But, I have not spent time to convince myself that llvm-lit is the best way to do it.

abrachet abandoned this revision.Mar 1 2020, 11:54 PM

Just answering the question in the "Summary": Yes, something like this is useful to check the integrity of llvmlibc.a and the public header files. But, I have not spent time to convince myself that llvm-lit is the best way to do it.

I think it's probably not, now that I think more about it. In any case something like this might be too early given the current state of llvmlibc.