Fix the Kconfig example to be closer to Kconfig coding style.
Also add punctuation and a trailing slash ('/') to a sub-directory
name -- this is how the text mostly appears in other Kconfig files.
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Cc: David Gow <davidgow(a)google.com>
Cc: linux-kselftest(a)vger.kernel.org
Cc: kunit-dev(a)googlegroups.com
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Brendan Higgins <brendanhiggins(a)google.com>
Reviewed-by: David Gow <davidgow(a)google.com>
---
v2: covert spaces indentation to tabs in Kconfig example
Documentation/dev-tools/kunit/style.rst | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- linux-next-20201027.orig/Documentation/dev-tools/kunit/style.rst
+++ linux-next-20201027/Documentation/dev-tools/kunit/style.rst
@@ -175,17 +175,17 @@ An example Kconfig entry:
.. code-block:: none
- config FOO_KUNIT_TEST
- tristate "KUnit test for foo" if !KUNIT_ALL_TESTS
- depends on KUNIT
- default KUNIT_ALL_TESTS
- help
- This builds unit tests for foo.
+ config FOO_KUNIT_TEST
+ tristate "KUnit test for foo" if !KUNIT_ALL_TESTS
+ depends on KUNIT
+ default KUNIT_ALL_TESTS
+ help
+ This builds unit tests for foo.
- For more information on KUnit and unit tests in general, please refer
- to the KUnit documentation in Documentation/dev-tools/kunit
+ For more information on KUnit and unit tests in general, please refer
+ to the KUnit documentation in Documentation/dev-tools/kunit/.
- If unsure, say N
+ If unsure, say N.
Test File and Module Names
Fix minor grammar and punctutation glitches.
Hyphenate "architecture-specific" instances.
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Cc: David Gow <davidgow(a)google.com>
Cc: linux-kselftest(a)vger.kernel.org
Cc: kunit-dev(a)googlegroups.com
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Brendan Higgins <brendanhiggins(a)google.com>
---
Documentation/dev-tools/kunit/usage.rst | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- linux-next-20201027.orig/Documentation/dev-tools/kunit/usage.rst
+++ linux-next-20201027/Documentation/dev-tools/kunit/usage.rst
@@ -92,7 +92,7 @@ behavior of a function called ``add``; t
the second parameter, in this case, is what the value is expected to be; the
last value is what the value actually is. If ``add`` passes all of these
expectations, the test case, ``add_test_basic`` will pass; if any one of these
-expectations fail, the test case will fail.
+expectations fails, the test case will fail.
It is important to understand that a test case *fails* when any expectation is
violated; however, the test will continue running, potentially trying other
@@ -202,7 +202,7 @@ Example:
kunit_test_suite(example_test_suite);
In the above example the test suite, ``example_test_suite``, would run the test
-cases ``example_test_foo``, ``example_test_bar``, and ``example_test_baz``,
+cases ``example_test_foo``, ``example_test_bar``, and ``example_test_baz``;
each would have ``example_test_init`` called immediately before it and would
have ``example_test_exit`` called immediately after it.
``kunit_test_suite(example_test_suite)`` registers the test suite with the
@@ -229,7 +229,7 @@ through some sort of indirection where a
such that the definition of that function can be changed without affecting the
rest of the code base. In the kernel this primarily comes from two constructs,
classes, structs that contain function pointers that are provided by the
-implementer, and architecture specific functions which have definitions selected
+implementer, and architecture-specific functions which have definitions selected
at compile time.
Classes
@@ -459,7 +459,7 @@ KUnit on non-UML architectures
By default KUnit uses UML as a way to provide dependencies for code under test.
Under most circumstances KUnit's usage of UML should be treated as an
implementation detail of how KUnit works under the hood. Nevertheless, there
-are instances where being able to run architecture specific code or test
+are instances where being able to run architecture-specific code or test
against real hardware is desirable. For these reasons KUnit supports running on
other architectures.
@@ -599,7 +599,7 @@ writing normal KUnit tests. One special
hardware state in between test cases; if this is not possible, you may only be
able to run one test case per invocation.
-.. TODO(brendanhiggins(a)google.com): Add an actual example of an architecture
+.. TODO(brendanhiggins(a)google.com): Add an actual example of an architecture-
dependent KUnit test.
KUnit debugfs representation
This series extends the kselftests for the vDSO library making sure: that
they compile correctly on non x86 platforms, that they can be cross
compiled and introducing new tests that verify the correctness of the
library.
The so extended vDSO kselftests have been verified on all the platforms
supported by the unified vDSO library [1].
The only new patch that this series introduces is the first one, patch 2 and
patch 3 have already been reviewed in past as part of other series [2] [3].
[1] https://lore.kernel.org/lkml/20190621095252.32307-1-vincenzo.frascino@arm.c…
[2] https://lore.kernel.org/lkml/20190621095252.32307-26-vincenzo.frascino@arm.…
[3] https://lore.kernel.org/lkml/20190523112116.19233-4-vincenzo.frascino@arm.c…
It is possible to build the series using the command below:
make -C tools/testing/selftests/ ARCH=<arch> TARGETS=vDSO CC=<compiler>
A version of the series rebased on 5.10-rc1 to simplify the testing can be found
at [4].
[4] https://git.gitlab.arm.com/linux-arm/linux-vf.git vdso/v4.tests
Changes:
--------
v4:
- Rebased on 5.10-rc1.
v3:
- Added correctness test for clock_gettime64.
- Rebased on 5.7-rc4.
v2:
- Addressed review comments from Andy.
- Rebased on 5.7-rc3.
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Thomas Gleixner <tglx(a)linutronix.de>
Cc: Andy Lutomirski <luto(a)kernel.org>
Cc: Arnd Bergmann <arnd(a)arndb.de>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino(a)arm.com>
Vincenzo Frascino (5):
kselftest: Enable vDSO test on non x86 platforms
kselftest: Extend vDSO selftest
kselftest: Extend vDSO selftest to clock_getres
kselftest: Move test_vdso to the vDSO test suite
kselftest: Extend vdso correctness test to clock_gettime64
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/vDSO/Makefile | 16 +-
tools/testing/selftests/vDSO/vdso_config.h | 92 +++++++
tools/testing/selftests/vDSO/vdso_test_abi.c | 244 ++++++++++++++++++
.../selftests/vDSO/vdso_test_clock_getres.c | 124 +++++++++
.../vdso_test_correctness.c} | 115 ++++++++-
tools/testing/selftests/x86/Makefile | 2 +-
7 files changed, 586 insertions(+), 8 deletions(-)
create mode 100644 tools/testing/selftests/vDSO/vdso_config.h
create mode 100644 tools/testing/selftests/vDSO/vdso_test_abi.c
create mode 100644 tools/testing/selftests/vDSO/vdso_test_clock_getres.c
rename tools/testing/selftests/{x86/test_vdso.c => vDSO/vdso_test_correctness.c} (73%)
--
2.28.0
This series contains a set of fixes for the arm64 MTE kselftests [1].
A version of the fixes rebased on 5.10-rc1 can be found at [2].
To verify the fixes it is possible to use the command below:
make -C tools/testing/selftests/ ARCH=arm64 TARGETS=arm64 ARM64_SUBTARGETS=mte \
CC=<gcc compiler with MTE support>
[1] https://lore.kernel.org/lkml/20201002115630.24683-1-amit.kachhap@arm.com
[2] https://git.gitlab.arm.com/linux-arm/linux-vf.git mte/v5.fixes
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Catalin Marinas <catalin.marinas(a)arm.com>
Cc: Will Deacon <will(a)kernel.org>
Cc: Gabor Kertesz <gabor.kertesz(a)arm.com>
Cc: Amit Daniel Kachhap <amit.kachhap(a)arm.com>
Signed-off-by: Vincenzo Frascino <vincenzo.frascino(a)arm.com>
Vincenzo Frascino (6):
kselftest/arm64: Fix check_buffer_fill test
kselftest/arm64: Fix check_tags_inclusion test
kselftest/arm64: Fix check_child_memory test
kselftest/arm64: Fix check_mmap_options test
kselftest/arm64: Fix check_ksm_options test
kselftest/arm64: Fix check_user_mem test
tools/testing/selftests/arm64/mte/check_buffer_fill.c | 3 +++
tools/testing/selftests/arm64/mte/check_child_memory.c | 3 +++
tools/testing/selftests/arm64/mte/check_ksm_options.c | 4 ++++
tools/testing/selftests/arm64/mte/check_mmap_options.c | 4 ++++
tools/testing/selftests/arm64/mte/check_tags_inclusion.c | 3 +++
tools/testing/selftests/arm64/mte/check_user_mem.c | 4 ++++
6 files changed, 21 insertions(+)
--
2.28.0
Fix the Kconfig example to be closer to Kconfig coding style.
(Except that it still uses spaces instead of tabs for indentation;
I guess that Sphinx wants it that way.)
Also add punctuation and a trailing slash ('/') to a sub-directory
name -- this is how the text mostly appears in other Kconfig files.
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Cc: David Gow <davidgow(a)google.com>
Cc: linux-kselftest(a)vger.kernel.org
Cc: kunit-dev(a)googlegroups.com
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Brendan Higgins <brendanhiggins(a)google.com>
---
Documentation/dev-tools/kunit/style.rst | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- linux-next-20201027.orig/Documentation/dev-tools/kunit/style.rst
+++ linux-next-20201027/Documentation/dev-tools/kunit/style.rst
@@ -180,12 +180,12 @@ An example Kconfig entry:
depends on KUNIT
default KUNIT_ALL_TESTS
help
- This builds unit tests for foo.
+ This builds unit tests for foo.
- For more information on KUnit and unit tests in general, please refer
- to the KUnit documentation in Documentation/dev-tools/kunit
+ For more information on KUnit and unit tests in general, please refer
+ to the KUnit documentation in Documentation/dev-tools/kunit/.
- If unsure, say N
+ If unsure, say N.
Test File and Module Names
Fix a wording typo (keyboard glitch).
Signed-off-by: Randy Dunlap <rdunlap(a)infradead.org>
Cc: David Gow <davidgow(a)google.com>
Cc: linux-kselftest(a)vger.kernel.org
Cc: kunit-dev(a)googlegroups.com
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: Shuah Khan <skhan(a)linuxfoundation.org>
Cc: Brendan Higgins <brendanhiggins(a)google.com>
---
Documentation/dev-tools/kunit/faq.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-next-20201027.orig/Documentation/dev-tools/kunit/faq.rst
+++ linux-next-20201027/Documentation/dev-tools/kunit/faq.rst
@@ -90,7 +90,7 @@ things to try.
re-run kunit_tool.
5. Try to run ``make ARCH=um defconfig`` before running ``kunit.py run``. This
may help clean up any residual config items which could be causing problems.
-6. Finally, try running KUnit outside UML. KUnit and KUnit tests can run be
+6. Finally, try running KUnit outside UML. KUnit and KUnit tests can be
built into any kernel, or can be built as a module and loaded at runtime.
Doing so should allow you to determine if UML is causing the issue you're
seeing. When tests are built-in, they will execute when the kernel boots, and