Bug 1344106 - Remove Linux todos() now that Linux sandboxing is riding the trains. r?haik draft
authorHaik Aftandilian <haftandilian@mozilla.com>
Fri, 03 Mar 2017 09:50:29 +0100
changeset 493174 78045638f561855d22122dc47efad4931470bbea
parent 493173 a945553dc0171676c506c2028be1a1cde92a9f1a
child 547773 6e417a93367248845f123707610fc6ee4de0287b
push id47663
push usergpascutto@mozilla.com
push dateFri, 03 Mar 2017 11:06:14 +0000
reviewershaik
bugs1344106
milestone54.0a2
Bug 1344106 - Remove Linux todos() now that Linux sandboxing is riding the trains. r?haik MozReview-Commit-ID: 9tI2S6fEYkD
security/sandbox/test/browser_content_sandbox_fs.js
security/sandbox/test/browser_content_sandbox_syscalls.js
--- a/security/sandbox/test/browser_content_sandbox_fs.js
+++ b/security/sandbox/test/browser_content_sandbox_fs.js
@@ -142,50 +142,30 @@ add_task(function*() {
   // exit without failing. The Linux content sandbox is only enabled
   // on Nightly at this time.
   try {
     level = prefs.getIntPref("security.sandbox.content.level");
   } catch (e) {
     prefExists = false;
   }
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(prefExists, "pref security.sandbox.content.level exists");
-    if (!prefExists) {
-      return;
-    }
-  }
-
   ok(prefExists, "pref security.sandbox.content.level exists");
   if (!prefExists) {
     return;
   }
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(level > 0, "content sandbox enabled for !nightly.");
-    return;
-  }
-
   info(`security.sandbox.content.level=${level}`);
   ok(level > 0, "content sandbox is enabled.");
   if (level == 0) {
     info("content sandbox is not enabled, exiting");
     return;
   }
 
   let isFileIOSandboxed = isContentFileIOSandboxed(level);
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(isFileIOSandboxed, "content file I/O sandbox enabled for !nightly.");
-    return;
-  }
-
   // Content sandbox enabled, but level doesn't include file I/O sandboxing.
   ok(isFileIOSandboxed, "content file I/O sandboxing is enabled.");
   if (!isFileIOSandboxed) {
     info("content sandbox level too low for file I/O tests, exiting\n");
     return;
   }
 
   // Test creating a file in the home directory from a web content process
--- a/security/sandbox/test/browser_content_sandbox_syscalls.js
+++ b/security/sandbox/test/browser_content_sandbox_syscalls.js
@@ -99,17 +99,17 @@ function areContentSyscallsSandboxed(lev
   switch (Services.appinfo.OS) {
     case "WINNT":
       syscallsSandboxMinLevel = 1;
       break;
     case "Darwin":
       syscallsSandboxMinLevel = 1;
       break;
     case "Linux":
-      syscallsSandboxMinLevel = 2;
+      syscallsSandboxMinLevel = 1;
       break;
     default:
       Assert.ok(false, "Unknown OS");
   }
 
   return (level >= syscallsSandboxMinLevel);
 }
 
@@ -135,50 +135,30 @@ add_task(function*() {
   // exit without failing. The Linux content sandbox is only enabled
   // on Nightly at this time.
   try {
     level = prefs.getIntPref("security.sandbox.content.level");
   } catch (e) {
     prefExists = false;
   }
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(prefExists, "pref security.sandbox.content.level exists");
-    if (!prefExists) {
-      return;
-    }
-  }
-
   ok(prefExists, "pref security.sandbox.content.level exists");
   if (!prefExists) {
     return;
   }
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(level > 0, "content sandbox enabled for !nightly.");
-    return;
-  }
-
   info(`security.sandbox.content.level=${level}`);
   ok(level > 0, "content sandbox is enabled.");
   if (level == 0) {
     info("content sandbox is not enabled, exiting");
     return;
   }
 
   let areSyscallsSandboxed = areContentSyscallsSandboxed(level);
 
-  // Special case Linux on !isNightly
-  if (isLinux() && !isNightly()) {
-    todo(areSyscallsSandboxed, "content syscall sandbox enabled for !nightly.");
-    return;
-  }
-
   // Content sandbox enabled, but level doesn't include syscall sandboxing.
   ok(areSyscallsSandboxed, "content syscall sandboxing is enabled.");
   if (!areSyscallsSandboxed) {
     info("content sandbox level too low for syscall tests, exiting\n");
     return;
   }
 
   let browser = gBrowser.selectedBrowser;