This is an archive of the discontinued LLVM Phabricator instance.

Force lit to execute the ASan and TSan tests on iOS devices sequentially
ClosedPublic

Authored by delcypher on Jan 16 2018, 6:02 PM.

Details

Summary

The current implementation of commands in
test/sanitizer_common/ios_commands/ for iOS devices cannot be executed
in parallel which results in the ASan and TSan tests failing when
executed in parallel by lit which was the default behaviour.

We now force the ASan and TSan tests to be a new parallelism group named
darwin-ios-device-sanitizer which allows only one test to be run at a
time. We also emit a warning informing the user that tests are being
run sequentially.

This only applies if the target is an iOS device.

Diff Detail

Repository
rL LLVM

Event Timeline

delcypher created this revision.Jan 16 2018, 6:02 PM
Herald added a subscriber: Restricted Project. · View Herald TranscriptJan 16 2018, 6:02 PM
kubamracek added inline comments.Jan 16 2018, 8:56 PM
test/asan/lit.cfg
223 ↗(On Diff #130080)

Do we need the warning? I would prefer to drop it. If you think it's still useful, please use the spelling "iOS" for the name of the OS.

224 ↗(On Diff #130080)

Can the value "1" and the comment be moved to test/lit.common.cfg?

delcypher added inline comments.Jan 17 2018, 7:55 PM
test/asan/lit.cfg
223 ↗(On Diff #130080)

It's not essential but I think it's misleading if we don't warn about this. When lit runs it claims its using N threads (where N is the number of logic cores you have) but lit won't actually be doing this. Lit will effectively be running with one thread.

224 ↗(On Diff #130080)

I'll take a look. I'm think this might hurt clarity a bit but I'll do it anyway.

delcypher updated this revision to Diff 130355.Jan 17 2018, 8:17 PM

Address first round of feedback.

delcypher marked 2 inline comments as done.Jan 17 2018, 8:18 PM
delcypher marked an inline comment as done.
kubamracek added inline comments.Jan 17 2018, 8:21 PM
test/asan/lit.cfg
218 ↗(On Diff #130355)

Should this be config.ios and not config.iossim? Note that config.ios is "true" even for the simulator.

test/lit.common.cfg
297 ↗(On Diff #130355)

drop the "and config.ios" part of the condition

delcypher added inline comments.Jan 17 2018, 8:25 PM
test/lit.common.cfg
297 ↗(On Diff #130355)

If we do that the warning will be wrong. It will fire if the host is Darwin, regardless of if the target is an iOS device or not.

kubamracek added inline comments.Jan 17 2018, 8:26 PM
test/lit.common.cfg
297 ↗(On Diff #130355)

Ok, keep it then.

delcypher added inline comments.Jan 17 2018, 8:27 PM
test/asan/lit.cfg
218 ↗(On Diff #130355)

Good catch. I hadn't noticed that.

delcypher updated this revision to Diff 130357.Jan 17 2018, 8:37 PM

Address forgetting to check value of config.iossim.

This revision is now accepted and ready to land.Jan 17 2018, 8:39 PM
This revision was automatically updated to reflect the committed changes.