diff options
author | Scott Lobdell <slobdell@google.com> | 2021-04-25 19:53:00 +0000 |
---|---|---|
committer | Scott Lobdell <slobdell@google.com> | 2021-04-25 19:53:00 +0000 |
commit | dfa7c0a9b59c4ef591f46f7624dfe687c2bb0a6c (patch) | |
tree | 4b78af6f79fb9de2a712ac6268059bf838000a40 /tests/BionicDeathTest.h | |
parent | 987dccb5f063052171fae7a59cbf9fca808f8f80 (diff) | |
parent | 4626df89bfb561fc06d805e04d040a15f378919f (diff) |
Merge SP1A.210425.001
Change-Id: If71c56f3e2e9fbbeffc7096a560a5ef8b8cd8566
Diffstat (limited to 'tests/BionicDeathTest.h')
-rw-r--r-- | tests/BionicDeathTest.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/BionicDeathTest.h b/tests/BionicDeathTest.h deleted file mode 100644 index f70839a0f..000000000 --- a/tests/BionicDeathTest.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2014 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#include <signal.h> - -#include <gtest/gtest.h> - -#if !defined(__BIONIC__) -#define sigaction64 sigaction -#endif - -class BionicDeathTest : public testing::Test { - protected: - virtual void SetUp() { - // Suppress debuggerd stack traces. Too slow. - for (int signo : { SIGABRT, SIGBUS, SIGSEGV, SIGSYS }) { - struct sigaction64 action = { .sa_handler = SIG_DFL }; - sigaction64(signo, &action, &previous_); - } - } - - virtual void TearDown() { - for (int signo : { SIGABRT, SIGBUS, SIGSEGV, SIGSYS }) { - sigaction64(signo, &previous_, nullptr); - } - } - - private: - struct sigaction64 previous_; -}; |