From: Colin Ian King <colin.king(a)canonical.com>
There a are several spelling mistakes in various messages. Fix these.
There are three spelling mistakes in various messages. Fix these.
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
tools/testing/selftests/vm/khugepaged.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/vm/khugepaged.c b/tools/testing/selftests/vm/khugepaged.c
index 490055290d7f..399a67d54e52 100644
--- a/tools/testing/selftests/vm/khugepaged.c
+++ b/tools/testing/selftests/vm/khugepaged.c
@@ -537,7 +537,7 @@ static void collapse_max_ptes_none(void)
p = alloc_mapping();
fill_memory(p, 0, (hpage_pmd_nr - max_ptes_none - 1) * page_size);
- if (wait_for_scan("Do not collapse with max_ptes_none exeeded", p))
+ if (wait_for_scan("Do not collapse with max_ptes_none exceeded", p))
fail("Timeout");
else if (check_huge(p))
fail("Fail");
@@ -576,7 +576,7 @@ static void collapse_swapin_single_pte(void)
goto out;
}
- if (wait_for_scan("Collapse with swaping in single PTE entry", p))
+ if (wait_for_scan("Collapse with swapping in single PTE entry", p))
fail("Timeout");
else if (check_huge(p))
success("OK");
@@ -607,7 +607,7 @@ static void collapse_max_ptes_swap(void)
goto out;
}
- if (wait_for_scan("Do not collapse with max_ptes_swap exeeded", p))
+ if (wait_for_scan("Do not collapse with max_ptes_swap exceeded", p))
fail("Timeout");
else if (check_huge(p))
fail("Fail");
@@ -654,14 +654,14 @@ static void collapse_single_pte_entry_compound(void)
fail("Fail");
madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE);
- printf("Split huge page leaving single PTE mapping compount page...");
+ printf("Split huge page leaving single PTE mapping compound page...");
madvise(p + page_size, hpage_pmd_size - page_size, MADV_DONTNEED);
if (!check_huge(p))
success("OK");
else
fail("Fail");
- if (wait_for_scan("Collapse PTE table with single PTE mapping compount page", p))
+ if (wait_for_scan("Collapse PTE table with single PTE mapping compound page", p))
fail("Timeout");
else if (check_huge(p))
success("OK");
@@ -685,7 +685,7 @@ static void collapse_full_of_compound(void)
else
fail("Fail");
- printf("Split huge page leaving single PTE page table full of compount pages...");
+ printf("Split huge page leaving single PTE page table full of compound pages...");
madvise(p, page_size, MADV_NOHUGEPAGE);
madvise(p, hpage_pmd_size, MADV_NOHUGEPAGE);
if (!check_huge(p))
@@ -908,7 +908,7 @@ static void collapse_max_ptes_shared()
else
fail("Fail");
- if (wait_for_scan("Do not collapse with max_ptes_shared exeeded", p))
+ if (wait_for_scan("Do not collapse with max_ptes_shared exceeded", p))
fail("Timeout");
else if (!check_huge(p))
success("OK");
--
2.25.1
This series adds basic self tests for HMM and are intended for Jason
Gunthorpe's rdma tree since I believe he is planning to make some HMM
related changes that this can help test.
Changes v8 -> v9:
Rebased to linux-5.7.0-rc1.
Moved include/uapi/linux/test_hmm.h to lib/test_hmm_uapi.h
Added calls to release_mem_region() to free device private addresses
Applied Jason's suggested changes for v8.
Added a check for no VMA read access before migrating to device private
memory.
Changes v7 -> v8:
Rebased to Jason's rdma/hmm tree, plus Jason's 6 patch series
"Small hmm_range_fault() cleanups".
Applied a number of changes from Jason's comments.
Changes v6 -> v7:
Rebased to linux-5.6.0-rc6
Reverted back to just using mmu_interval_notifier_insert() and making
this series only introduce HMM self tests.
Changes v5 -> v6:
Rebased to linux-5.5.0-rc6
Refactored mmu interval notifier patches
Converted nouveau to use the new mmu interval notifier API
Changes v4 -> v5:
Added mmu interval notifier insert/remove/update callable from the
invalidate() callback
Updated HMM tests to use the new core interval notifier API
Changes v1 -> v4:
https://lore.kernel.org/linux-mm/20191104222141.5173-1-rcampbell@nvidia.com
Ralph Campbell (3):
mm/hmm/test: add selftest driver for HMM
mm/hmm/test: add selftests for HMM
MAINTAINERS: add HMM selftests
MAINTAINERS | 3 +
lib/Kconfig.debug | 13 +
lib/Makefile | 1 +
lib/test_hmm.c | 1175 ++++++++++++++++++++
lib/test_hmm_uapi.h | 59 +
tools/testing/selftests/vm/.gitignore | 1 +
tools/testing/selftests/vm/Makefile | 3 +
tools/testing/selftests/vm/config | 2 +
tools/testing/selftests/vm/hmm-tests.c | 1359 ++++++++++++++++++++++++
tools/testing/selftests/vm/run_vmtests | 16 +
tools/testing/selftests/vm/test_hmm.sh | 97 ++
11 files changed, 2729 insertions(+)
create mode 100644 lib/test_hmm.c
create mode 100644 lib/test_hmm_uapi.h
create mode 100644 tools/testing/selftests/vm/hmm-tests.c
create mode 100755 tools/testing/selftests/vm/test_hmm.sh
--
2.25.2
Hello Brendan Higgins,
The patch 5f3e06208920: "kunit: test: add support for test abort"
from Sep 23, 2019, leads to the following static checker warning:
lib/kunit/try-catch.c:93 kunit_try_catch_run()
misplaced newline? ' # %s: Unknown error: %d
lib/kunit/try-catch.c
58 void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context)
59 {
60 DECLARE_COMPLETION_ONSTACK(try_completion);
61 struct kunit *test = try_catch->test;
62 struct task_struct *task_struct;
63 int exit_code, time_remaining;
64
65 try_catch->context = context;
66 try_catch->try_completion = &try_completion;
67 try_catch->try_result = 0;
68 task_struct = kthread_run(kunit_generic_run_threadfn_adapter,
69 try_catch,
70 "kunit_try_catch_thread");
71 if (IS_ERR(task_struct)) {
72 try_catch->catch(try_catch->context);
73 return;
74 }
75
76 time_remaining = wait_for_completion_timeout(&try_completion,
77 kunit_test_timeout());
78 if (time_remaining == 0) {
79 kunit_err(test, "try timed out\n");
^^
The kunit_log() macro adds its own newline. Most of the callers add
a newline. It should be the callers add a newline because that's how
everything else works in the kernel.
The dev_printk() stuff will sometimes add a newline, but never a
duplicate newline. In other words, it's slightly complicated. But
basically the caller should add a newline.
80 try_catch->try_result = -ETIMEDOUT;
81 }
82
83 exit_code = try_catch->try_result;
84
85 if (!exit_code)
86 return;
87
88 if (exit_code == -EFAULT)
89 try_catch->try_result = 0;
90 else if (exit_code == -EINTR)
91 kunit_err(test, "wake_up_process() was never called\n");
^^
92 else if (exit_code)
93 kunit_err(test, "Unknown error: %d\n", exit_code);
^^
94
95 try_catch->catch(try_catch->context);
96 }
regards,
dan carpenter
> It should set config->test_fs instead of config->test_driver as NULL
> after kfree_const(config->test_fs) to avoid potential double free.
I suggest to improve this change description.
* How do you think about a wording variant like the following?
Reset the member “test_fs” of the test configuration after a call
of the function “kfree_const” to a null pointer so that a double
memory release will not be performed.
* Would you like to add the tag “Fixes”?
Regards,
Markus