History log of /external/ltp/testcases/kernel/mem/thp/thp03.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
5c5e24c654ee40c101105eb0728663ffc2e83941 04-Dec-2017 Will Deacon <will.deacon@arm.com> thp: ensure hugetlbfs is available

The THP tests thp02 and thp03 depend on the presence of hugetlbfs to get
the default hugepage size. If hugetlbfs is not enabled, /proc/meminfo
does not contain "Hugepagesize" and the tests fail with -

safe_file_ops.c:220: BROK: Expected 1 conversions got 0 at thp03.c:85

which is hard to relate to the missing support for hugetlbfs.

Add tests for the presence of hugetlbfs for tests relying on this kernel
feature.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Petr Vorel <pvorel@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
90c3cb50ef4644ad3dc2cae6346cb49f793c618d 18-Jul-2017 Li Wang <liwang@redhat.com> mem/thp: convert to new API

Signed-off-by: Li Wang <liwang@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
b9cf9423c0170e53d43c751806736d3858da2e0e 13-Aug-2015 Li Wang <liwang@redhat.com> mem/thp: skip the case thp0{2,3} if THP is disabled

Sometimes we get fails on system which not support hugepages:

thp02 1 TBROK : mem.c:1035: cannot find "Hugepagesize:" in /proc/meminfo
thp02 2 TBROK : mem.c:1035: Remaining cases broken

thp03 1 TBROK : mem.c:1035: cannot find "Hugepagesize:" in /proc/meminfo
thp03 2 TBROK : mem.c:1035: Remaining cases broken

Skip the testcase cases with TCONF rather than failing with TBROK.

Signed-off-by: Li Wang <liwang@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
d6d11d08678aac1ed2c370ea8e42e5f45aea07be 09-Mar-2015 Cyril Hrubis <chrubis@suse.cz> Introduce tst_parse_opts()

The pattern that was used in all testcases is:

const char *msg;

msg = parse_opts(...);
if (msg)
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);

This change simplifies the steps to just calling:

tst_parse_opts(...);

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
aabb8340f63ed31afe995fd97795e542dc68b93c 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Include usctest.h in test.h

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
605fa3362fd7cef0baa2131be32cf44661783d3e 04-Feb-2015 Cyril Hrubis <chrubis@suse.cz> Get rid of TEST_CLEANUP

Special thanks to Coccinelle for making this easy job.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
0b9589f3f9c0345b29cfcf7da5a1253c708303eb 27-May-2014 Cyril Hrubis <chrubis@suse.cz> testcases: Constify char *msg variable.

The parse_opts() now returns const char * instead of char * this commit
fixes all warnings caused by the change.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
f2ec5c633c1b50e5affa5488148a196358fb1de6 30-Apr-2013 Cyril Hrubis <chrubis@suse.cz> mem/thp03: Return TCONF if KSM is not supported

The madvise() with MADV_MERGEABLE will return EINVAL when kernel is not
compiled with KSM. Make the test return TCONF rather than TBROK in this
case.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/testcases/kernel/mem/thp/thp03.c
d59a659cd639ca2780b00049d102acd2a783d585 07-Mar-2013 Caspar Zhang <caspar@casparzhang.com> s/Tst_count/tst_count/ to avoid CamelCase

when using latest checkpatch.pl, CamelCase variables are not encouraged,
this patch does a batch update to replace all var `Tst_count` with
`tst_count`.

Signed-off-by: Caspar Zhang <caspar@casparzhang.com>
Acked-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/mem/thp/thp03.c
354ebb48db8e66a853a58379a4808d5dcd1ceac3 07-Dec-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> cleanup code indent

Cleanup the code indent using:

find . -name *.c -exec Lindent {} \;

It's really a big change, but can fix almost all of
the indent problem in C code, although we can't
ensure all of the changes are right, but the error
changes are really few.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/mem/thp/thp03.c
aae18dbfbfa0d18af2c7538c26f65431520cdbd7 05-Nov-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> thp03: fix the wrong kernel commit id in comment

The commit id in the comment is wrong in linus' tree.
$ git show 59af0d4348eb07087097e310f60422b994dd3a2c
fatal: bad object 59af0d4348eb07087097e310f60422b994dd3a2c

Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/mem/thp/thp03.c
de5332d428a983e63a8d1f2ddddd5900e2a2d84c 05-Nov-2012 Wanlong Gao <gaowanlong@cn.fujitsu.com> thp03: fix the compile error when MADV_MERGEABLE is not supported

Fix the compile error when MADV_MERGEABLE is not supported,
for example on RHEL5.

Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/mem/thp/thp03.c
e209c6b0cae08255fa28b2c262ccfa3ecc54d9a8 30-Oct-2012 Madper Xie <cxie@redhat.com> thp/thp03: new testcase

Modified form a reproducer for
https://patchwork.kernel.org/patch/1358441/
Commit: 59af0d4348eb07087097e310f60422b994dd3a2c
pmd_present would return the wrong value on PROT_NONE ranges or in case
of a non reproducible race with split_huge_page.

The system will crash when this test failed.

Signed-off-by: Madper Xie <cxie@redhat.com>
Reviewed-by: Caspar Zhang <caspar@casparzhang.com>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
/external/ltp/testcases/kernel/mem/thp/thp03.c