[LTP] [PATCH 3/4] newlib: Allow SAFE_MACROS to be called from cleanup
Jan Stancek
jstancek@redhat.com
Tue Feb 14 14:23:12 CET 2017
----- 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
More information about the ltp
mailing list