[systemd-devel] [PATCH 1/2] test: update policy tests to handle user namespaces

Djalal Harouni tixxdz at opendz.org
Mon Sep 8 06:53:01 PDT 2014


On Mon, Sep 08, 2014 at 03:32:21PM +0200, Daniel Mack wrote:
> On 09/08/2014 03:18 PM, Djalal Harouni wrote:
> > 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 at opendz.org>
> 
> Applied, thanks! However, I will soon rework the entire test code again
> to have all of it integrated in one comprehensive self-test. But I'll
> resuse the code to set up the namespaces for that.
Ok, with this patch I already converted the high functions that perform
these tests to return CHECK_OK, CHECK_ERR and CHECK_SKIP, so you probably
just have to add a global struct that will contain the necessary
arguments for these functions and pass it. As it is done in test-kdbus
one.

Thank you!

> 
> Daniel
> 

-- 
Djalal Harouni
http://opendz.org


More information about the systemd-devel mailing list