Repository: mesos Updated Branches: refs/heads/master ab49a3cee -> d5abaccf7
Used ASSERT instead of CHECK in os_tests.cpp. Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/d5abaccf Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/d5abaccf Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/d5abaccf Branch: refs/heads/master Commit: d5abaccf73311af06f3d2872495dfd050e08d60b Parents: ab49a3c Author: Jie Yu <[email protected]> Authored: Wed Mar 11 15:53:37 2015 -0700 Committer: Jie Yu <[email protected]> Committed: Wed Mar 11 15:53:37 2015 -0700 ---------------------------------------------------------------------- 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/d5abaccf/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp ---------------------------------------------------------------------- diff --git a/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp b/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp index c396c1d..343f95b 100644 --- a/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp +++ b/3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp @@ -904,7 +904,8 @@ TEST_F(OsTest, Mknod) { // mknod requires root permission. Result<string> user = os::user(); - CHECK_SOME(user); + ASSERT_SOME(user); + if (user.get() != "root") { return; } @@ -912,16 +913,16 @@ TEST_F(OsTest, Mknod) const string& device = "null"; const string& existing = path::join("/dev", device); - CHECK(os::exists(existing)); + ASSERT_TRUE(os::exists(existing)); Try<mode_t> mode = os::stat::mode(existing); - CHECK_SOME(mode); + ASSERT_SOME(mode); Try<dev_t> rdev = os::stat::rdev(existing); - CHECK_SOME(rdev); + ASSERT_SOME(rdev); const string& another = path::join(os::getcwd(), device); - CHECK(!os::exists(another)); + ASSERT_FALSE(os::exists(another)); EXPECT_SOME(os::mknod(another, mode.get(), rdev.get()));
