#include "sandbox/linux/services/thread_helpers.h"
#include <errno.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "base/check_op.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/process_metrics.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
#include "sandbox/linux/tests/unit_tests.h"
#include "testing/gtest/include/gtest/gtest.h"
PlatformThread;
namespace sandbox {
namespace {
#if !defined(THREAD_SANITIZER)
const int kRaceTestIterations = …;
class ScopedProc { … };
TEST(ThreadHelpers, IsSingleThreadedBasic) { … }
SANDBOX_TEST(ThreadHelpers, AssertSingleThreaded) { … }
TEST(ThreadHelpers, IsSingleThreadedIterated) { … }
TEST(ThreadHelpers, IsSingleThreadedStartAndStop) { … }
SANDBOX_TEST(ThreadHelpers, AssertSingleThreadedAfterThreadStopped) { … }
#if !defined(NDEBUG)
SANDBOX_DEATH_TEST(
ThreadHelpers,
AssertSingleThreadedDies,
DEATH_MESSAGE(
ThreadHelpers::GetAssertSingleThreadedErrorMessageForTests())) { … }
#endif
#endif
}
}