This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Add a test harness
ClosedPublic

Authored by jroelofs on Jul 5 2017, 4:49 PM.

Details

Summary

Mostly cargo-culted from libcxxabi, since the unwinder was forked from there in the first place.

Might still be some cruft that's only applicable to libcxxabi in here, so let me know if you spot anything like that. I killed some of it, but there could be more.

Diff Detail

Event Timeline

jroelofs created this revision.Jul 5 2017, 4:49 PM
EricWF accepted this revision.Jul 5 2017, 5:49 PM

This LGTM. I'm assuming it works but we can iron out the kinks once it lands. We should probably add builders that run the tests as well.

test/lit.cfg
46

s/LIBCXXABI_SITE_CONFIG/LIBUNWIND_SITE_CONFIG.

This revision is now accepted and ready to land.Jul 5 2017, 5:49 PM
jroelofs closed this revision.Jul 6 2017, 8:20 AM

r307266

jroelofs marked an inline comment as done.Jul 6 2017, 8:20 AM
manojgupta added inline comments.
test/lit.cfg
36

I do not have libcxx checked out since I am want to use only compiler-rt + libunwind to replace libgcc_s. This libcxx dependency breaks this testing.

jroelofs added inline comments.Jul 18 2017, 2:46 PM
test/lit.cfg
36

This only requires that you check it out, not that you build it. Note that libcxxabi has the same constraint.

manojgupta added inline comments.Jul 18 2017, 2:56 PM
test/lit.cfg
36

Checking out libcxx should not be a requirement since libunwind should be usable independently on libcxx.
Not sure if it can be compared to libcxxabi, since most people working on libcxx/libcxxabi will checkout both libcxx and libcxxabi.

jroelofs added inline comments.Jul 18 2017, 3:33 PM
test/lit.cfg
36

The code duplication required to give you what you want is not worth it. When the monorepo happens, you won't have a choice but to check both out... if this was a bug report, I'd close it "WONTFIX".

Checking out libcxx should not be a requirement since libunwind should be usable independently on libcxx.

Nope, Sorry. As jroelofs said the code duplication is not worth it. Unfortunately you'll need the libc++ sources, and I also don't think that's a bug.

chapuni added a subscriber: chapuni.Aug 6 2017, 7:02 AM
chapuni added inline comments.
test/CMakeLists.txt
34

Could you fill this, please?

set(LIBUNWIND_TEST_DEPS
  unwind
  )

It makes "check-unwind" pass from clean.