----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/30609/#review71686 -----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp <https://reviews.apache.org/r/30609/#comment117553> this is leaking the implementation, both that it's using stat and that it's using lstat in particular. Why not just have size(path) do the right thing, e.g., follow the link if it's a symlink, and return an error if it's something for which it doesn't make sense? 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp <https://reviews.apache.org/r/30609/#comment117551> Bytes expectedSize = Bytes(53); ... EXPECT_SOME_EQ(expectedSize, os::lstatsize(file)) 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp <https://reviews.apache.org/r/30609/#comment117552> EXPECT_ERROR(os::lstatsize(...)) - Ian Downes On Feb. 7, 2015, 8:59 a.m., Bernd Mathiske wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/30609/ > ----------------------------------------------------------- > > (Updated Feb. 7, 2015, 8:59 a.m.) > > > Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and > Timothy Chen. > > > Bugs: MESOS-2072 > https://issues.apache.org/jira/browse/MESOS-2072 > > > Repository: mesos > > > Description > ------- > > This returns a file's size as reported by lstat(). > > > Diffs > ----- > > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp > 8a4fda97ee29c185471a69f60803efc193cbe922 > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp > 8a2d445c2edaa70da0e7b50e14ef88b2d9224a16 > > Diff: https://reviews.apache.org/r/30609/diff/ > > > Testing > ------- > > Wrote a simple test that creates a file and tests its size, and also checks > if a non-existing file yields an error. > > > Thanks, > > Bernd Mathiske > >
