From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 02/13] thp: ensure THP/hugetlbfs is available
Date: Wed, 29 Nov 2017 13:44:11 +0100 [thread overview]
Message-ID: <20171129124411.GB18489@rei> (raw)
In-Reply-To: <878ter3bfn.fsf@e105922-lin.cambridge.arm.com>
Hi!
> > I do not get what is the problem with this test on a machine without
> > hugepages or transparent hugepages. The test just tries to execute true
> > with excessively large array of command line arguments, if that fails
> > without hugepages it's a kernel bug.
>
> The test passes even if THP is not enabled on the test kernel. This
> gives the false impression that THP is working as expected.
>
> The explicit check is making sure the functionality under test is is
> enabled in the test kernel.
I see where that came from, but I do not think that the test name is a
reason to disable this stress test. However I'm not sure if there is a
better name for the test. I guess that we may possibly move it to the
cve directory.
> >> diff --git a/testcases/kernel/mem/thp/thp02.c b/testcases/kernel/mem/thp/thp02.c
> >> index acc70e215..6502210e5 100644
> >> --- a/testcases/kernel/mem/thp/thp02.c
> >> +++ b/testcases/kernel/mem/thp/thp02.c
> >> @@ -90,6 +90,8 @@ static void setup(void)
> >> if (access(PATH_THP, F_OK) == -1)
> >> tst_brk(TCONF, "THP not enabled in kernel?");
> >>
> >> + check_hugepage();
> >> +
> >> ps = sysconf(_SC_PAGESIZE);
> >> hps = SAFE_READ_MEMINFO("Hugepagesize:") * 1024;
> >> size = hps * 4;
> >> diff --git a/testcases/kernel/mem/thp/thp03.c b/testcases/kernel/mem/thp/thp03.c
> >> index 19db44944..c6062505f 100644
> >> --- a/testcases/kernel/mem/thp/thp03.c
> >> +++ b/testcases/kernel/mem/thp/thp03.c
> >> @@ -82,6 +82,8 @@ static void setup(void)
> >> if (access(PATH_THP, F_OK) == -1)
> >> tst_brk(TCONF, "THP not enabled in kernel?");
> >>
> >> + check_hugepage();
> >> +
> >> hugepage_size = SAFE_READ_MEMINFO("Hugepagesize:") * KB;
> >> unaligned_size = hugepage_size * 4 - 1;
> >> page_size = SAFE_SYSCONF(_SC_PAGESIZE);
> >
> > Does this two fail on an attempt to find "Hugepagesize:" in meminfo
> > file? Otherwise I do not see how they can fail.
>
> Yes, "Hugepagesize:" goes missing in /proc/meminfo. When the kernel
> doesn't have hugepage support enabled, the tests fail with message like
> -
>
> safe_file_ops.c:220: BROK: Expected 1 conversions got 0 at thp03.c:85
>
> With the patch, the message helps identify the cause of the failure.
That's fine. Can you plese include this description in the commit
message as well?
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2017-11-29 12:44 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 15:59 [LTP] [PATCH v2 00/13] Collection of fixes Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 01/13] Move check_hugepage() helper to mem/lib Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 02/13] thp: ensure THP/hugetlbfs is available Punit Agrawal
2017-11-27 16:20 ` Cyril Hrubis
2017-11-27 16:59 ` Punit Agrawal
2017-11-29 12:44 ` Cyril Hrubis [this message]
2017-11-29 13:29 ` Punit Agrawal
2017-11-29 14:34 ` Cyril Hrubis
2017-11-14 15:59 ` [LTP] [PATCH v2 03/13] hugeshmctl01: Convert to LTP synchronisation primitives Punit Agrawal
2017-11-27 16:52 ` Cyril Hrubis
2017-11-27 17:34 ` Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 04/13] hugeshmctl01: Fix warning about signed/unsigned comparison Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 05/13] hugeshmctl02: Fix allocation size for odd number of hugepages Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 06/13] hugeshmget02: add missing SHM_HUGETLB flag on segment creation Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 07/13] sigwaitinfo01: fix race between sending and dequeueing RT signals Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 08/13] sigwaitinfo01: catch SEGV and report success for bad_address2 testcase Punit Agrawal
2017-11-29 10:29 ` Cyril Hrubis
2017-11-29 13:25 ` Punit Agrawal
2017-11-29 15:33 ` Cyril Hrubis
2017-11-14 15:59 ` [LTP] [PATCH v2 09/13] syscalls/mount03: Copy setuid_test to execute instead of 'TEST FILE' Punit Agrawal
2017-11-29 13:20 ` Cyril Hrubis
2017-11-29 16:50 ` Punit Agrawal
2017-11-30 12:21 ` Cyril Hrubis
2017-11-30 12:56 ` Punit Agrawal
2017-11-30 13:17 ` Cyril Hrubis
2017-11-30 15:56 ` Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 10/13] getdtablesize01: Handle ENFILE errno Punit Agrawal
2017-11-30 13:12 ` Cyril Hrubis
2017-11-30 16:06 ` Punit Agrawal
2017-11-30 16:20 ` Cyril Hrubis
2017-11-30 16:41 ` Suzuki K Poulose
2017-12-01 13:38 ` Cyril Hrubis
2017-12-01 15:30 ` Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 11/13] perf_event_open: Handle absence of PMU gracefully Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 12/13] hotplug/cpu_hotplug: Repopulate cgroup:cpusets after testing hotplug Punit Agrawal
2017-11-30 13:58 ` Cyril Hrubis
2017-12-01 16:00 ` Punit Agrawal
2017-11-14 15:59 ` [LTP] [PATCH v2 13/13] hotplug/cpu_hotplug: Remove bashism disown from kill_pid() Punit Agrawal
2017-11-21 16:15 ` [LTP] [PATCH v2 00/13] Collection of fixes Punit Agrawal
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=20171129124411.GB18489@rei \
--to=chrubis@suse.cz \
--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