diff options
author | mdempsky <mdempsky@chromium.org> | 2015-02-04 01:30:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-04 09:31:38 +0000 |
commit | f90ebdf89f1fb8c2b8e5e54f5cbdb1846281d360 (patch) | |
tree | 33a0a9445344a8faf4ae951b842c7a6ba3d04991 /sandbox | |
parent | 10feab647ef8b96609d087f9936eee9908b057b7 (diff) | |
download | chromium_src-f90ebdf89f1fb8c2b8e5e54f5cbdb1846281d360.zip chromium_src-f90ebdf89f1fb8c2b8e5e54f5cbdb1846281d360.tar.gz chromium_src-f90ebdf89f1fb8c2b8e5e54f5cbdb1846281d360.tar.bz2 |
sandbox: run Credentials.CanDetectRoot as a SANDBOX_TEST
This test calls chdir() which corrupts subsequent tests like
NamespaceSandboxTest.
TBR=jln@chromium.org
Review URL: https://codereview.chromium.org/902533002
Cr-Commit-Position: refs/heads/master@{#314530}
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/services/credentials_unittest.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sandbox/linux/services/credentials_unittest.cc b/sandbox/linux/services/credentials_unittest.cc index 1209fdf..40a2bc4 100644 --- a/sandbox/linux/services/credentials_unittest.cc +++ b/sandbox/linux/services/credentials_unittest.cc @@ -123,11 +123,11 @@ SANDBOX_TEST(Credentials, NestedUserNS) { } // Test the WorkingDirectoryIsRoot() helper. -TEST(Credentials, CanDetectRoot) { - ASSERT_EQ(0, chdir("/proc/")); - ASSERT_FALSE(WorkingDirectoryIsRoot()); - ASSERT_EQ(0, chdir("/")); - ASSERT_TRUE(WorkingDirectoryIsRoot()); +SANDBOX_TEST(Credentials, CanDetectRoot) { + PCHECK(0 == chdir("/proc/")); + CHECK(!WorkingDirectoryIsRoot()); + PCHECK(0 == chdir("/")); + CHECK(WorkingDirectoryIsRoot()); } // Disabled on ASAN because of crbug.com/451603. |