test: update policy tests to handle user namespaces
authorDjalal Harouni <tixxdz@opendz.org>
Mon, 8 Sep 2014 13:18:25 +0000 (14:18 +0100)
committerDaniel Mack <daniel@zonque.org>
Mon, 8 Sep 2014 13:28:02 +0000 (15:28 +0200)
commit189626ab945f5e2f647081aa3848bc299654eda9
treeb5b9a42871ffcad279a954b889aa3e553c3fa22d
parent86c0198c944b90946c1fdcc71e2b29d6e13347e6
test: update policy tests to handle user namespaces

Upstream kernels allow unprivileged users to create user namespaces
and change their uid/gid.

These patches update kdbus policy logic to handle this case and
improve our current checks across user namespaces.

So this patch adds:

* kdbus_test_waitpid() to get exit code of childs.
* kdbus_clone_userns_test() that performs the test inside a new
  user namespace.
* Converts all the other tests to return CHECK_OK, CHECK_SKIP or
  CHECK_ERR so we are consistent.

Currently we fail at kdbus_clone_userns_test() test #8. The next patch
will fix this issue.

Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
test/test-kdbus-policy.c