<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2019 at 9:05 AM Cyril Hrubis <<a href="mailto:chrubis@suse.cz">chrubis@suse.cz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi!<br>
> > But is the test that's broken if useradd fails for wherever reason? Isn't<br>
> > it a configuration issue?<br>
> ><br>
> ><br>
> Looking more into the definition of TBROK, TCONF and the code before my<br>
> changes:<br>
> <br>
> - if (eaccess("/etc/passwd", W_OK))<br>
> - tst_brk(TCONF, "/etc/passwd is not accessible");<br>
> -<br>
> - tst_run_cmd(cmd_useradd, NULL, NULL, 0);<br>
> - user_added = 1;<br>
> -<br>
> <br>
> Should an eaccess write failure have resulted in a TCONF? Shouldn't that<br>
> have been a TBROK too?<br>
<br>
Looking at the git log this seems to be handling very specific case<br>
where the rootfs is read only, quite likely this test was failing on<br>
some specific embedded hardware. As far as I can tell this sounds like a<br>
reasonable solution to the problem.<br>
<br>
> I'm fine with whatever way we go, except not wanting to fail the entire<br>
> test case just because useradd isn't present in android. It's still very<br>
> useful to run the other setpriority tests.<br>
<br>
Sounds good, there is no point not to map missing useradd to TCONF, I<br>
just want to avoid mapping segfaulting or otherwise faulty useradd to<br>
TCONF as well.<br></blockquote><div><br></div><div>Thanks for the reviews and comments! I sent out a v2 patch that addressed your concerns. Can you please take a look at that and accept or suggest changes to it? In that patch, I treated the "no write permissions to /etc/passwd" as a TBROK and not TCONF as that seemed more appropriate to me. But if you want I can map that back to TCONF -- according to man pages, useradd has an error code for not being able to write to /etc/passwd.</div><div><br></div><div>Thanks,</div><div>Saravana</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
</blockquote></div></div>