All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v1] openposix/fork/7-1.c: A bug fix
Date: Fri, 11 Dec 2020 10:54:31 +0100	[thread overview]
Message-ID: <X9NB12pkaskYs8+l@yuki.lan> (raw)
In-Reply-To: <20201211094416.26616-1-bogdan.lezhepekov@suse.com>

Hi!
> The function output interferes with the variable errno, that leads to
> the false positive result on limited test setups. The issue fixed.
> 
> Signed-off-by: Bogdan Lezhepekov <bogdan.lezhepekov@suse.com>
> ---
>  .../open_posix_testsuite/conformance/interfaces/fork/7-1.c    | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
> index c3db90c00..4249d713d 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/7-1.c
> @@ -53,12 +53,14 @@ static void read_catalog(nl_catd cat, char *who)
>  {
>  	char *msg = NULL;
>  	int i, j;
> -	errno = 0;
>  
>  #if VERBOSE > 0
>  	output("Reading the message catalog from %s...\n", who);
>  #endif
>  
> +	/* the output function interferes with errno */ 
> +	errno = 0;
> +
>  	for (i = 1; i <= 2; i++) {
>  		for (j = 1; j <= 2; j++) {

This is obviously correct, but I would avoid adding the comment, it's
kind of obvious that anything that calls to libc may and will interfere
with errno.

Also the first line of the commit description could be a bit more
description, half of the commits pushed to LTP are bugfixes. So maybe
something as:

openposix/fork/7-1.c: Clear errno correctly

...

I can push the patch with these changes if it's okay with you.


-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2020-12-11  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11  9:44 [LTP] [PATCH v1] openposix/fork/7-1.c: A bug fix Bogdan Lezhepekov
2020-12-11  9:54 ` Cyril Hrubis [this message]
2020-12-11 10:04   ` Bogdan Lezhepekov
2020-12-11 10:22     ` Bogdan Lezhepekov
2020-12-11 11:26       ` Cyril Hrubis
2020-12-11 10:53     ` Cyril Hrubis
2020-12-11 11:27     ` Cyril Hrubis
  -- strict thread matches above, loose matches on Subject: below --
2020-12-10 16:51 Bogdan Lezhepekov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9NB12pkaskYs8+l@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.