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

Unified Diff: chrome/test/nacl_security_tests/nacl_security_tests_linux.cc

Issue 7831053: Move NaCl tests out of chrome/test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
Index: chrome/test/nacl_security_tests/nacl_security_tests_linux.cc
===================================================================
--- chrome/test/nacl_security_tests/nacl_security_tests_linux.cc (revision 100205)
+++ chrome/test/nacl_security_tests/nacl_security_tests_linux.cc (working copy)
@@ -1,36 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/nacl_security_tests/nacl_security_tests_posix.h"
-#include <string>
-#include "chrome/test/nacl_security_tests/commands_posix.h"
-
-#define RETURN_IF_NOT_DENIED(x) \
- if (sandbox::SBOX_TEST_DENIED != x) { \
- return false; \
- }
-
-// Runs the security tests of sandbox for the nacl loader process.
-extern "C" bool RunNaClLoaderTests(void) {
- // Need to check if the system supports CLONE_NEWPID before testing
- // the filesystem accesses (otherwise the sandbox is not enabled).
- RETURN_IF_NOT_DENIED(sandbox::TestOpenReadFile("/etc"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenReadFile("/tmp"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenReadFile("$HOME"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/etc"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/etc/passwd"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/bin"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/usr/bin"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/usr/bin/bash"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/usr/bin/login"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("/usr/sbin"));
- RETURN_IF_NOT_DENIED(sandbox::TestOpenWriteFile("$HOME"));
-
- // Linux (suid) sandbox doesn't block connect, etc...
- RETURN_IF_NOT_DENIED(sandbox::TestCreateProcess("/usr/bin/env"));
- RETURN_IF_NOT_DENIED(sandbox::TestConnect("www.archive.org"));
-
- return true;
-}
-
« no previous file with comments | « chrome/test/nacl_security_tests/commands_posix.cc ('k') | chrome/test/nacl_security_tests/nacl_security_tests_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698