mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 53791: Use the stout ELF parser to collect Linux rootfs files.
Date Sat, 19 Nov 2016 19:48:58 GMT


> On Nov. 18, 2016, 1:24 a.m., Jiang Yan Xu wrote:
> > src/tests/containerizer/rootfs.cpp, line 58
> > <https://reviews.apache.org/r/53791/diff/2/?file=1564519#file1564519line58>
> >
> >     This feels like an implementation of `ldd()` that coule be generally useful.
> >     
> >     Would it make sense to rename ldcache.hpp|cpp as ld.hpp|cpp and add `ldd()`
as a method in ld.hpp|cpp make sense?

I think the implementation in `ldcache.cpp` is complicated enough that it probably warrants
keeping it in its own file (especially given the massive comment block I had to put at the
top to explain what is going on). That said, I wouldn't be opposed to renaming `ldcache.hpp`
to `ldd.hpp` and adding an `ldd` call in there.


> On Nov. 18, 2016, 1:24 a.m., Jiang Yan Xu wrote:
> > src/tests/containerizer/rootfs.cpp, lines 81-84
> > <https://reviews.apache.org/r/53791/diff/2/?file=1564519#file1564519line81>
> >
> >     If we have to do this, format it this way
> >     
> >     ```
> >     auto entry = std::find_if(
> >         cache.begin(),
> >         cache.end(),
> >         [dependency](const ldcache::Entry& e) {
> >           return strings::startsWith(e.name, dependency);
> >         });
> >     ```
> >     
> >     But is prefix matching necessary? Can't we do extract matching (i.e.,`hashset.contains()`)?
> >     
> >     Note that our seed list are just programs without versions.
> 
> James Peach wrote:
>     I checked that you don't need the `startsWith`. The ld cache is a vector so I still
need to do the linear search.

Does it make sense to make the ldcache a `set` instead of a vector?


- Kevin


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


On Nov. 18, 2016, 10:53 p.m., James Peach wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53791/
> -----------------------------------------------------------
> 
> (Updated Nov. 18, 2016, 10:53 p.m.)
> 
> 
> Review request for mesos, Gilbert Song, Jie Yu, Kevin Klues, and Jiang Yan Xu.
> 
> 
> Bugs: MESOS-6588
>     https://issues.apache.org/jira/browse/MESOS-6588
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> The dependencies for the programs we need in the Linux root
> filesystem vary over time and across distributions. Since Stout
> has support for parsing the library dependencies of ELF binaries,
> use this to collect the necessary dependencies when constructing
> a root filesystem for the tests.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 5a47c93388234a68c3c486a021ccdbe3213c5bac 
>   src/linux/ldd.hpp PRE-CREATION 
>   src/linux/ldd.cpp PRE-CREATION 
>   src/tests/containerizer/rootfs.hpp 6bc3835cbb62536ec933ef38c9e15138b8611e5f 
>   src/tests/containerizer/rootfs.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/53791/diff/
> 
> 
> Testing
> -------
> 
> sudo make check (Fedora 24)
> 
> 
> Thanks,
> 
> James Peach
> 
>


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