This is an archive of the discontinued LLVM Phabricator instance.

[windows] Fix or XFAIL remaining portable test failures and enable them
ClosedPublic

Authored by rnk on Aug 13 2015, 1:14 PM.

Details

Summary

This involved various fixes:

  • Move a test that uses ulimit to Posix.
  • Add a few "REQUIRES: shell" lines to tests using backtick subshell evaluation.
  • The MSVC CRT buffers stdio if the output is a pipe by default. Some tests need that disabled to avoid interleaving test stdio with asan output.
  • MSVC headers provide _alloca instead of alloca (go figure), so add a portability macro to the two alloca tests.
  • XFAIL tests that rely on accurate symbols, we need to pass more flags to make that work.
  • MSVC's printf implementation of %p uses upper case letters and doesn't add 0x, so do that manually.
  • Accept "SEGV" or "access-violation" reports in crash tests.

Diff Detail

Event Timeline

rnk updated this revision to Diff 32089.Aug 13 2015, 1:14 PM
rnk retitled this revision from to [windows] Fix or XFAIL remaining portable test failures and enable them.
rnk updated this object.
rnk added a reviewer: samsonov.
rnk added a subscriber: llvm-commits.
samsonov accepted this revision.Aug 13 2015, 1:31 PM
samsonov edited edge metadata.

LGTM

test/asan/TestCases/coverage-disabled.cc
8

Do you really need both kinds of quotes?

test/asan/TestCases/debug_report.cc
25

Please use identation here

#ifdef _MSC_VER
# ifdef _WIN64
#  define PTR_FMT ...
test/asan/TestCases/interception_failure_test.cc
8

If the interception machinery works differently on Windows, just move this to Posix/ ?

test/asan/TestCases/null_deref.cc
7

"once we start using DWARF"

This revision is now accepted and ready to land.Aug 13 2015, 1:31 PM
rnk marked 2 inline comments as done.Aug 14 2015, 10:21 AM
rnk added inline comments.
test/asan/TestCases/coverage-disabled.cc
8

Yes, the double quotes need to go through into the environment variable on Windows because filepaths expanded from %T and %S contain colons after the drive letter. Since colon is the ASAN_OPTIONS separator, it must be quoted. Using single quotes is just my preferred way of escaping the double quotes. I could use backslashes.

Basically, this isn't a shell portability issue, it's an ASAN_OPTIONS parsing portability issue.

test/asan/TestCases/interception_failure_test.cc
8

I don't think it's impossible to intercept strtoll on Windows, so this test should pass eventually.

This revision was automatically updated to reflect the committed changes.