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
This patch set has several miscellaneous fixes to resctrl selftest tool
that are easily visible to user. V1 had fixes to CAT test and CMT test
but they were dropped in V2 because having them here made the patchset
humongous. So, changes to CAT test and CMT test will be posted in another
patchset.
Change Log:
v3:
Address various comments (commit messages, return value on test failure,
print failure info on test failure etc) from Reinette and Tony.
[v2: https://lore.kernel.org/linux-kselftest/cover.1589835155.git.sai.praneeth.p…]
v2:
1. Dropped changes to CAT test and CMT test as they will be posted in a later
series.
2. Added several other fixes
[v1: https://lore.kernel.org/linux-kselftest/cover.1583657204.git.sai.praneeth.p…]
Fenghua Yu (18):
selftests/resctrl: Rename CQM test as CMT test
selftests/resctrl: Declare global variables as extern
selftests/resctrl: Return if resctrl file system is not supported
selftests/resctrl: Check for resctrl mount point only if resctrl FS is
supported
selftests/resctrl: Use resctrl/info for feature detection
selftests/resctrl: Fix missing options "-n" and "-p"
selftests/resctrl: Fix MBA/MBM results reporting format
selftests/resctrl: Abort running tests if not root user
selftests/resctrl: Enable gcc checks to detect buffer overflows
selftests/resctrl: Don't hard code value of "no_of_bits" variable
selftests/resctrl: Modularize resctrl test suite main() function
selftests/resctrl: Skip the test if requested resctrl feature is not
supported
selftests/resctrl: Umount resctrl FS only if mounted
selftests/resctrl: Unmount resctrl FS after running all tests
selftests/resctrl: Fix incorrect parsing of iMC counters
selftests/resctrl: Fix checking for < 0 for unsigned values
selftests/resctrl: Fix unnecessary usage of global variables
selftests/resctrl: Don't use global variable for capacity bitmask
(CBM)
Reinette Chatre (3):
selftests/resctrl: Fix typo
selftests/resctrl: Fix typo in help text
selftests/resctrl: Ensure sibling CPU is not same as original CPU
tools/testing/selftests/resctrl/Makefile | 2 +-
tools/testing/selftests/resctrl/README | 4 +-
tools/testing/selftests/resctrl/cache.c | 4 +-
tools/testing/selftests/resctrl/cat_test.c | 20 +--
.../resctrl/{cqm_test.c => cmt_test.c} | 34 ++--
tools/testing/selftests/resctrl/mba_test.c | 23 ++-
tools/testing/selftests/resctrl/mbm_test.c | 16 +-
tools/testing/selftests/resctrl/resctrl.h | 20 ++-
.../testing/selftests/resctrl/resctrl_tests.c | 156 ++++++++++++------
tools/testing/selftests/resctrl/resctrl_val.c | 75 ++++++---
tools/testing/selftests/resctrl/resctrlfs.c | 79 ++++++---
11 files changed, 272 insertions(+), 161 deletions(-)
rename tools/testing/selftests/resctrl/{cqm_test.c => cmt_test.c} (85%)
--
2.29.0
This was an oversight in the original implementation, as it makes no
sense to specify both scoping flags to the same openat2(2) invocation
(before this patch, the result of such an invocation was equivalent to
RESOLVE_IN_ROOT being ignored).
This is a userspace-visible ABI change, but the only user of openat2(2)
at the moment is LXC which doesn't specify both flags and so no
userspace programs will break as a result.
Cc: <stable(a)vger.kernel.org> # v5.6+
Fixes: fddb5d430ad9 ("open: introduce openat2(2) syscall")
Acked-by: Christian Brauner <christian.brauner(a)ubuntu.com>
Signed-off-by: Aleksa Sarai <cyphar(a)cyphar.com>
---
fs/open.c | 4 ++++
tools/testing/selftests/openat2/openat2_test.c | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/fs/open.c b/fs/open.c
index 9af548fb841b..4d7537ae59df 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -1010,6 +1010,10 @@ inline int build_open_flags(const struct open_how *how, struct open_flags *op)
if (how->resolve & ~VALID_RESOLVE_FLAGS)
return -EINVAL;
+ /* Scoping flags are mutually exclusive. */
+ if ((how->resolve & RESOLVE_BENEATH) && (how->resolve & RESOLVE_IN_ROOT))
+ return -EINVAL;
+
/* Deal with the mode. */
if (WILL_CREATE(flags)) {
if (how->mode & ~S_IALLUGO)
diff --git a/tools/testing/selftests/openat2/openat2_test.c b/tools/testing/selftests/openat2/openat2_test.c
index b386367c606b..381d874cce99 100644
--- a/tools/testing/selftests/openat2/openat2_test.c
+++ b/tools/testing/selftests/openat2/openat2_test.c
@@ -155,7 +155,7 @@ struct flag_test {
int err;
};
-#define NUM_OPENAT2_FLAG_TESTS 23
+#define NUM_OPENAT2_FLAG_TESTS 24
void test_openat2_flags(void)
{
@@ -210,6 +210,12 @@ void test_openat2_flags(void)
.how.flags = O_TMPFILE | O_RDWR,
.how.mode = 0x0000A00000000000ULL, .err = -EINVAL },
+ /* ->resolve flags must not conflict. */
+ { .name = "incompatible resolve flags (BENEATH | IN_ROOT)",
+ .how.flags = O_RDONLY,
+ .how.resolve = RESOLVE_BENEATH | RESOLVE_IN_ROOT,
+ .err = -EINVAL },
+
/* ->resolve must only contain RESOLVE_* flags. */
{ .name = "invalid how.resolve and O_RDONLY",
.how.flags = O_RDONLY,
--
2.28.0