[LTP] [PATCH 2/6] mm: mallocstress: use safe macros wherever possible

Jan Stancek jstancek@redhat.com
Fri Nov 10 10:41:19 CET 2017



----- Original Message -----
> The test is currently doesn't use the test library at all and instead
> is a standlone program. While the conversion is being done, there is no
> reason why the program can't use SAFE_ macros. Make necessary changes
> to the program for the same, reducing the error check paths a lot.
> 
> Signed-off-by: Sandeep Patil <sspatil@google.com>
> ---
>  testcases/kernel/mem/mtest07/mallocstress.c | 75
>  ++++++++++++++---------------
>  1 file changed, 35 insertions(+), 40 deletions(-)
> 
> diff --git a/testcases/kernel/mem/mtest07/mallocstress.c
> b/testcases/kernel/mem/mtest07/mallocstress.c
> index 9588fb495..78d8ace8a 100644
> --- a/testcases/kernel/mem/mtest07/mallocstress.c
> +++ b/testcases/kernel/mem/mtest07/mallocstress.c
> @@ -73,6 +73,10 @@
>  #include <sys/ipc.h>
>  #include <sys/sem.h>
>  
> +#include "test.h"
> +#include "safe_macros.h"
> +#include "tst_safe_pthread.h"

This doesn't look entirely OK, because it's mixing oldlib and newlib.
Some SAFE macros won't end up calling cleanup().

Would you care to create patch that converts it all to newlib?
Using checkpoints is of course OK and preferred.

Regards,
Jan


More information about the ltp mailing list