mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Peach <jpe...@apache.org>
Subject Re: Review Request 68991: Added a test `FsTest.Lsof`.
Date Tue, 16 Oct 2018 15:37:46 GMT


> On Oct. 12, 2018, 5:40 p.m., James Peach wrote:
> > 3rdparty/stout/tests/os/filesystem_tests.cpp
> > Lines 830 (patched)
> > <https://reviews.apache.org/r/68991/diff/1/?file=2096374#file2096374line830>
> >
> >     Maybe also add:
> >     ```
> >     EXPECT_FALSE(std::find(fds->begin(), fds->end(), -1) != fds->end())
> >     ```
> 
> Qian Zhang wrote:
>     Can you please elaborate a bit why we need to add this?

I was just thinking about a negative test to ensure that we don't have anything in the result
set that shouldn't be there. Maybe an alternative approach would be to loop over the returned
descriptors and make a system call, e.g. fcntl(F_GETFL), to verify that every entry is an
open descriptor.

If you don't think adding more checks helps the test, I'm OK with dropping this issue :)


- James


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


On Oct. 14, 2018, 1:35 p.m., Qian Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/68991/
> -----------------------------------------------------------
> 
> (Updated Oct. 14, 2018, 1:35 p.m.)
> 
> 
> Review request for mesos, Gilbert Song and James Peach.
> 
> 
> Bugs: MESOS-9152
>     https://issues.apache.org/jira/browse/MESOS-9152
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added a test `FsTest.Lsof`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/stout/tests/os/filesystem_tests.cpp 29f06f3dd126007d6b3a81f31795270f0654b847

> 
> 
> Diff: https://reviews.apache.org/r/68991/diff/2/
> 
> 
> Testing
> -------
> 
> sudo make check
> 
> 
> Thanks,
> 
> Qian Zhang
> 
>


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