This is an archive of the discontinued LLVM Phabricator instance.

[TSan][libdispatch] Use FileCheck's --implicit-check-not=...
AbandonedPublic

Authored by yln on Apr 11 2019, 12:49 PM.

Details

Summary

Use FileCheck's --implicit-check-not='ThreadSanitizer' which increases
the strictness of our tests a bit.

CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done

With --implicit-check-not='ThreadSanitizer' the above is turned into:

CHECK-NOT: ThreadSanitizer
CHECK: start
CHECK-NOT: ThreadSanitizer
CHECK: done
CHECK-NOT: ThreadSanitizer

Event Timeline

yln created this revision.Apr 11 2019, 12:49 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 11 2019, 12:49 PM
Herald added subscribers: llvm-commits, Restricted Project, kubamracek. · View Herald Transcript

I like this change, but there's no reason to apply it specifically to the Darwin tests, right? Can you apply it to all TSan tests?

yln updated this revision to Diff 194989.Apr 12 2019, 5:44 PM

Extend to most TSan tests that matched "CHECK-NOT:.*ThreadSanitizer".
Skipped big, complicated tests with multiple run lines and CHECK prefixes.

Some tests only have a lone CHECK-NOT: directive. For those, I added
the --implict-check-not part (for consistency), but did not remove the
check.

I will run this on my Linux VM machine before pushing. Let's hope that it
doesn't create too much churn on the build bots.

Adding Dmitry as a reviewer.

yln added a reviewer: dvyukov.Apr 12 2019, 5:44 PM
yln updated this revision to Diff 194990.Apr 12 2019, 6:00 PM

Update comment.

kubamracek added inline comments.Apr 15 2019, 10:23 AM
compiler-rt/test/tsan/atomic_norace.cc
62

Should this be removed now?

compiler-rt/test/tsan/benign_race.cc
39

Same here... and in other files.

yln marked an inline comment as done.Apr 15 2019, 10:38 AM
yln added inline comments.
compiler-rt/test/tsan/atomic_norace.cc
62

Some tests only have a lone CHECK-NOT: directive. For those the --implicit-check-not does not increase strictness. I added the --implict-check-not part for consistency (maybe someone changes te test or copies and extends it), but did not remove the check.

I can also remove lone "CHECK-NOT"s if you prefer.

yln added a comment.May 8 2019, 6:00 PM

@dvyukov, what do you think?

yln abandoned this revision.May 16 2019, 11:56 AM