[LTP] [PATCH] setregid: use common user and group names.

Sandeep Patil sspatil@google.com
Tue Mar 27 19:24:40 CEST 2018


On Tue, Mar 27, 2018 at 11:43:13AM +0200, Petr Vorel wrote:
> Hi Sandeep,
> 
> > On Mon, Mar 26, 2018 at 02:42:00PM +0200, Petr Vorel wrote:
> > > Hi Sandeep,
> 
> > > > Android systems do not have groups names 'users' 'sys' etc. Replace them
> > > > with 'nobody' and 'daemon' for the purposes of setregid0[34] tests and
> > > > make the nomenclature across both of these tests more consistent.
> 
> > > > After the change, both setregid03 and setregid04 can run
> > > > on Android systems.
> > > I guess we don't care about older-but-still-quite-new releases and look for the future (as
> > > 'daemon' was added to aosp quite recently, 'shell' would also work for older).
> 
> > 'shell' is not common though, e.g. it didn't exist by default on the
> > debian system that I test the patches before I send them out after testing on
> > Android.
> Sorry I wasn't clear, I meant for older Android releases. Sure 'shell' isn't probably on
> any linux distribution.
> 
> > The only other group that I could find that existed on both Android and my
> > x86 workstation is 'audio'. I can change it to that if you like, but again, I
> > don't know how portable that would be vs 'daemon'.
> 
> > Also, I wouldn't worry about the test breaking on slightly older Android. The
> > vast majority of LTS tests are run through VTS, where these tests were disabled[1]
> > due to the failure anyway. This change will allow us to start running them on
> > all android devices now onwards ..
> 
> I thought that there could be preprocesor condition for Android defining different users
> for it, but if you don't need it I'll merge it.

Yes, we can probable ifdef it in one place using "#ifdef __ANDROID__" or
other equivalent, but I don't think its needed here. We want to avoid doing
that as much as possible. It is fair to say these test will be run with VTS
"now onwards" anyway ..

> and just note your related commit in commit
> message:
> 8e8648463 ("libcutils: Add "daemon" and "bin" users for testing only")

I'll resend the patch with this added, thanks for the review.

- ssp


More information about the ltp mailing list