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

Ruslan Kuprieiev kupruser at gmail.com
Wed Dec 3 11:12:59 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

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                |   1 +
 cr-restore.c              |   8 ++-
 cr-service.c              |  43 ++++++++-----
 include/cr-errno.h        |  11 ++++
 include/rst_info.h        |   1 +
 lib/criu.c                |  20 +++---
 lib/criu.h                |   2 +-
 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 +
 15 files changed, 356 insertions(+), 29 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