From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/1] syscalls: Add missing WEXITSTATUS() check
Date: Tue, 12 Nov 2024 18:05:34 +0100 [thread overview]
Message-ID: <20241112170534.GA153227@pevik> (raw)
In-Reply-To: <ZzNHVcaeZU1ZKdYV@yuki.lan>
Hi Cyril,
...
> > > --- a/testcases/kernel/syscalls/madvise/madvise08.c
> > > +++ b/testcases/kernel/syscalls/madvise/madvise08.c
> > > @@ -165,7 +165,7 @@ static pid_t run_child(int advice)
> > > fmem,
> > > FMEMSIZE,
> > > advstr);
> > > - exit(1);
> > > + exit(0);
> > > }
> > > abort();
> > > }
> > Good catch, thanks!
> > Maybe it'd be more logical to keep exit(1) (it's error) and check against
> > WEXITSTATUS(status) == 1, but it's a minor detail, let's keep exit(0).
> I wouldn't do so, as it may confuse people into thinking that the return
> value actually carries any information, which it does not since the
> failure has been already reported. I would just stick to exit(0) which
> makes it more clear that we just need to exit the process, nothing more.
This makes sense, kept it this way.
> > Can I merge with your RBT?
> Yes, with the fix above.
Thanks, merged.
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2024-11-12 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-11 14:36 [LTP] [PATCH 1/1] syscalls: Add missing WEXITSTATUS() check Petr Vorel
2024-11-11 16:08 ` Cyril Hrubis
2024-11-12 11:00 ` Petr Vorel
2024-11-12 12:17 ` Cyril Hrubis
2024-11-12 17:05 ` Petr Vorel [this message]
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=20241112170534.GA153227@pevik \
--to=pvorel@suse.cz \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox