[LTP] [PATCH] setpriority01: Skip only PRIO_USER when unable to add test user
Saravana Kannan
saravanak@google.com
Thu Mar 7 16:44:55 CET 2019
On Thu, Mar 7, 2019, 3:00 AM Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
> > - ltpuser = SAFE_GETPWNAM(username);
> > - uid = ltpuser->pw_uid;
> > + if (!tst_run_cmd(cmd_useradd, NULL, NULL, 1)) {
> > + user_added = 1;
> > + ltpuser = SAFE_GETPWNAM(username);
> > + uid = ltpuser->pw_uid;
> > + }
>
> The only thing that I don't like here is that we do not check the cause
> of failure here. What exactly happens on android, is useradd missing
> there completely?
Correct, useradd is missing.
If so we should proceed with TCONF only if
> tst_run_cmd() returned 255 and TBROK the test on other non-zero return
> values.
>
But is the test that's broken if useradd fails for wherever reason? Isn't
it a configuration issue?
Thanks,
Saravana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20190307/b2e08468/attachment.html>
More information about the ltp
mailing list