Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+13 -2
+6 -1
tools/testing/selftests/cgroup/test_core.c
··· 198 198 char *parent = NULL, *child = NULL; 199 199 200 200 if (cg_read_strstr(root, "cgroup.controllers", "cpu") || 201 - cg_read_strstr(root, "cgroup.subtree_control", "cpu")) { 201 + cg_write(root, "cgroup.subtree_control", "+cpu")) { 202 202 ret = KSFT_SKIP; 203 203 goto cleanup; 204 204 } ··· 376 376 377 377 if (cg_find_unified_root(root, sizeof(root))) 378 378 ksft_exit_skip("cgroup v2 isn't mounted\n"); 379 + 380 + if (cg_read_strstr(root, "cgroup.subtree_control", "memory")) 381 + if (cg_write(root, "cgroup.subtree_control", "+memory")) 382 + ksft_exit_skip("Failed to set memory controller\n"); 383 + 379 384 for (i = 0; i < ARRAY_SIZE(tests); i++) { 380 385 switch (tests[i].fn(root)) { 381 386 case KSFT_PASS:
+4
tools/testing/selftests/cgroup/test_memcontrol.c
··· 1205 1205 if (cg_read_strstr(root, "cgroup.controllers", "memory")) 1206 1206 ksft_exit_skip("memory controller isn't available\n"); 1207 1207 1208 + if (cg_read_strstr(root, "cgroup.subtree_control", "memory")) 1209 + if (cg_write(root, "cgroup.subtree_control", "+memory")) 1210 + ksft_exit_skip("Failed to set memory controller\n"); 1211 + 1208 1212 for (i = 0; i < ARRAY_SIZE(tests); i++) { 1209 1213 switch (tests[i].fn(root)) { 1210 1214 case KSFT_PASS:
+2
tools/testing/selftests/vm/Makefile
··· 25 25 26 26 TEST_PROGS := run_vmtests 27 27 28 + TEST_FILES := test_vmalloc.sh 29 + 28 30 KSFT_KHDR_INSTALL := 1 29 31 include ../lib.mk 30 32
+1 -1
tools/testing/selftests/vm/userfaultfd.c
··· 123 123 fprintf(stderr, "Supported <test type>: anon, hugetlb, " 124 124 "hugetlb_shared, shmem\n\n"); 125 125 fprintf(stderr, "Examples:\n\n"); 126 - fprintf(stderr, examples); 126 + fprintf(stderr, "%s", examples); 127 127 exit(1); 128 128 } 129 129