Commit 156c0591 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'linux-kselftest-5.2-rc4' of...

Merge tag 'linux-kselftest-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest

Pull Kselftest fixes from Shuah Khan:

 - fixes to cgroup tests (Alex Shi)

 - fix to userfaultfd compiler warning (Alakesh Haloi)

 - fix to vm install to include test script to run the test (Naresh
   Kamboju)

* tag 'linux-kselftest-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: vm: install test_vmalloc.sh for run_vmtests
  userfaultfd: selftest: fix compiler warning
  kselftest/cgroup: fix incorrect test_core skip
  kselftest/cgroup: fix unexpected testing failure on test_core
  kselftest/cgroup: fix unexpected testing failure on test_memcontrol
parents db309f2a bc2cce3f
...@@ -198,7 +198,7 @@ static int test_cgcore_no_internal_process_constraint_on_threads(const char *roo ...@@ -198,7 +198,7 @@ static int test_cgcore_no_internal_process_constraint_on_threads(const char *roo
char *parent = NULL, *child = NULL; char *parent = NULL, *child = NULL;
if (cg_read_strstr(root, "cgroup.controllers", "cpu") || if (cg_read_strstr(root, "cgroup.controllers", "cpu") ||
cg_read_strstr(root, "cgroup.subtree_control", "cpu")) { cg_write(root, "cgroup.subtree_control", "+cpu")) {
ret = KSFT_SKIP; ret = KSFT_SKIP;
goto cleanup; goto cleanup;
} }
...@@ -376,6 +376,11 @@ int main(int argc, char *argv[]) ...@@ -376,6 +376,11 @@ int main(int argc, char *argv[])
if (cg_find_unified_root(root, sizeof(root))) if (cg_find_unified_root(root, sizeof(root)))
ksft_exit_skip("cgroup v2 isn't mounted\n"); ksft_exit_skip("cgroup v2 isn't mounted\n");
if (cg_read_strstr(root, "cgroup.subtree_control", "memory"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))
ksft_exit_skip("Failed to set memory controller\n");
for (i = 0; i < ARRAY_SIZE(tests); i++) { for (i = 0; i < ARRAY_SIZE(tests); i++) {
switch (tests[i].fn(root)) { switch (tests[i].fn(root)) {
case KSFT_PASS: case KSFT_PASS:
......
...@@ -1205,6 +1205,10 @@ int main(int argc, char **argv) ...@@ -1205,6 +1205,10 @@ int main(int argc, char **argv)
if (cg_read_strstr(root, "cgroup.controllers", "memory")) if (cg_read_strstr(root, "cgroup.controllers", "memory"))
ksft_exit_skip("memory controller isn't available\n"); ksft_exit_skip("memory controller isn't available\n");
if (cg_read_strstr(root, "cgroup.subtree_control", "memory"))
if (cg_write(root, "cgroup.subtree_control", "+memory"))
ksft_exit_skip("Failed to set memory controller\n");
for (i = 0; i < ARRAY_SIZE(tests); i++) { for (i = 0; i < ARRAY_SIZE(tests); i++) {
switch (tests[i].fn(root)) { switch (tests[i].fn(root)) {
case KSFT_PASS: case KSFT_PASS:
......
...@@ -25,6 +25,8 @@ TEST_GEN_FILES += virtual_address_range ...@@ -25,6 +25,8 @@ TEST_GEN_FILES += virtual_address_range
TEST_PROGS := run_vmtests TEST_PROGS := run_vmtests
TEST_FILES := test_vmalloc.sh
KSFT_KHDR_INSTALL := 1 KSFT_KHDR_INSTALL := 1
include ../lib.mk include ../lib.mk
......
...@@ -123,7 +123,7 @@ static void usage(void) ...@@ -123,7 +123,7 @@ static void usage(void)
fprintf(stderr, "Supported <test type>: anon, hugetlb, " fprintf(stderr, "Supported <test type>: anon, hugetlb, "
"hugetlb_shared, shmem\n\n"); "hugetlb_shared, shmem\n\n");
fprintf(stderr, "Examples:\n\n"); fprintf(stderr, "Examples:\n\n");
fprintf(stderr, examples); fprintf(stderr, "%s", examples);
exit(1); exit(1);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment