public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/6] mm: mallocstress: use safe macros wherever possible
Date: Fri, 10 Nov 2017 04:41:19 -0500 (EST)	[thread overview]
Message-ID: <1815772652.38721463.1510306879320.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171109003438.130802-3-sspatil@google.com>



----- 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

  reply	other threads:[~2017-11-10  9:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  0:34 [LTP] [PATCH 0/6] Miscellaneous fixes for Android systems Sandeep Patil
2017-11-09  0:34 ` [LTP] [PATCH v2 1/6] syscalls/cma: Make process_vm_{readv, writev} tests bionic friendly Sandeep Patil
2017-11-10  9:14   ` Jan Stancek
2017-11-09  0:34 ` [LTP] [PATCH 2/6] mm: mallocstress: use safe macros wherever possible Sandeep Patil
2017-11-10  9:41   ` Jan Stancek [this message]
2017-11-09  0:34 ` [LTP] [PATCH 3/6] mm: mallocstress: use futexes instead of SysV semaphores Sandeep Patil
2017-11-09  0:34 ` [LTP] [PATCH v2 4/6] direct_io: diotest4: use getpagesize() for mmap if shm header is absent Sandeep Patil
2017-11-10  9:54   ` Jan Stancek
2017-11-09  0:34 ` [LTP] [PATCH 5/6] syscalls/mkdir03: convert to new API and use .needsrofs for EROFS check Sandeep Patil
2017-11-10 11:21   ` Jan Stancek
2017-11-09  0:34 ` [LTP] [PATCH 6/6] lib: mkfs: use 'mke2fs' on android systems for formatting filesystems Sandeep Patil
2017-11-10 14:48   ` Jan Stancek
2017-11-10 19:23     ` Sandeep Patil

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=1815772652.38721463.1510306879320.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