#include <fcntl.h>
#include <poll.h>
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <tuple>
#include "base/containers/contains.h"
#include "base/debug/leak_annotations.h"
#include "base/files/file_util.h"
#include "base/posix/eintr_wrapper.h"
#include "build/build_config.h"
#include "sandbox/linux/tests/unit_tests.h"
#if !defined(POLLRDHUP)
#define POLLRDHUP …
#endif
namespace {
std::string TestFailedMessage(const std::string& msg) { … }
int GetSubProcessTimeoutTimeInSeconds() { … }
int CountThreads() { … }
}
namespace sandbox {
bool IsAndroid() { … }
bool IsArchitectureArm() { … }
static const int kExpectedValue = …;
static const int kIgnoreThisTest = …;
static const int kExitWithAssertionFailure = …;
static const int kExitForTimeout = …;
static void SigAlrmHandler(int) { … }
static void SetProcessTimeout(int time_in_seconds) { … }
void UnitTests::RunTestInProcess(SandboxTestRunner* test_runner,
DeathCheck death,
const void* death_aux) { … }
void UnitTests::DeathSuccess(int status, const std::string& msg, const void*) { … }
void UnitTests::DeathSuccessAllowNoise(int status,
const std::string& msg,
const void*) { … }
void UnitTests::DeathMessage(int status,
const std::string& msg,
const void* aux) { … }
void UnitTests::DeathSEGVMessage(int status,
const std::string& msg,
const void* aux) { … }
void UnitTests::DeathExitCode(int status,
const std::string& msg,
const void* aux) { … }
void UnitTests::DeathBySignal(int status,
const std::string& msg,
const void* aux) { … }
void UnitTests::AssertionFailure(const char* expr, const char* file, int line) { … }
void UnitTests::IgnoreThisTest() { … }
}