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

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

Issue 59843005: Linux sandbox: print kernel support in credentials unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/services/credentials_unittest.cc
diff --git a/sandbox/linux/services/credentials_unittest.cc b/sandbox/linux/services/credentials_unittest.cc
index 355d4ab5e4a61043750247f103e9c3d46ecd1f93..da61cd590dc29eb1da0696bbc8ee6acd6c27704b 100644
--- a/sandbox/linux/services/credentials_unittest.cc
+++ b/sandbox/linux/services/credentials_unittest.cc
@@ -5,6 +5,7 @@
#include "sandbox/linux/services/credentials.h"
#include <errno.h>
+#include <stdio.h>
#include <unistd.h>
#include "base/logging.h"
@@ -68,11 +69,13 @@ SANDBOX_TEST(Credentials, MoveToNewUserNS) {
Credentials creds;
creds.DropAllCapabilities();
bool userns_supported = creds.MoveToNewUserNS();
- printf("Unprivileged CLONE_NEWUSER supported: %s\n",
- userns_supported ? "true." : "false.");
+ fprintf(stdout, "Unprivileged CLONE_NEWUSER supported: %s\n",
+ userns_supported ? "true." : "false.");
+ fflush(stdout);
if (!userns_supported) {
- printf("This kernel does not support unprivileged namespaces. "
- "USERNS tests will all pass.\n");
+ fprintf(stdout, "This kernel does not support unprivileged namespaces. "
+ "USERNS tests will succeed without running.\n");
+ fflush(stdout);
return;
}
CHECK(creds.HasAnyCapability());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698