mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Schwartzmeyer <and...@schwartzmeyer.com>
Subject Re: Review Request 66912: Resolved the `realpath` of the sandbox directory in tests.
Date Wed, 02 May 2018 19:52:55 GMT


> On May 2, 2018, 12:03 p.m., Chun-Hung Hsiao wrote:
> > Do you know what are the tests that compare the real paths? I was wondering if we
should just fix those tests for self-containedness.

They are the tests listed in the attached bug, plus previous tests that had to be "fixed"
like that which I could pull out of the repo's history if you'd like.

I think we should fix it like this, rather than manually fix each test, because I believe
it's a common assumption that the `sandbox` (which is a temporary directory) is a fully resolved
path.


> On May 2, 2018, 12:03 p.m., Chun-Hung Hsiao wrote:
> > 3rdparty/stout/include/stout/tests/utils.hpp
> > Lines 50 (patched)
> > <https://reviews.apache.org/r/66912/diff/1/?file=2015943#file2015943line51>
> >
> >     Suggestion:
> >     ```
> >     ASSERT_SOME(realpath)
> >       << "Failed to get realpath of '" << directory.get() << "':
"
> >       << (realpath.isError() ? realpath.error() : "No such directory");
> >     ```

This failure is so unlikely... but I can add that.


- Andrew


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/66912/#review202302
-----------------------------------------------------------


On May 2, 2018, 11:29 a.m., Andrew Schwartzmeyer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/66912/
> -----------------------------------------------------------
> 
> (Updated May 2, 2018, 11:29 a.m.)
> 
> 
> Review request for mesos, Chun-Hung Hsiao, Joseph Wu, and Jan Schlicht.
> 
> 
> Bugs: MESOS-8868
>     https://issues.apache.org/jira/browse/MESOS-8868
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This fixes test failures on systems (like macOS) where `/tmp` is a
> symlink. One such scenario is a test which makes a file in the
> sandbox, then makes a symlink to the file, and finally compares the
> realpath of the symlink to the file. If a part of the path of the
> original file in the sandbox is a symlink, this will cause the test to
> fail. The fact that the sandbox path is not a fully resolved file name
> is confusing. By instead getting the `realpath` of the sandbox during
> setup, we can fix the current test failures, and avoid future ones.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/include/stout/tests/utils.hpp bfbaa01514214c15f7d62742d37bfd8fa4514974

> 
> 
> Diff: https://reviews.apache.org/r/66912/diff/1/
> 
> 
> Testing
> -------
> 
> stout-tests and libprocess-tests on a MacBook (mesos-tests is still building)
> 
> 
> Thanks,
> 
> Andrew Schwartzmeyer
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message