[sheepdog] [PATCH 04/14] tests: check root privilege

MORITA Kazutaka morita.kazutaka at gmail.com
Tue Apr 30 11:24:52 CEST 2013


At Tue, 30 Apr 2013 17:07:55 +0800,
Liu Yuan wrote:
> 
> On 04/30/2013 04:29 PM, MORITA Kazutaka wrote:
> > This prevents non-root users from running tests which need root
> > privilege.
> 
> Can we add 'sudo' instead of root check? Then we don't need to add
> 'sudo', this will help users like me who 'sudo' will not require password.

Adding 'sudo' is not a good idea.  I don't think all the developers
have an environment where they can be root without password.  'sudo'
should be added outside of the test script.

Currently, I'm preparing continuous integration platform on BuildHive
where root is not allowed.  This patch is also necessary for it.

 $ https://buildhive.cloudbees.com/job/collie/job/sheepdog/19/console

> 
> Another wish is that it would be wonderful if we can run tests at other
> directory. (maybe a simple 'cd' in the check script?)

Setting the working directory with an environment variable doesn't
works for you?  For example,

 $ sudo env WD=/other/directory ./check

Thanks,

Kazutaka



More information about the sheepdog mailing list