An expectation of the child’s termination reason can now be specified.
It is now possible to test with children that do not exit cleanly, if
they are not expected to exit cleanly.
TEST=util_test Multiprocess.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/553153002
(MACH_RCV_LARGE).
This also adds a COMPILE_ASSERT to check that the
PersistentNonblockingFourMessages test case is not exceeding the value
of MACH_PORT_QLIMIT_DEFAULT.
TEST=util_test MachMessageServer.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/557793002
MachMessageServer is much like mach_msg_server() and
mach_msg_server_once(), but with a C++ interface and with a number of
deficiencies corrected.
TEST=util_test MachMessageServer.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/544393002
mach_exc is necessary because libSystem doesn’t contain this at all. exc
is necessary too, however: the copy in libSystem relies on the server
callbacks being externally defined symbols, which is cheesey.
Additionally, some Crashpad code wants to call internal validation
(“check”) routines that are not normally accessible to outside callers
via the copy of exc in libSystem, but they are made accessible here by
processing mig’s output in this Python script.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/541213002
This is part of a family of classes whose chief entry point is
MachOImageReader. MachOImageReader depends on this class to read
segments, so this one is landing first. The bulk of this class will be
tested as part of MachOImageReader.
TEST=util_test MachOImageSegmentReader.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/516983003
This adds a pipe going in the other direction (parent to child).
Initially, I didn’t think this was necessary, but it turned out to be
needed for ProcessReader. Having the child wait on a pipe read is the
easiest way to keep it alive until the parent is done with it.
This also tests MachMultiprocess::ChildPID() in
mach_multiprocess_test.cc.
Both of these fell out of https://codereview.chromium.org/491963002/.
TEST=util_test MachMultiprocess.MachMultiprocess
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/491363002
time_t is a typedef for long on Mac OS X. In 32-bit x86 (ILP32), long is
a signed 32-bit quantity, and its range does not contain the range of
uint32_t, used to store times in time_t fashion in minidump files. A
cast is necessary to make these EXPECT_* macros do the right thing. This
is not a problem in x86_64 (LP64) where long is a signed 64-bit
quantity, which does contain the range of uint32_t.
clang’s error was “error: comparison of integers of different signs:
'const long' and 'const unsigned int' [-Werror,-Wsign-compare]”
BUG=
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/491023005
InRangeCast<> is similar to base::saturated_cast<>, but it allows the
caller to specify the value to be returned in the event that the source
value can’t be converted to the destination data type without data loss.
TEST=util_test InRangeCast
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/467103002
This also adds MachErrorMessage(), a test-only function that’s a
dependency of TaskMemory’s test, and related test-only error message
functions.
TEST=util_test TaskMemory.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/438993002
MinidumpFileWriter writes the top-level object to a minidump file. This
consists of a MINIDUMP_HEADER and a list of MINIDUMP_DIRECTORY entries
that point to streams, which are second-level objects in minidump files.
This change also adds the base class for stream writers,
MinidumpStreamWriter.
TEST=minidump_test MinidumpFileWriter*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/432863006