diff options
| author | Tri Vo <trong@google.com> | 2021-01-14 18:39:19 -0800 |
|---|---|---|
| committer | Tri Vo <trong@google.com> | 2021-01-14 21:25:10 -0800 |
| commit | 6c827d7e7448c2eaef7a4342003886c6ddea7ccc (patch) | |
| tree | e4613a7b1646db80d1c678309f64c8ede8ba3e72 /trusty/coverage/coverage.cpp | |
| parent | 05067cefd9ccdac628e4f64cbd05d4fbaf54a052 (diff) | |
trusty: coverage: Append .<pid>.sancov to sancov file names
Bug: 175221942
Test: adb shell ./trusty_gatekeeper_fuzzer -runs=0 corpus
Change-Id: Ic7a30b7531e8a327fb8ebe953fa02946e8539579
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) {} |
