All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 5/5] mallopt: Test only on glibc
Date: Mon, 18 Mar 2019 04:23:30 +0100	[thread overview]
Message-ID: <20190318032330.3346-6-petr.vorel@gmail.com> (raw)
In-Reply-To: <20190318032330.3346-1-petr.vorel@gmail.com>

Test works with is glibc specific definitions M_MXFAST , M_NLBLKS, which
aren't supported on other libc (uClibc, MUSL, Bionic), probably no other
libc will ever define.
uClibc also defines them in headers, that's we explicitly check glibc.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
Hi,

maybe #ifdef M_MXFAST && !defined(UCLINUX) would be better.

Kind regards,
Petr
---
 testcases/kernel/syscalls/mallopt/mallopt01.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testcases/kernel/syscalls/mallopt/mallopt01.c b/testcases/kernel/syscalls/mallopt/mallopt01.c
index 416fc48be..14e26dd81 100644
--- a/testcases/kernel/syscalls/mallopt/mallopt01.c
+++ b/testcases/kernel/syscalls/mallopt/mallopt01.c
@@ -63,7 +63,7 @@ extern int tst_COUNT;		/* Test Case counter for tst_routines */
 
 void printinfo();
 
-#if !defined(UCLINUX)
+#if defined(__GLIBC__)
 struct mallinfo info;
 
 int main(int argc, char *argv[])
@@ -150,6 +150,6 @@ void printinfo(void)
 #else
 int main(void)
 {
-	tst_brkm(TCONF, NULL, "test is not available on uClinux");
+	tst_brkm(TCONF, NULL, "mallopt defined only for glibc");
 }
-#endif /* if !defined(UCLINUX) */
+#endif
-- 
2.20.1


  parent reply	other threads:[~2019-03-18  3:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18  3:23 [LTP] [PATCH 0/5] Some MUSL fixes Petr Vorel
2019-03-18  3:23 ` [LTP] [PATCH 1/5] rt_sigaction.h: Check for type sighandler_t and use if present Petr Vorel
2019-03-18 15:40   ` Cyril Hrubis
2019-03-18 18:43     ` Petr Vorel
2019-03-18  3:23 ` [LTP] [PATCH 2/5] {rt_, }sigaction: Define _GNU_SOURCE to get SA_NOMASK on MUSL Petr Vorel
2019-03-18 15:41   ` Cyril Hrubis
2019-03-18  3:23 ` [LTP] [PATCH 3/5] ptrace: Use int instead of enum __ptrace_request Petr Vorel
2019-03-18 15:50   ` Cyril Hrubis
2019-03-18  3:23 ` [LTP] [PATCH 4/5] mremap: Define _GNU_SOURCE to get MREMAP_MAYMOVE on MUSL Petr Vorel
2019-03-18 15:51   ` Cyril Hrubis
2019-03-18  3:23 ` Petr Vorel [this message]
2019-03-18 15:59   ` [LTP] [PATCH 5/5] mallopt: Test only on glibc Cyril Hrubis

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=20190318032330.3346-6-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.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.