[CRIU] [PATCH 0/9] cr_errno, v4

Ruslan Kuprieiev kupruser at gmail.com
Thu Dec 11 12:55:09 PST 2014


Currently our RPC doesn't provide almost any info
about failed request. Lets add first 4 most common
errors to be reported by service. These are:
  Process with such pid already exists(Pid do not match expected)
  No process with such pid
  Bad opts

v2, changed the way we trasfer cr_errno from children and fixed
    error codes
v3, atomic_cmpxchg used for cr_err
v4, use helpers to access cr_err and cr_errno

Ruslan Kuprieiev (9):
  cr-errno: initial commit
  util: set cr_errno to ESRCH if no PID dir in proc
  cr-restore: set cr_error to EEXIST if such pid already exists, v3
  cr-service: setup_opts_from_req: use single error exit point
  cr-service: set cr_errno to EBADRQC if set_opts_from_req fails
  service: add cr_errno to criu_resp and send cr_errno in it
  test: rpc: cr_errno, v3
  libcriu: add cr_errno support
  test:libcriu: add cr_errno test

 Makefile.crtools          |   1 +
 cr-errno.c                |  12 ++++
 cr-restore.c              |  11 +++-
 cr-service.c              |  43 ++++++++-----
 include/cr-errno.h        |  14 +++++
 include/rst_info.h        |   1 +
 lib/criu.c                |   3 +
 protobuf/rpc.proto        |   2 +
 test/libcriu/Makefile     |   1 +
 test/libcriu/run.sh       |   1 +
 test/libcriu/test_errno.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++
 test/rpc/errno.py         | 136 +++++++++++++++++++++++++++++++++++++++++
 test/rpc/run.sh           |   3 +
 util.c                    |   3 +
 14 files changed, 367 insertions(+), 16 deletions(-)
 create mode 100644 cr-errno.c
 create mode 100644 include/cr-errno.h
 create mode 100644 test/libcriu/test_errno.c
 create mode 100755 test/rpc/errno.py

-- 
1.9.3



More information about the CRIU mailing list