summaryrefslogtreecommitdiffstats
path: root/chrome/test/nacl_security_tests/commands_posix.cc
diff options
context:
space:
mode:
authorjvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 23:40:30 +0000
committerjvoung@google.com <jvoung@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-15 23:40:30 +0000
commitad938578ef158f52490ddc978579b7986753eda0 (patch)
treef0a5e952fe2554e3bd1f055524b4130252eb38ae /chrome/test/nacl_security_tests/commands_posix.cc
parentf49a0c88d5579bcd9a3d20668dcba469ceb90a55 (diff)
downloadchromium_src-ad938578ef158f52490ddc978579b7986753eda0.zip
chromium_src-ad938578ef158f52490ddc978579b7986753eda0.tar.gz
chromium_src-ad938578ef158f52490ddc978579b7986753eda0.tar.bz2
Remove debug fprintfs which don't compile on waterfall. Add missing header.
Review URL: http://codereview.chromium.org/2870055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/nacl_security_tests/commands_posix.cc')
-rw-r--r--chrome/test/nacl_security_tests/commands_posix.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/chrome/test/nacl_security_tests/commands_posix.cc b/chrome/test/nacl_security_tests/commands_posix.cc
index 85196e3..013043e 100644
--- a/chrome/test/nacl_security_tests/commands_posix.cc
+++ b/chrome/test/nacl_security_tests/commands_posix.cc
@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "./commands_posix.h"
+#include "chrome/test/nacl_security_tests/commands_posix.h"
#include <fcntl.h>
#include <netdb.h>
+#include <stdio.h>
+#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -22,7 +24,6 @@ SboxTestResult TestOpenReadFile(const char *path) {
if (-1 == fd) {
return SBOX_TEST_DENIED;
} else {
- fprintf(stderr, "OOPS: Opened file for read %s %d\n", path, fd);
close(fd);
return SBOX_TEST_SUCCEEDED;
}
@@ -33,7 +34,6 @@ SboxTestResult TestOpenWriteFile(const char *path) {
if (-1 == fd) {
return SBOX_TEST_DENIED;
} else {
- fprintf(stderr, "OOPS: Opened file for write %s %d\n", path, fd);
close(fd);
return SBOX_TEST_SUCCEEDED;
}
@@ -54,7 +54,6 @@ SboxTestResult TestCreateProcess(const char *path) {
}
return SBOX_TEST_SUCCEEDED;
} else if (0 < pid) {
- fprintf(stderr, "PARENT: Oops, forked child!\n");
waitpid(pid, &child_stat, WNOHANG);
return SBOX_TEST_SUCCEEDED;
} else {
@@ -72,7 +71,6 @@ SboxTestResult TestConnect(const char *url) {
hints.ai_socktype = SOCK_STREAM;
rv = getaddrinfo(url, "http", &hints, &servinfo);
if (0 != rv) {
- fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv));
return SBOX_TEST_DENIED;
}
@@ -82,7 +80,6 @@ SboxTestResult TestConnect(const char *url) {
if (-1 == conn_sock) {
perror("socket");
freeaddrinfo(servinfo);
- fprintf(stderr, "Error at socket()\n");
return SBOX_TEST_DENIED;
}
@@ -92,7 +89,6 @@ SboxTestResult TestConnect(const char *url) {
return SBOX_TEST_DENIED;
}
- fprintf(stderr, "Connected to server.\n");
shutdown(conn_sock, SHUT_RDWR);
close(conn_sock);
freeaddrinfo(servinfo);
@@ -105,7 +101,6 @@ SboxTestResult TestConnect(const char *url) {
// context-independent, yet leave no traces).
SboxTestResult TestDummyFails() {
- fprintf(stderr, "Running dummy sandbox test, which should fail\n");
return SBOX_TEST_SUCCEEDED;
}