#include "util/posix/process_info.h"
#include <sys/utsname.h>
#include <time.h>
#include <algorithm>
#include <set>
#include <string>
#include <vector>
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "build/build_config.h"
#include "gtest/gtest.h"
#include "test/errors.h"
#include "test/main_arguments.h"
#include "test/multiprocess.h"
#include "util/file/file_io.h"
#include "util/misc/implicit_cast.h"
#include "util/string/split_string.h"
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
#include "util/linux/direct_ptrace_connection.h"
#include "test/linux/fake_ptrace_connection.h"
#endif
namespace crashpad {
namespace test {
namespace {
void TestProcessSelfOrClone(const ProcessInfo& process_info) { … }
void TestSelfProcess(const ProcessInfo& process_info) { … }
TEST(ProcessInfo, Self) { … }
#if BUILDFLAG(IS_APPLE)
TEST(ProcessInfo, SelfTask) {
ProcessInfo process_info;
ASSERT_TRUE(process_info.InitializeWithTask(mach_task_self()));
TestSelfProcess(process_info);
}
#endif
TEST(ProcessInfo, Pid1) { … }
class ProcessInfoForkedTest : public Multiprocess { … };
TEST(ProcessInfo, Forked) { … }
}
}
}