summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/ios_commands
Commit message (Collapse)AuthorAgeFilesLines
* [iOS sim] Ensure simulator device is booted in iossim_prepare.pyJulian Lettner2019-12-201-1/+13
| | | | | | | | | | | | | | Recent versions of the iOS simulator require that a "simulator device" is booted before we can use `simctl spawn` (see iossim_run.py) to start processes. We can use `simctl bootstatus` to ensure that the simulator device is booted before we run any tests via lit. The `-b` option starts the device if necessary. Reviewed By: delcypher Differential Revision: https://reviews.llvm.org/D71449
* [iOS sim] Simplify iossim_run.py scriptJulian Lettner2019-12-121-3/+2
|
* Enable `asan/TestCases/Posix/start-deactivated.cc` test for iOS.Dan Liew2019-03-211-1/+1
| | | | | | | | | | | | | | | | | | | Summary: To make this test pass it was necesary to change `iossim_run.py` to propagate the `ASAN_ACTIVATION_OPTIONS` environment variable into the testing environment. rdar://problem/49114807 Reviewers: kubamracek, yln, serge-sans-paille Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D59660 llvm-svn: 356701
* Introduce a way to allow the ASan dylib on Darwin platforms to be loaded via ↵Dan Liew2018-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `dlopen()`. Summary: The purpose of this option is provide a way for the ASan dylib to be loaded via `dlopen()` without triggering most initialization steps (e.g. shadow memory set up) that normally occur when the ASan dylib is loaded. This new functionality is exposed by - A `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` macro which indicates if the feature is supported. This only true for Darwin currently. - A `HandleDlopenInit()` function which should return true if the library is being loaded via `dlopen()` and `SANITIZER_SUPPORTS_INIT_FOR_DLOPEN` is supported. Platforms that support this may perform any initialization they wish inside this function. Although disabling initialization is something that could potentially apply to other sanitizers it appears to be unnecessary for other sanitizers so this patch only makes the change for ASan. rdar://problem/45284065 Reviewers: kubamracek, george.karpenkov, kcc, eugenis, krytarowski Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D54469 llvm-svn: 348078
* [UBSan] Partially fix `test/ubsan/TestCases/Misc/log-path_test.cc` so that ↵Dan Liew2018-09-171-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it can run on devices. Summary: In order for this test to work the log file needs to be removed from both from the host and device. To fix this the `rm` `RUN` lines have been replaced with `RUN: rm` followed by `RUN: %device_rm`. Initially I tried having it so that `RUN: %run rm` implicitly runs `rm` on the host as well so that only one `RUN` line is needed. This simplified writing the test however that had two large drawbacks. * It's potentially very confusing (e.g. for use of the device scripts outside of the lit tests) if asking for `rm` to run on device also causes files on the host to be deleted. * This doesn't work well with the glob patterns used in the test. The host shell expands the `%t.log.*` glob pattern and not on the device so we could easily miss deleting old log files from previous test runs if the corresponding file doesn't exist on the host. So instead deletion of files on the device and host are explicitly separate commands. The command to delete files from a device is provided by a new substitution `%device_rm` as suggested by Filipe Cabecinhas. The semantics of `%device_rm` are that: * It provides a way remove files from a target device when the host is not the same as the target. In the case that the host and target are the same it is a no-op. * It interprets shell glob patterns in the context of the device file system instead of the host file system. This solves the globbing problem provided the argument is quoted so that lit's underlying shell doesn't try to expand the glob pattern. * It supports the `-r` and `-f` flags of the `rm` command, with the same semantics. Right now an implementation of `%device_rm` is provided only for ios devices. For all other devices a lit warning is emitted and the `%device_rm` is treated as a no-op. This done to avoid changing the behaviour for other device types but leaves room for others to implement `%device_rm`. The ios device implementation uses the `%run` wrapper to do the work of removing files on a device. The `iossim_run.py` script has been fixed so that it just runs `rm` on the host operating system because the device and host file system are the same. rdar://problem/41126835 Reviewers: vsk, kubamracek, george.karpenkov, eugenis Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51648 llvm-svn: 342391
* [UBSan] Propagate `UBSAN_OPTIONS` environment variable when running ios ↵Dan Liew2018-09-031-1/+1
| | | | | | | | | | | | | | simulator tests. rdar://problem/41126835 Reviewers: kubamracek, vsk, george.karpenkov Subscribers: #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D51273 llvm-svn: 341299
* [sanitizer] Unify and generalize Apple platforms in CMake and lit test configsKuba Mracek2018-06-201-0/+5
| | | | | | | | There's more platforms than just "ios" and "iossim" that we should support, and adding more lit config variables for each platform isn't great. Let's generalize and have a single value that determines what the platform under test is. Differential Revision: https://reviews.llvm.org/D48309 llvm-svn: 335123
* [tsan] Add support for running TSan tests on iOS simulator and devicesKuba Mracek2017-07-101-2/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D35157 llvm-svn: 307537
* [asan] Add a compilation wrapper that codesigns shared libraries to support ↵Kuba Mracek2017-04-281-0/+32
| | | | | | | | | | iOS simulator testing Tests that run on the iOS simulator require the dlopen'd dylibs are codesigned. This patch adds the "iossim_compile.py" wrapper that codesigns any produces dylib. Differential Revision: https://reviews.llvm.org/D32561 llvm-svn: 301617
* Follow-up for r301443: The python scrips need to be executable.Kuba Mracek2017-04-262-0/+0
| | | | llvm-svn: 301448
* [asan] Add support for running lit tests in the iOS SimulatorKuba Mracek2017-04-262-0/+34
This patch adds a basic support for running the ASan lit test suite against an iOS Simulator. This is done by generating more lit.site.cfg configurations into subdirectories such as IOSSimI386Config and IOSSimX86_64Config. These test suites are not added into "check-all" or into "check-asan", they have to be run manually. Differential Revision: https://reviews.llvm.org/D31477 llvm-svn: 301443
OpenPOWER on IntegriCloud