Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: sandbox/linux/services/yama_unittests.cc

Issue 371113003: Disable yama on 3.2 kernels with 32bit userland and 64bit kernel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« sandbox/linux/services/yama.cc ('K') | « sandbox/linux/services/yama.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/yama_unittests.cc
diff --git a/sandbox/linux/services/yama_unittests.cc b/sandbox/linux/services/yama_unittests.cc
index 17ef4b40de5a046286296eab9fafb8302e6ac2cb..1f0fde31486c9b5a06a72b364f0762569576e236 100644
--- a/sandbox/linux/services/yama_unittests.cc
+++ b/sandbox/linux/services/yama_unittests.cc
@@ -72,7 +72,9 @@ TEST(Yama, GetStatus) {
// This test is not running sandboxed, there is no reason to not know the
// status.
- EXPECT_NE(0, Yama::STATUS_KNOWN & status1);
+ if (!Yama::HasLinux32Bug()) {
Jorge Lucangeli Obes 2014/07/08 04:14:28 GetStatus should still work as before.
+ EXPECT_NE(0, Yama::STATUS_KNOWN & status1);
+ }
if (status1 & Yama::STATUS_STRICT_ENFORCING) {
// If Yama is strictly enforcing, it is also enforcing.
@@ -112,6 +114,9 @@ void SetYamaRestrictions(bool enable_restriction) {
}
TEST(Yama, RestrictPtraceWorks) {
+ if (!Yama::IsPresent())
Jorge Lucangeli Obes 2014/07/08 04:14:28 This is where we should be if-casing 3.2 kernels.
+ return;
+
ScopedProcess process1(base::Bind(&SetYamaRestrictions, true));
ASSERT_TRUE(process1.WaitForClosureToRun());
« sandbox/linux/services/yama.cc ('K') | « sandbox/linux/services/yama.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698