[CRIU] [PATCH 0/4] Implementation of configuration files

vkabatov at redhat.com vkabatov at redhat.com
Mon May 22 08:00:13 PDT 2017


From: Veronika Kabatova <vkabatov at redhat.com>

This patchset addresses GitHub issue #278 - add support for configuration files.
Configuration files allow users to write their most used options into a file
and reuse them instead of typing them all the time on the command line. Two
methods for configuration file usage are introduced:
    -- passing a specific file with --config FILEPATH
    -- configuration files /etc/criu.d/default.conf and
       $HOME/.criu.d/default.conf are parsed (in this order) by default if
       present (can be disabled by --no-default-config option)

Configuration file hierarchy aims to be consistent with command line usage (no
difference between using configuration files and command line with the right
order of options), which allows overriding of boolean options and partial
specification when using options which can be used more times.

Configuration file format allows comments and uses long options syntax,
therefore a long version for verbosity option needed to be introduced first for
users who would wish to specify verbosity settings in the configuration files.

The test suite was modified to use --no-default-config to not break when run
on system which would be using default configuration files and a simple test
is added to check option parsing is working properly.

Veronika Kabatova (4):
  Add long option for verbosity changes
  Add support for configuration files
  Add documentation for configuration files
  Modify and add test for configuration file functionality

 Documentation/criu.txt                     |  40 +++++-
 criu/Makefile                              |   7 +
 criu/crtools.c                             | 212 +++++++++++++++++++++++++++--
 criu/include/cr_options.h                  |   7 +
 test/Makefile                              |   2 +-
 test/zdtm.py                               |   5 +-
 test/zdtm/static/Makefile                  |   1 +
 test/zdtm/static/config_inotify_irmap.c    |  91 +++++++++++++
 test/zdtm/static/config_inotify_irmap.desc |   3 +
 9 files changed, 353 insertions(+), 15 deletions(-)
 create mode 100644 test/zdtm/static/config_inotify_irmap.c
 create mode 100644 test/zdtm/static/config_inotify_irmap.desc

-- 
2.7.4



More information about the CRIU mailing list