[LTP] [PATCH] setpriority01: Skip only PRIO_USER when unable to add test user
Cyril Hrubis
chrubis@suse.cz
Thu Mar 7 11:59:33 CET 2019
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? If so we should proceed with TCONF only if
tst_run_cmd() returned 255 and TBROK the test on other non-zero return
values.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list