<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div>Hi,</div><br><div>By adding this comment I wanted to stress that the place of "errno = 0" is not randomly chosen, to prevent somebody from moving it back to the beginning of the file  <span data-emoji-typing="true">:)</span> </div><br><div>But if you find it not necessary, then please go ahead.</div><br><div>Thank you,</div><div>Bogdan</div><br><div class="gmail_quote_attribution">On Dec 11 2020, at 11:54 am, Cyril Hrubis <chrubis@suse.cz> wrote:</div><blockquote><div><div>Hi!</div><div>> The function output interferes with the variable errno, that leads to</div><div>> the false positive result on limited test setups. The issue fixed.</div><div>></div><div>> Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com></div><div>> ---</div><div>> .../open_posix_testsuite/conformance/interfaces/fork/7-1.c | 4 +++-</div><div>> 1 file changed, 3 insertions(+), 1 deletion(-)</div><div>></div><div>> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c</div><div>> index c3db90c00..4249d713d 100644</div><div>> --- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c</div><div>> +++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c</div><div>> @@ -53,12 +53,14 @@ static void read_catalog(nl_catd cat, char *who)</div><div>> {</div><div>> char *msg = NULL;</div><div>> int i, j;</div><div>> - errno = 0;</div><div>></div><div>> #if VERBOSE > 0</div><div>> output("Reading the message catalog from %s...\n", who);</div><div>> #endif</div><div>></div><div>> + /* the output function interferes with errno */</div><div>> + errno = 0;</div><div>> +</div><div>> for (i = 1; i <= 2; i++) {</div><div>> for (j = 1; j <= 2; j++) {</div><br><div>This is obviously correct, but I would avoid adding the comment, it's</div><div>kind of obvious that anything that calls to libc may and will interfere</div><div>with errno.</div><br><div>Also the first line of the commit description could be a bit more</div><div>description, half of the commits pushed to LTP are bugfixes. So maybe</div><div>something as:</div><br><div>openposix/fork/7-1.c: Clear errno correctly</div><br><div>...</div><br><div>I can push the patch with these changes if it's okay with you.</div><br><br><div>--</div><div>Cyril Hrubis</div><div>chrubis@suse.cz</div></div></blockquote><img class="mailspring-open" alt="Sent from Mailspring" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/750CB65B-8F87-484D-9373-5CE4E1003413@getmailspring.com?me=bf88d46f&recipient=bHRwQGxpc3RzLmxpbnV4Lml0">