| Index: sandbox/linux/tests/unit_tests.cc
|
| diff --git a/sandbox/linux/tests/unit_tests.cc b/sandbox/linux/tests/unit_tests.cc
|
| index cfcec964b6ea54b6602749c022e83443417965fa..b4422062e96107288adb3e79fe2c653b2a014339 100644
|
| --- a/sandbox/linux/tests/unit_tests.cc
|
| +++ b/sandbox/linux/tests/unit_tests.cc
|
| @@ -7,8 +7,6 @@
|
| #include <signal.h>
|
| #include <stdio.h>
|
| #include <sys/resource.h>
|
| -#include <sys/types.h>
|
| -#include <sys/wait.h>
|
| #include <sys/time.h>
|
| #include <time.h>
|
| #include <unistd.h>
|
| @@ -19,11 +17,6 @@
|
| #include "base/third_party/valgrind/valgrind.h"
|
| #include "build/build_config.h"
|
| #include "sandbox/linux/tests/unit_tests.h"
|
| -
|
| -// Specifically, PNaCl toolchain does not have this flag.
|
| -#if !defined(POLLRDHUP)
|
| -#define POLLRDHUP 0x2000
|
| -#endif
|
|
|
| namespace {
|
| std::string TestFailedMessage(const std::string& msg) {
|
| @@ -74,9 +67,7 @@
|
| static const int kExpectedValue = 42;
|
| static const int kIgnoreThisTest = 43;
|
| static const int kExitWithAssertionFailure = 1;
|
| -#if !defined(OS_NACL_NONSFI)
|
| static const int kExitForTimeout = 2;
|
| -#endif
|
|
|
| #if defined(SANDBOX_USES_BASE_TEST_SUITE)
|
| // This is due to StackDumpSignalHandler() performing _exit(1).
|
| @@ -84,10 +75,6 @@
|
| const int kExitAfterSIGSEGV = 1;
|
| #endif
|
|
|
| -// PNaCl toolchain's signal ABIs are incompatible with Linux's.
|
| -// So, for simplicity, just drop the "timeout" feature from unittest framework
|
| -// with relying on the buildbot's timeout feature.
|
| -#if !defined(OS_NACL_NONSFI)
|
| static void SigAlrmHandler(int) {
|
| const char failure_message[] = "Timeout reached!\n";
|
| // Make sure that we never block here.
|
| @@ -119,7 +106,6 @@
|
| SANDBOX_ASSERT(alarm(time_in_seconds) == 0); // There should be no previous
|
| // alarm.
|
| }
|
| -#endif // !defined(OS_NACL_NONSFI)
|
|
|
| // Runs a test in a sub-process. This is necessary for most of the code
|
| // in the BPF sandbox, as it potentially makes global state changes and as
|
| @@ -177,9 +163,7 @@
|
| // Don't set a timeout if running on Valgrind, since it's generally much
|
| // slower.
|
| if (!IsRunningOnValgrind()) {
|
| -#if !defined(OS_NACL_NONSFI)
|
| SetProcessTimeout(GetSubProcessTimeoutTimeInSeconds());
|
| -#endif
|
| }
|
|
|
| // Disable core files. They are not very useful for our individual test
|
|
|