diff options
| author | Tri Vo <trong@google.com> | 2021-01-16 01:13:35 +0000 |
|---|---|---|
| committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-01-16 01:13:35 +0000 |
| commit | 688f0590e74ddb16d06a4d21a9468ef2d65a38c4 (patch) | |
| tree | 5c6fb3f707e6704f91fecf764c1beee41cea4102 /trusty/coverage/coverage.cpp | |
| parent | c9b8e075b44ee19d2e1910dd3d2634ecf6e77929 (diff) | |
| parent | a68f1c9d11e306e95d77f2a72908fd28918c154e (diff) | |
Merge changes I06a7b475,Ic7a30b75,Ib22cf72b
* changes:
trusty: Collect sancov file from confirmationui fuzzer
trusty: coverage: Append .<pid>.sancov to sancov file names
trusty: fuzz: Explicit errors instead of asserts
Diffstat (limited to 'trusty/coverage/coverage.cpp')
| -rw-r--r-- | trusty/coverage/coverage.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/trusty/coverage/coverage.cpp b/trusty/coverage/coverage.cpp index 185abe5497..5eccdc503d 100644 --- a/trusty/coverage/coverage.cpp +++ b/trusty/coverage/coverage.cpp @@ -39,6 +39,7 @@ namespace coverage { using android::base::ErrnoError; using android::base::Error; using std::string; +using std::to_string; using std::unique_ptr; static inline uintptr_t RoundPageUp(uintptr_t val) { @@ -54,11 +55,11 @@ CoverageRecord::CoverageRecord(string tipc_dev, struct uuid* uuid) shm_(NULL), shm_len_(0) {} -CoverageRecord::CoverageRecord(string tipc_dev, struct uuid* uuid, string sancov_filename) +CoverageRecord::CoverageRecord(string tipc_dev, struct uuid* uuid, string module_name) : tipc_dev_(std::move(tipc_dev)), coverage_srv_fd_(-1), uuid_(*uuid), - sancov_filename_(sancov_filename), + sancov_filename_(module_name + "." + to_string(getpid()) + ".sancov"), record_len_(0), shm_(NULL), shm_len_(0) {} |
