[CRIU] Contributing to CRIU

Pavel Emelyanov xemul at parallels.com
Wed Jul 2 10:23:35 PDT 2014


On 07/02/2014 08:41 PM, Yangkook Kim wrote:
> Hi,
> 
> I like to contribute the project,

That's great!

> but I don't know where I should I start from.
> So, I want to know
> 
> - how to run tests suites

It's just like

# make test

This would run the minimal test suite. Other than this
we have tests on libcriu, memory snapshot and plugins.
They are run like this

# cd test/
# make other

> - if there are some janitor things in order to get used to the code base.

Sure :)

First of all, ohloh says that the criu sources lack the comments. If
you grep for various struct declarations and try to document them,
thus would give you pretty good understanding of what's going on.

Next, we have the "criu show" command, that can show individual image
files, show info related to some pid and show the combined information
collected from the whole image set (the cr_show() is the entry point).
While showing individual files mostly works OK, the rest of showing
functionality is not perfect. In particular, per-pid show misses many
per-process images and summary shower doesn't show "global" stuff like
files, sockets, ttys, etc. Fixing this (and proposing some better
showing facilities) would be very much appreciated.

Some more sophisticated thing. We have the cr-restore.c file in which
there sits _all_ the memory restoration code (starting from open_vmas()
routine). It would be good if all the memory-related code is moved
into the mem.c.

Last thing that comes to my mind is the certain amount of code, that
can be factored out. In particular the pie/log-simple.c contains a
good amount of such. Another thing is so called "yards". We currently
have two created by prepare_roots_yard() and prepare_cgroup_sfd()
and they do two identical things with different variables.

Thanks,
Pavel



More information about the CRIU mailing list