> On April 19, 2016, 3:03 p.m., haosdent huang wrote:
> > 3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp, line 975
> > <https://reviews.apache.org/r/45326/diff/6/?file=1350574#file1350574line975>
> >
> >     Do we need test the priority here? When a binary exists in different 
> > folders at the same time.
> 
> Guangya Liu wrote:
>     I think that as long as the binary can be found should be good enough, 
> why need care the priority here?
> 
> haosdent huang wrote:
>     Let me describe it in another way. Suppose `PATH` is `/usr/bin:/bin`, and 
> `bar` exists in both `/usr/bin/bar` and `/bin/bar`. Are we we always 
> guarantee that take the first one in `os::which()`? Or add comment about the 
> priority?
> 
> Guangya Liu wrote:
>     Yes, I was following linux system, always using the first. Does adding 
> some comments here make sense?
>     
>     root@mesos002:~/src/mesos/m2/mesos# which ls
>     /usr/local/bin/ls
>     root@mesos002:~/src/mesos/m2/mesos# env | grep PATH
>     
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/bin:/root/go-tools/bin
>     GOPATH=/root/go-tools
>     root@mesos002:~/src/mesos/m2/mesos# ls /usr/local/bin/ls
>     /usr/local/bin/ls
>     root@mesos002:~/src/mesos/m2/mesos# ls /bin/ls
>     /bin/ls
> 
> haosdent huang wrote:
>     Seems add a comment would be better.

I'll add a TODO. We need to test file without 'x' permission as well.


- Jie


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


On April 19, 2016, 2:56 p.m., Guangya Liu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45326/
> -----------------------------------------------------------
> 
> (Updated April 19, 2016, 2:56 p.m.)
> 
> 
> Review request for mesos, David vonThenen, Gilbert Song, haosdent huang, and 
> Jie Yu.
> 
> 
> Bugs: MESOS-4576
>     https://issues.apache.org/jira/browse/MESOS-4576
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented os::which().
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/posix/os.hpp 
> dfe4eab2d812ef807c7416ac205573d55383c4ee 
>   3rdparty/libprocess/3rdparty/stout/tests/os_tests.cpp 
> 9bd34c7508cd813c5de18028956f6a740997c266 
> 
> Diff: https://reviews.apache.org/r/45326/diff/
> 
> 
> Testing
> -------
> 
> make
> make check
> 
> [ RUN      ] OsTest.Which
> [       OK ] OsTest.Which (0 ms)
> 
> 
> Thanks,
> 
> Guangya Liu
> 
>

Reply via email to