From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 3/4] newlib: Allow SAFE_MACROS to be called from cleanup
Date: Tue, 14 Feb 2017 08:23:12 -0500 (EST) [thread overview]
Message-ID: <350522678.4314423.1487078592694.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170214122639.442-3-chrubis@suse.cz>
----- Original Message -----
> diff --git a/doc/test-writing-guidelines.txt
> b/doc/test-writing-guidelines.txt
> index 41cee58..cec4bdc 100644
> --- a/doc/test-writing-guidelines.txt
> +++ b/doc/test-writing-guidelines.txt
> @@ -341,9 +341,6 @@ cleanup() callback.
> initialized. (Some of the steps may not depend on others and everything
> will work if there were swapped but let's keep it in order.)
>
> -3. Avoid using SAFE_MACROS() in cleanup if you want the cleanup to carry on
> - when a cleanup step has failed.
> -
> The first rule may seem complicated at first however, on the contrary, it's
> quite easy. All you have to do is to keep track of what was already
> initialized. For example file descriptors needs to be closed only if they
> were
> @@ -381,11 +378,11 @@ requires extra flag to be set after device was
> successfully mounted.
Code is straight-forward, but maybe we should add a sentence or two
to docs to clarify what happens when you call SAFE_MACRO in cleanup:
1) cleanup continues to run and
2) TBROK errors are reported as TWARN
Regards,
Jan
next prev parent reply other threads:[~2017-02-14 13:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 12:26 [LTP] [PATCH 1/4] tst_test.h, test.h: Add mutual exclusion guards Cyril Hrubis
2017-02-14 12:26 ` [LTP] [PATCH 2/4] lib: Redirect to tst_brk_() early Cyril Hrubis
2017-02-14 13:18 ` Jan Stancek
2017-02-14 13:22 ` Cyril Hrubis
2017-02-14 13:36 ` Jan Stancek
2017-02-14 12:26 ` [LTP] [PATCH 3/4] newlib: Allow SAFE_MACROS to be called from cleanup Cyril Hrubis
2017-02-14 13:23 ` Jan Stancek [this message]
2017-02-14 13:23 ` Cyril Hrubis
2017-02-14 13:52 ` Cyril Hrubis
2017-02-14 14:09 ` Jan Stancek
2017-02-14 14:11 ` Cyril Hrubis
2017-02-14 12:26 ` [LTP] [PATCH 4/4] syscalls: Make use of SAFE_MACROS in cleanup Cyril Hrubis
2017-02-14 13:49 ` 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=350522678.4314423.1487078592694.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox