From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] Question about the usage of tst_brk()
Date: Wed, 7 Nov 2018 06:31:07 -0500 (EST) [thread overview]
Message-ID: <1969756779.70592769.1541590267313.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20181107110922.GC8603@rei>
----- Original Message -----
> Hi!
> > If only TFAIL, TBROK and TCONF should be supported by tst_brk() in new
> > library,
> > i will add check to mark TWARN and TPASS as invalid.
>
> First of all I think that tst_brk() will only work with TBROK and TCONF at
> the
> moment, see the check_child_status() function, we do handle only TBROK and
> TCONF in the switch there, anything else will cause the test library to exit
> with invalid exit value. Well the tst_brk(TPASS, ...) will work by accident
> since we have to handle zero exit value there as well.
>
> However how the code is now the tst_brk(TPASS, ...) in new library will not
> account the passed result in the result counters, so it would be a good idea
> to
> check what value has been passed to the tst_brk() and allow only TBROK and
> TCONF there.
tst_brk is macro in newlib, so maybe we can catch this at compile-time?
>
> If we wanted to enable TPASS and TFAIL we would have to first define sane
> semantic for it. I guess that something as "exit currect test process and
> increment result counters" would be reasonable, this could be done with:
tst_brk() always suggested to me that this is somehow unusual termination
of test - something's not right with environment or test itself.
Our docs say "Printf-like function to report error and exit the test",
so my preference would to not use it for "good" outcomes.
Regards,
Jan
next prev parent reply other threads:[~2018-11-07 11:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 10:33 [LTP] Question about the usage of tst_brk() Xiao Yang
2018-11-07 10:39 ` Xiao Yang
2018-11-07 11:09 ` Cyril Hrubis
2018-11-07 11:31 ` Jan Stancek [this message]
2018-11-07 11:54 ` Cyril Hrubis
2018-11-07 12:38 ` Jan Stancek
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=1969756779.70592769.1541590267313.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--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.