aboutsummaryrefslogtreecommitdiff
path: root/src/common/tests/file_utils.h
diff options
context:
space:
mode:
authorbenchan@chromium.org <benchan@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-02-23 18:50:08 +0000
committerbenchan@chromium.org <benchan@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-02-23 18:50:08 +0000
commit907f95c5bda4144de54778769b7d51814b32c82a (patch)
tree6c15328998a67c7bdecc57898ca54ccbded496d8 /src/common/tests/file_utils.h
parentFix an invalid cast in PostfixEvaluator<ValueType>::EvaluateInternal(). (diff)
downloadbreakpad-907f95c5bda4144de54778769b7d51814b32c82a.tar.xz
Modify CrashGenerator::CreateChildCrash to copy proc files.
This patch is taken from the downstream version of breakpad in Chromium OS: https://gerrit.chromium.org/gerrit/15148 LinuxCoreDumperTest previously assumes the proc files of the child process created by CrashGenerator::CreateChildCrash() have the same content as its parent process, which may not be true. This CL modifies CrashGenerator to copy the proc files of the child process, created by CreateChildCrash(), before crashing that process. BUG=chromium-os:25252 TEST=Verified the following: TEST=Tested the following: 1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6. 2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock). 3. All unit tests pass. Review URL: https://breakpad.appspot.com/353001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@925 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/tests/file_utils.h')
-rw-r--r--src/common/tests/file_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/tests/file_utils.h b/src/common/tests/file_utils.h
index 52e8b009..c98a9bfa 100644
--- a/src/common/tests/file_utils.h
+++ b/src/common/tests/file_utils.h
@@ -35,6 +35,9 @@
namespace google_breakpad {
+// Copies a file from |from_path| to |to_path|. Returns true on success.
+bool CopyFile(const char* from_path, const char* to_path);
+
// Reads the content of a file at |path| into |buffer|. |buffer_size| specifies
// the size of |buffer| in bytes and returns the number of bytes read from the
// file on success. Returns true on success.