Fix warnings at 'make htmldocs', and formatting issues in the resulting
documentation.
- test.h: Fix some typos in kernel-doc parameter description.
- Documentation/*.rst: Fixing formatting issues, and a duplicate label
issue, since using sphinx.ext.autosectionlabel in conf.py, referes to
headers are generated automatically and sphinx will not complain about
identical headers among documents anymore.
The downside is, automatically generated header labels within one
document now cannot be overwritten manually anymore. Thus duplicate
headers within one document have to have different wording, i.e. this
patch modifies some headers.
- Documentation/api/*: Flipping over to a page "API" containing a single
link to another page "API" seems like a formatting issue. The patch
removes one level of indirection.
v2: Several documentation fixes
v3: Do not touch API documentation index
Signed-off-by: Lothar Rubusch <l.rubusch(a)gmail.com>
---
Documentation/dev-tools/kunit/start.rst | 13 ++++++++-----
Documentation/dev-tools/kunit/usage.rst | 4 ++--
include/kunit/test.h | 7 ++++---
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index e1c5ce80ce12..bb112cf70624 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -32,15 +32,17 @@ test targets as well. The ``.kunitconfig`` should also contain any other config
options required by the tests.
A good starting point for a ``.kunitconfig`` is the KUnit defconfig:
+
.. code-block:: bash
cd $PATH_TO_LINUX_REPO
cp arch/um/configs/kunit_defconfig .kunitconfig
You can then add any other Kconfig options you wish, e.g.:
+
.. code-block:: none
- CONFIG_LIST_KUNIT_TEST=y
+ CONFIG_LIST_KUNIT_TEST=y
:doc:`kunit_tool <kunit-tool>` will ensure that all config options set in
``.kunitconfig`` are set in the kernel ``.config`` before running the tests.
@@ -54,8 +56,8 @@ using.
other tools (such as make menuconfig) to adjust other config options.
-Running the tests
------------------
+Running the tests (KUnit Wrapper)
+---------------------------------
To make sure that everything is set up correctly, simply invoke the Python
wrapper from your kernel repo:
@@ -105,8 +107,9 @@ have config options ending in ``_KUNIT_TEST``.
KUnit and KUnit tests can be compiled as modules: in this case the tests in a
module will be run when the module is loaded.
-Running the tests
------------------
+
+Running the tests (w/o KUnit Wrapper)
+-------------------------------------
Build and run your kernel as usual. Test output will be written to the kernel
log in `TAP <https://testanything.org/>`_ format.
diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 473a2361ec37..3c3fe8b5fecc 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -595,7 +595,7 @@ able to run one test case per invocation.
KUnit debugfs representation
============================
When kunit test suites are initialized, they create an associated directory
-in /sys/kernel/debug/kunit/<test-suite>. The directory contains one file
+in ``/sys/kernel/debug/kunit/<test-suite>``. The directory contains one file
- results: "cat results" displays results of each test case and the results
of the entire suite for the last test run.
@@ -604,4 +604,4 @@ The debugfs representation is primarily of use when kunit test suites are
run in a native environment, either as modules or builtin. Having a way
to display results like this is valuable as otherwise results can be
intermixed with other events in dmesg output. The maximum size of each
-results file is KUNIT_LOG_SIZE bytes (defined in include/kunit/test.h).
+results file is KUNIT_LOG_SIZE bytes (defined in ``include/kunit/test.h``).
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 9b0c46a6ca1f..b8a8434443b0 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -175,7 +175,7 @@ struct kunit_suite {
void (*exit)(struct kunit *test);
struct kunit_case *test_cases;
- /* private - internal use only */
+ /* private: internal use only */
struct dentry *debugfs;
char *log;
};
@@ -232,12 +232,13 @@ void __kunit_test_suites_exit(struct kunit_suite **suites);
* kunit_test_suites() - used to register one or more &struct kunit_suite
* with KUnit.
*
- * @suites: a statically allocated list of &struct kunit_suite.
+ * @...: a statically allocated list of &struct kunit_suite, assigned
+ * to the pointer @suites.
*
* Registers @suites with the test framework. See &struct kunit_suite for
* more information.
*
- * When builtin, KUnit tests are all run as late_initcalls; this means
+ * When builtin, KUnit tests are all run as late_initcalls; this means
* that they cannot test anything where tests must run at a different init
* phase. One significant restriction resulting from this is that KUnit
* cannot reliably test anything that is initialize in the late_init phase;
--
2.20.1
+Sai
On 4/13/2020 2:43 AM, David Binderman wrote:
> Hello there,
>
> Source code is
>
> while (fgets(temp, 1024, fp)) {
>
> but
>
> char *token_array[8], temp[512];
>
> Use of compiler flag -D_FORTIFY_SOURCE=2 would have found the problem.
> For example:
>
> # include <stdio.h>
>
> extern void g( int);
>
> void
> f( FILE * fp)
> {
> char buf[ 100];
>
> while (fgets( buf, 200, fp) != 0)
> {
> g( 1);
> }
> }
>
> gives
>
> $ /home/dcb/gcc/results/bin/gcc -c -g -O2 -D_FORTIFY_SOURCE=2 apr13c.cc
> In file included from /usr/include/stdio.h:867,
> from apr13c.cc:2:
> In function ‘char* fgets(char*, int, FILE*)’,
> inlined from ‘void f(FILE*)’ at apr13c.cc:11:14:
> /usr/include/bits/stdio2.h:263:26: warning: call to ‘__fgets_chk_warn’ declared with attribute warning: fgets called with bigger size than length of destination buffer [-Wattribute-warning]
>
> I suggest switch on compiler flag -D_FORTIFY_SOURCE=2 in
> all development builds.
>
Thank you very much for catching this David.
Sai: could you include this fix in your upcoming series of fixes? Using
the pattern of "fgets(buf, sizeof(buf), ...)" instead of hard coding the
size should be helpful here.
Reinette
While running seccomp_bpf, kill_after_ptrace() gets stuck if we run it
via /usr/bin/timeout (that is the default), until the timeout expires.
This is because /usr/bin/timeout is preventing to properly deliver
signals to ptrace'd children (SIGSYS in this case).
This problem can be easily reproduced by running:
$ sudo make TARGETS=seccomp kselftest
...
# [ RUN ] TRACE_syscall.skip_a#
not ok 1 selftests: seccomp: seccomp_bpf # TIMEOUT
The test is hanging at this point until the timeout expires and then it
reports the timeout error.
Prevent this problem by passing --foreground to /usr/bin/timeout,
allowing to properly deliver signals to children processes.
Signed-off-by: Andrea Righi <andrea.righi(a)canonical.com>
---
tools/testing/selftests/kselftest/runner.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index e84d901f8567..676b3a8b114d 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -33,7 +33,7 @@ tap_timeout()
{
# Make sure tests will time out if utility is available.
if [ -x /usr/bin/timeout ] ; then
- /usr/bin/timeout "$kselftest_timeout" "$1"
+ /usr/bin/timeout --foreground "$kselftest_timeout" "$1"
else
"$1"
fi
--
2.25.1
Fix warnings at 'make htmldocs', and formatting issues in the resulting
documentation.
- test.h: Fix some typos in kernel-doc parameter description.
- Documentation/*.rst: Fixing formatting issues, and a duplicate label
issue, since using sphinx.ext.autosectionlabel in conf.py, referes to
headers are generated automatically and sphinx will not complain about
identical headers among documents anymore.
The downside is, automatically generated header labels within one
document now cannot be overwritten manually anymore. Thus duplicate
headers within one document have to have different wording, i.e. this
patch modifies some headers.
- Documentation/api/*: Flipping over to a page "API" containing a single
link to another page "API" seems like a formatting issue. The patch
removes one level of indirection.
Signed-off-by: Lothar Rubusch <l.rubusch(a)gmail.com>
---
Documentation/dev-tools/kunit/api/index.rst | 16 ----------------
Documentation/dev-tools/kunit/index.rst | 4 ++--
Documentation/dev-tools/kunit/start.rst | 13 ++++++++-----
Documentation/dev-tools/kunit/usage.rst | 4 ++--
include/kunit/test.h | 5 +++--
5 files changed, 15 insertions(+), 27 deletions(-)
delete mode 100644 Documentation/dev-tools/kunit/api/index.rst
diff --git a/Documentation/dev-tools/kunit/api/index.rst b/Documentation/dev-tools/kunit/api/index.rst
deleted file mode 100644
index 9b9bffe5d41a..000000000000
--- a/Documentation/dev-tools/kunit/api/index.rst
+++ /dev/null
@@ -1,16 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-=============
-API Reference
-=============
-.. toctree::
-
- test
-
-This section documents the KUnit kernel testing API. It is divided into the
-following sections:
-
-================================= ==============================================
-:doc:`test` documents all of the standard testing API
- excluding mocking or mocking related features.
-================================= ==============================================
diff --git a/Documentation/dev-tools/kunit/index.rst b/Documentation/dev-tools/kunit/index.rst
index e93606ecfb01..640bba1f4896 100644
--- a/Documentation/dev-tools/kunit/index.rst
+++ b/Documentation/dev-tools/kunit/index.rst
@@ -10,7 +10,7 @@ KUnit - Unit Testing for the Linux Kernel
start
usage
kunit-tool
- api/index
+ api/test
faq
What is KUnit?
@@ -88,6 +88,6 @@ How do I use it?
* :doc:`start` - for new users of KUnit
* :doc:`usage` - for a more detailed explanation of KUnit features
-* :doc:`api/index` - for the list of KUnit APIs used for testing
+* :doc:`api/test` - for the list of KUnit APIs used for testing
* :doc:`kunit-tool` - for more information on the kunit_tool helper script
* :doc:`faq` - for answers to some common questions about KUnit
diff --git a/Documentation/dev-tools/kunit/start.rst b/Documentation/dev-tools/kunit/start.rst
index e1c5ce80ce12..bb112cf70624 100644
--- a/Documentation/dev-tools/kunit/start.rst
+++ b/Documentation/dev-tools/kunit/start.rst
@@ -32,15 +32,17 @@ test targets as well. The ``.kunitconfig`` should also contain any other config
options required by the tests.
A good starting point for a ``.kunitconfig`` is the KUnit defconfig:
+
.. code-block:: bash
cd $PATH_TO_LINUX_REPO
cp arch/um/configs/kunit_defconfig .kunitconfig
You can then add any other Kconfig options you wish, e.g.:
+
.. code-block:: none
- CONFIG_LIST_KUNIT_TEST=y
+ CONFIG_LIST_KUNIT_TEST=y
:doc:`kunit_tool <kunit-tool>` will ensure that all config options set in
``.kunitconfig`` are set in the kernel ``.config`` before running the tests.
@@ -54,8 +56,8 @@ using.
other tools (such as make menuconfig) to adjust other config options.
-Running the tests
------------------
+Running the tests (KUnit Wrapper)
+---------------------------------
To make sure that everything is set up correctly, simply invoke the Python
wrapper from your kernel repo:
@@ -105,8 +107,9 @@ have config options ending in ``_KUNIT_TEST``.
KUnit and KUnit tests can be compiled as modules: in this case the tests in a
module will be run when the module is loaded.
-Running the tests
------------------
+
+Running the tests (w/o KUnit Wrapper)
+-------------------------------------
Build and run your kernel as usual. Test output will be written to the kernel
log in `TAP <https://testanything.org/>`_ format.
diff --git a/Documentation/dev-tools/kunit/usage.rst b/Documentation/dev-tools/kunit/usage.rst
index 473a2361ec37..3c3fe8b5fecc 100644
--- a/Documentation/dev-tools/kunit/usage.rst
+++ b/Documentation/dev-tools/kunit/usage.rst
@@ -595,7 +595,7 @@ able to run one test case per invocation.
KUnit debugfs representation
============================
When kunit test suites are initialized, they create an associated directory
-in /sys/kernel/debug/kunit/<test-suite>. The directory contains one file
+in ``/sys/kernel/debug/kunit/<test-suite>``. The directory contains one file
- results: "cat results" displays results of each test case and the results
of the entire suite for the last test run.
@@ -604,4 +604,4 @@ The debugfs representation is primarily of use when kunit test suites are
run in a native environment, either as modules or builtin. Having a way
to display results like this is valuable as otherwise results can be
intermixed with other events in dmesg output. The maximum size of each
-results file is KUNIT_LOG_SIZE bytes (defined in include/kunit/test.h).
+results file is KUNIT_LOG_SIZE bytes (defined in ``include/kunit/test.h``).
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 9b0c46a6ca1f..16d548b795b5 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -175,7 +175,7 @@ struct kunit_suite {
void (*exit)(struct kunit *test);
struct kunit_case *test_cases;
- /* private - internal use only */
+ /* private: internal use only */
struct dentry *debugfs;
char *log;
};
@@ -232,7 +232,8 @@ void __kunit_test_suites_exit(struct kunit_suite **suites);
* kunit_test_suites() - used to register one or more &struct kunit_suite
* with KUnit.
*
- * @suites: a statically allocated list of &struct kunit_suite.
+ * @...: a statically allocated list of &struct kunit_suite, assigned
+ * to the pointer @suites.
*
* Registers @suites with the test framework. See &struct kunit_suite for
* more information.
--
2.20.1
The second patch was already posted independently but because
of the changes in the first patch, the second one now depends
on it. Hence posting it now as a part of this series.
The last version (v2) of the second patch can be found at:
https://patchwork.ozlabs.org/patch/1225969/
Sandipan Das (2):
selftests: vm: Do not override definition of ARCH
selftests: vm: Fix 64-bit test builds for powerpc64le
tools/testing/selftests/vm/Makefile | 4 ++--
tools/testing/selftests/vm/run_vmtests | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.17.1
From: Daniel Latypov <dlatypov(a)google.com>
kunit parses .config in the `build_reconfig()` of `run_tests()`.
Problematically, the current regex '^CONFIG_\w+=\S+$' does not allow for
spaces anywhere after the "=", even the option is a string.
So kunit will refuse to run if the existing .config has something like
CONFIG_CMDLINE="something and_something_else"
even if kunit.py will drop this entry when it regenerates the .config!
So relax the regex to allow entries that match `CONFIG_\w+=".*"` as a
minimal change. The question remains as to whether we should do any
validation of the string after the "=", however.
Signed-off-by: Daniel Latypov <dlatypov(a)google.com>
Signed-off-by: Brendan Higgins <brendanhiggins(a)google.com>
---
tools/testing/kunit/kunit_config.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py
index e75063d603b5..0733796b0e32 100644
--- a/tools/testing/kunit/kunit_config.py
+++ b/tools/testing/kunit/kunit_config.py
@@ -10,7 +10,7 @@ import collections
import re
CONFIG_IS_NOT_SET_PATTERN = r'^# CONFIG_(\w+) is not set$'
-CONFIG_PATTERN = r'^CONFIG_(\w+)=(\S+)$'
+CONFIG_PATTERN = r'^CONFIG_(\w+)=(".*"|\S+)$'
KconfigEntryBase = collections.namedtuple('KconfigEntry', ['name', 'value'])
base-commit: c0cc271173b2e1c2d8d0ceaef14e4dfa79eefc0d
--
2.26.0.110.g2183baf09c-goog
This series introduces a new KVM selftest (mem_slot_test) that goal
is to verify memory slots can be added up to the maximum allowed. An
extra slot is attempted which should occur on error.
The patch 01 is needed so that the VM fd can be accessed from the
test code (for the ioctl call attempting to add an extra slot).
I ran the test successfully on x86_64, aarch64, and s390x. This
is why it is enabled to build on those arches.
- Changelog -
v3 -> v4:
- Discarded mem_reg_flags variable. Simply using 0 instead [drjones]
- Discarded kvm_region pointer. Instead passing a compound literal in
the ioctl [drjones]
- All variables are declared on the declaration block [drjones]
v2 -> v3:
- Keep alphabetical order of .gitignore and Makefile [drjones]
- Use memory region flags equals to zero [drjones]
- Changed mmap() assert from 'mem != NULL' to 'mem != MAP_FAILED' [drjones]
- kvm_region is declared along side other variables and malloc()'ed
later [drjones]
- Combined two asserts into a single 'ret == -1 && errno == EINVAL'
[drjones]
v1 -> v2:
- Rebased to queue
- vm_get_fd() returns int instead of unsigned int (patch 01) [drjones]
- Removed MEM_REG_FLAGS and GUEST_VM_MODE defines [drjones]
- Replaced DEBUG() with pr_info() [drjones]
- Calculate number of guest pages with vm_calc_num_guest_pages()
[drjones]
- Using memory region of 1 MB sized (matches mininum needed
for s390x)
- Removed the increment of guest_addr after the loop [drjones]
- Added assert for the errno when adding a slot beyond-the-limit [drjones]
- Prefer KVM_MEM_READONLY flag but on s390x it switch to KVM_MEM_LOG_DIRTY_PAGES,
so ensure the coverage of both flags. Also somewhat tests the KVM_CAP_READONLY_MEM capability check [drjones]
- Moved the test logic to test_add_max_slots(), this allows to more easily add new cases in the "suite".
v1: https://lore.kernel.org/kvm/20200330204310.21736-1-wainersm@redhat.com
Wainer dos Santos Moschetta (2):
selftests: kvm: Add vm_get_fd() in kvm_util
selftests: kvm: Add mem_slot_test test
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 3 +
.../testing/selftests/kvm/include/kvm_util.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++
tools/testing/selftests/kvm/mem_slot_test.c | 76 +++++++++++++++++++
5 files changed, 86 insertions(+)
create mode 100644 tools/testing/selftests/kvm/mem_slot_test.c
--
2.17.2
Avoid using /usr/bin/timeout unnecessarily if timeout is set to 0
(disabled) in the "settings" file for a specific test.
NOTE: without this change (and adding timeout=0 in the corresponding
settings file - tools/testing/selftests/seccomp/settings) the
seccomp_bpf selftest is always failing with a timeout event during the
syscall_restart step.
Signed-off-by: Andrea Righi <andrea.righi(a)canonical.com>
---
tools/testing/selftests/kselftest/runner.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kselftest/runner.sh b/tools/testing/selftests/kselftest/runner.sh
index e84d901f8567..2cd3c8def0f6 100644
--- a/tools/testing/selftests/kselftest/runner.sh
+++ b/tools/testing/selftests/kselftest/runner.sh
@@ -32,7 +32,7 @@ tap_prefix()
tap_timeout()
{
# Make sure tests will time out if utility is available.
- if [ -x /usr/bin/timeout ] ; then
+ if [ -x /usr/bin/timeout ] && [ $kselftest_timeout -gt 0 ] ; then
/usr/bin/timeout "$kselftest_timeout" "$1"
else
"$1"
--
2.25.1
Fix several sphinx warnings at 'make htmldocs'
- privately declared members not correctly declared as such
- 'suits' actually is not a function parameter, change declaration to fix
warning but keep information in comment
Signed-off-by: Lothar Rubusch <l.rubusch(a)gmail.com>
---
include/kunit/test.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/kunit/test.h b/include/kunit/test.h
index 9b0c46a6ca1f..fe4ea388528b 100644
--- a/include/kunit/test.h
+++ b/include/kunit/test.h
@@ -175,7 +175,7 @@ struct kunit_suite {
void (*exit)(struct kunit *test);
struct kunit_case *test_cases;
- /* private - internal use only */
+ /* private: internal use only. */
struct dentry *debugfs;
char *log;
};
@@ -232,7 +232,7 @@ void __kunit_test_suites_exit(struct kunit_suite **suites);
* kunit_test_suites() - used to register one or more &struct kunit_suite
* with KUnit.
*
- * @suites: a statically allocated list of &struct kunit_suite.
+ * suites - a statically allocated list of &struct kunit_suite.
*
* Registers @suites with the test framework. See &struct kunit_suite for
* more information.
--
2.20.1
From: Tim Bird <tim.bird(a)sony.com>
It is useful for CI systems to be able to query the list
of targets provided by kselftest by default, so that they
can construct their own loop over the targets if desired.
Signed-off-by: Tim Bird <tim.bird(a)sony.com>
---
tools/testing/selftests/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 63430e2..9955e71 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -246,4 +246,7 @@ clean:
$(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean;\
done;
+show_targets:
+ @echo $(TARGETS)
+
.PHONY: khdr all run_tests hotplug run_hotplug clean_hotplug run_pstore_crash install clean
--
2.1.4
Hello,
I'm running kselftest on Ubuntu 16.04lts.
Details:
deepa@deepa-Inspiron-3576:/usr/src/linux-headers-4.15.0-88/Documentation$
uname -a
Linux deepa-Inspiron-3576 4.15.0-91-generic #92~16.04.1-Ubuntu SMP Fri
Feb 28 14:57:22 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Command:
deepa@deepa-Inspiron-3576:/usr/src/linux-headers-4.15.0-91-generic$
make -C tools/testing/selftests
Error:
make: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/android'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/android'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/bpf'
Makefile:25: ../lib.mk: No such file or directory
/bin/sh: 1: llc: not found
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/bpf'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/breakpoints'
Makefile:15: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/breakpoints'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/capabilities'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/capabilities'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpufreq'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpufreq'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpu-hotplug'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/cpu-hotplug'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/efivarfs'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/efivarfs'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/exec'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/exec'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/filesystems'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/filesystems'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/firmware'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/firmware'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ftrace'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ftrace'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/futex'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/futex'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/gpio'
Makefile:13: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/gpio'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/intel_pstate'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/intel_pstate'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ipc'
Makefile:17: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ipc'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/kcmp'
Makefile:7: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/kcmp'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/lib'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/lib'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/membarrier'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/membarrier'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memfd'
Makefile:13: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memfd'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memory-hotplug'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/memory-hotplug'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mount'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mount'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mqueue'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/mqueue'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/net'
Makefile:14: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/net'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/netfilter'
Makefile:6: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/netfilter'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/nsfs'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/nsfs'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/powerpc'
Makefile:40: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/powerpc'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/pstore'
Makefile:11: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/pstore'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ptrace'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/ptrace'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/seccomp'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/seccomp'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sigaltstack'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sigaltstack'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/size'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/size'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/splice'
Makefile:5: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/splice'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/static_keys'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/static_keys'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sync'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sync'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sysctl'
Makefile:9: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/sysctl'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/timers'
Makefile:17: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/timers'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/user'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/user'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/vm'
Makefile:28: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/vm'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/x86'
Makefile:4: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/x86'
make[1]: Entering directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/zram'
Makefile:8: ../lib.mk: No such file or directory
make[1]: *** No rule to make target '../lib.mk'. Stop.
make[1]: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests/zram'
Makefile:73: recipe for target 'all' failed
make: *** [all] Error 2
make: Leaving directory
'/usr/src/linux-headers-4.15.0-91/tools/testing/selftests'
Can you please help us fix?
Is there an archive available for linux-kselftest? We could check it
once before posting it to this group.Just to avoid duplicates.
Thanks,
Deepa
On Tue, 7 Apr 2020 at 22:09, Greg Kroah-Hartman
<gregkh(a)linuxfoundation.org> wrote:
>
> This is the start of the stable review cycle for the 5.6.3 release.
> There are 30 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 09 Apr 2020 15:46:32 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.6.3-rc2.…
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.6.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
There are three kernel warnings on stable-rc 5.6 two of them are also
present in Linus's tree.
So these reported issues are not the release blockers.
The Source of these warnings are reported while running kselftests.
1) This warning reported on the mailing list and discussion is active.
Warning reported on x86_64, i386, arm and arm64.
[ 346.741358] kselftest: Running tests in lib
[ 346.872415] test_printf: loaded.
[ 346.876442] BUG: kernel NULL pointer dereference, address: 00000000
[ 346.882703] #PF: supervisor read access in kernel mode
[ 346.887844] #PF: error_code(0x0000) - not-present page
[ 346.892990] *pde = 00000000
[ 346.895877] Oops: 0000 [#1] SMP
[ 346.899025] CPU: 1 PID: 6060 Comm: modprobe Tainted: G W
5.6.3-rc2 #1
[ 346.906772] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[ 346.914261] EIP: ida_free+0x61/0x130
ref:
https://lore.kernel.org/linux-kselftest/CAFd5g46Bwd8HS9-xjHLh_rB59Nfw8iAnM6…
2) This warning is reported on the mailing list and waiting for response,
warning reported on i386 kernel image running x86_64 device.
[ 166.488084] ------------[ cut here ]------------
[ 166.492749] WARNING: CPU: 2 PID: 1456 at
/usr/src/kernel/kernel/locking/lockdep.c:1119
lockdep_register_key+0xb0/0xf0
[ 166.503357] Modules linked in: algif_hash af_alg
x86_pkg_temp_thermal fuse [last unloaded: test_bpf]
[ 166.512481] CPU: 2 PID: 1456 Comm: ip Not tainted 5.6.3-rc2 #1
[ 166.518306] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS
2.0b 07/27/2017
[ 166.525776] EIP: lockdep_register_key+0xb0/0xf0
ref:
https://lore.kernel.org/netdev/CA+G9fYt7-R-_fVDeiwj=sVvBQ-456Pm1oFFtM5Hm_94…
3) This warning is only noticed on stable rc 5.6 and 5.5 seen only on arm64.
This needs to be investigated.
[ 386.349099] kselftest: Running tests in ftrace
[ 393.984018]
[ 393.984290] =============================
[ 393.984781] WARNING: suspicious RCU usage
[ 393.988690] 5.6.3-rc2 #1 Not tainted
[ 393.992679] -----------------------------
[ 393.996327] /usr/src/kernel/include/trace/events/ipi.h:36
suspicious rcu_dereference_check() usage!
[ 394.000241]
[ 394.000241] other info that might help us debug this:
[ 394.000241]
[ 394.009094]
[ 394.009094] RCU used illegally from idle CPU!
[ 394.009094] rcu_scheduler_active = 2, debug_locks = 1
[ 394.017084] RCU used illegally from extended quiescent state!
[ 394.028187] 1 lock held by swapper/3/0:
[ 394.033826] #0: ffff80001237b6a8 (max_trace_lock){....}, at:
check_critical_timing+0x7c/0x1a8
ref:
https://lore.kernel.org/linux-kselftest/CA+G9fYtYRc_mKPDN-Gryw7fhjPNGBUP=Ke…
Summary
------------------------------------------------------------------------
kernel: 5.6.3-rc2
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.6.y
git commit: f106acd0db7c11e0208a2ecbeb0f7c52fc6c455a
git describe: v5.6.2-31-gf106acd0db7c
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-5.6-oe/build/v5.6.2-31-g…
No regressions (compared to build v5.6.2)
No fixes (compared to build v5.6.2)
Ran 22476 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- nxp-ls2088
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15
- x86
- x86-kasan
Test Suites
-----------
* build
* install-android-platform-tools-r2600
* install-android-platform-tools-r2800
* kselftest
* kvm-unit-tests
* libgpiod
* libhugetlbfs
* linux-log-parser
* ltp-cap_bounds-tests
* ltp-commands-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* perf
* v4l2-compliance
* ltp-containers-tests
* ltp-mm-tests
* ltp-open-posix-tests
* ltp-syscalls-tests
* network-basic-tests
* spectre-meltdown-checker-test
--
Linaro LKFT
https://lkft.linaro.org
This series introduces a new KVM selftest (mem_slot_test) that goal
is to verify memory slots can be added up to the maximum allowed. An
extra slot is attempted which should occur on error.
The patch 01 is needed so that the VM fd can be accessed from the
test code (for the ioctl call attempting to add an extra slot).
I ran the test successfully on x86_64, aarch64, and s390x. This
is why it is enabled to build on those arches.
- Changelog -
v2 -> v3:
- Keep alphabetical order of .gitignore and Makefile [drjones]
- Use memory region flags equals to zero [drjones]
- Changed mmap() assert from 'mem != NULL' to 'mem != MAP_FAILED' [drjones]
- kvm_region is declared along side other variables and malloc()'ed
later [drjones]
- Combined two asserts into a single 'ret == -1 && errno == EINVAL'
[drjones]
v1 -> v2:
- Rebased to queue
- vm_get_fd() returns int instead of unsigned int (patch 01) [drjones]
- Removed MEM_REG_FLAGS and GUEST_VM_MODE defines [drjones]
- Replaced DEBUG() with pr_info() [drjones]
- Calculate number of guest pages with vm_calc_num_guest_pages()
[drjones]
- Using memory region of 1 MB sized (matches mininum needed
for s390x)
- Removed the increment of guest_addr after the loop [drjones]
- Added assert for the errno when adding a slot beyond-the-limit [drjones]
- Prefer KVM_MEM_READONLY flag but on s390x it switch to KVM_MEM_LOG_DIRTY_PAGES,
so ensure the coverage of both flags. Also somewhat tests the KVM_CAP_READONLY_MEM capability check [drjones]
- Moved the test logic to test_add_max_slots(), this allows to more easily add new cases in the "suite".
v1: https://lore.kernel.org/kvm/20200330204310.21736-1-wainersm@redhat.com
Wainer dos Santos Moschetta (2):
selftests: kvm: Add vm_get_fd() in kvm_util
selftests: kvm: Add mem_slot_test test
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 3 +
.../testing/selftests/kvm/include/kvm_util.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++
tools/testing/selftests/kvm/mem_slot_test.c | 85 +++++++++++++++++++
5 files changed, 95 insertions(+)
create mode 100644 tools/testing/selftests/kvm/mem_slot_test.c
--
2.17.2
This series introduces a new KVM selftest (mem_slot_test) that goal
is to verify memory slots can be added up to the maximum allowed. An
extra slot is attempted which should occur on error.
The patch 01 is needed so that the VM fd can be accessed from the
test code (for the ioctl call attempting to add an extra slot).
I ran the test successfully on x86_64, aarch64, and s390x. This
is why it is enabled to build on those arches.
v1: https://lore.kernel.org/kvm/20200330204310.21736-1-wainersm@redhat.com
Changes v1 -> v2:
- Rebased to queue
- vm_get_fd() returns int instead of unsigned int (patch 01) [drjones]
- Removed MEM_REG_FLAGS and GUEST_VM_MODE defines [drjones]
- Replaced DEBUG() with pr_info() [drjones]
- Calculate number of guest pages with vm_calc_num_guest_pages()
[drjones]
- Using memory region of 1 MB sized (matches mininum needed
for s390x)
- Removed the increment of guest_addr after the loop [drjones]
- Added assert for the errno when adding a slot beyond-the-limit [drjones]
- Prefer KVM_MEM_READONLY flag but on s390x it switch to KVM_MEM_LOG_DIRTY_PAGES,
so ensure the coverage of both flags. Also somewhat tests the KVM_CAP_READONLY_MEM capability check [drjones]
- Moved the test logic to test_add_max_slots(), this allows to more easily add new cases in the "suite".
Wainer dos Santos Moschetta (2):
selftests: kvm: Add vm_get_fd() in kvm_util
selftests: kvm: Add mem_slot_test test
tools/testing/selftests/kvm/.gitignore | 1 +
tools/testing/selftests/kvm/Makefile | 3 +
.../testing/selftests/kvm/include/kvm_util.h | 1 +
tools/testing/selftests/kvm/lib/kvm_util.c | 5 ++
tools/testing/selftests/kvm/mem_slot_test.c | 85 +++++++++++++++++++
5 files changed, 95 insertions(+)
create mode 100644 tools/testing/selftests/kvm/mem_slot_test.c
--
2.17.2
From: Alan Maguire <alan.maguire(a)oracle.com>
[ Upstream commit 83a9b6f639e9f6b632337f9776de17d51d969c77 ]
Many systems build/test up-to-date kernels with older libcs, and
an older glibc (2.17) lacks the definition of SOL_DCCP in
/usr/include/bits/socket.h (it was added in the 4.6 timeframe).
Adding the definition to the test program avoids a compilation
failure that gets in the way of building tools/testing/selftests/net.
The test itself will work once the definition is added; either
skipping due to DCCP not being configured in the kernel under test
or passing, so there are no other more up-to-date glibc dependencies
here it seems beyond that missing definition.
Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP")
Signed-off-by: Alan Maguire <alan.maguire(a)oracle.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/testing/selftests/net/reuseport_addr_any.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/net/reuseport_addr_any.c b/tools/testing/selftests/net/reuseport_addr_any.c
index c6233935fed14..b8475cb29be7a 100644
--- a/tools/testing/selftests/net/reuseport_addr_any.c
+++ b/tools/testing/selftests/net/reuseport_addr_any.c
@@ -21,6 +21,10 @@
#include <sys/socket.h>
#include <unistd.h>
+#ifndef SOL_DCCP
+#define SOL_DCCP 269
+#endif
+
static const char *IP4_ADDR = "127.0.0.1";
static const char *IP6_ADDR = "::1";
static const char *IP4_MAPPED6 = "::ffff:127.0.0.1";
--
2.20.1
From: Alan Maguire <alan.maguire(a)oracle.com>
[ Upstream commit 83a9b6f639e9f6b632337f9776de17d51d969c77 ]
Many systems build/test up-to-date kernels with older libcs, and
an older glibc (2.17) lacks the definition of SOL_DCCP in
/usr/include/bits/socket.h (it was added in the 4.6 timeframe).
Adding the definition to the test program avoids a compilation
failure that gets in the way of building tools/testing/selftests/net.
The test itself will work once the definition is added; either
skipping due to DCCP not being configured in the kernel under test
or passing, so there are no other more up-to-date glibc dependencies
here it seems beyond that missing definition.
Fixes: 11fb60d1089f ("selftests: net: reuseport_addr_any: add DCCP")
Signed-off-by: Alan Maguire <alan.maguire(a)oracle.com>
Signed-off-by: David S. Miller <davem(a)davemloft.net>
Signed-off-by: Sasha Levin <sashal(a)kernel.org>
---
tools/testing/selftests/net/reuseport_addr_any.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/testing/selftests/net/reuseport_addr_any.c b/tools/testing/selftests/net/reuseport_addr_any.c
index c6233935fed14..b8475cb29be7a 100644
--- a/tools/testing/selftests/net/reuseport_addr_any.c
+++ b/tools/testing/selftests/net/reuseport_addr_any.c
@@ -21,6 +21,10 @@
#include <sys/socket.h>
#include <unistd.h>
+#ifndef SOL_DCCP
+#define SOL_DCCP 269
+#endif
+
static const char *IP4_ADDR = "127.0.0.1";
static const char *IP6_ADDR = "::1";
static const char *IP4_MAPPED6 = "::ffff:127.0.0.1";
--
2.20.1
This patchset contains everything needed to integrate KASAN and KUnit.
KUnit will be able to:
(1) Fail tests when an unexpected KASAN error occurs
(2) Pass tests when an expected KASAN error occurs
Convert KASAN tests to KUnit with the exception of copy_user_test
because KUnit is unable to test those.
Add documentation on how to run the KASAN tests with KUnit and what to
expect when running these tests.
Depends on "[PATCH v3 kunit-next 0/2] kunit: extend kunit resources
API" patchset [1]
[1] https://lore.kernel.org/linux-kselftest/1585313122-26441-1-git-send-email-a…
Changes from v3:
- KUNIT_SET_KASAN_DATA and KUNIT_DO_EXPECT_KASAN_FAIL have been
combined and included in KUNIT_DO_EXPECT_KASAN_FAIL() instead.
- Reordered logic in kasan_update_kunit_status() in report.c to be
easier to read.
- Added comment to not use the name "kasan_data" for any kunit tests
outside of KUNIT_EXPECT_KASAN_FAIL().
Patricia Alfonso (4):
Add KUnit Struct to Current Task
KUnit: KASAN Integration
KASAN: Port KASAN Tests to KUnit
KASAN: Testing Documentation
Documentation/dev-tools/kasan.rst | 70 +++
include/kunit/test.h | 5 +
include/linux/kasan.h | 6 +
include/linux/sched.h | 4 +
lib/Kconfig.kasan | 15 +-
lib/Makefile | 3 +-
lib/kunit/test.c | 13 +-
lib/test_kasan.c | 680 +++++++++++++-----------------
lib/test_kasan_module.c | 76 ++++
mm/kasan/report.c | 30 ++
10 files changed, 511 insertions(+), 391 deletions(-)
create mode 100644 lib/test_kasan_module.c
--
2.26.0.292.g33ef6b2f38-goog
The following 4 tests in timers can take longer than the default 45
seconds that added in commit 852c8cbf (selftests/kselftest/runner.sh:
Add 45 second timeout per test) to run:
* nsleep-lat - 2m7.350s
* set-timer-lat - 2m0.66s
* inconsistency-check - 1m45.074s
* raw_skew - 2m0.013s
Thus they will be marked as failed with the current 45s setting:
not ok 3 selftests: timers: nsleep-lat # TIMEOUT
not ok 4 selftests: timers: set-timer-lat # TIMEOUT
not ok 6 selftests: timers: inconsistency-check # TIMEOUT
not ok 7 selftests: timers: raw_skew # TIMEOUT
Disable the timeout setting for timers can make these tests finish
properly:
ok 3 selftests: timers: nsleep-lat
ok 4 selftests: timers: set-timer-lat
ok 6 selftests: timers: inconsistency-check
ok 7 selftests: timers: raw_skew
https://bugs.launchpad.net/bugs/1864626
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/timers/Makefile | 1 +
tools/testing/selftests/timers/settings | 1 +
2 files changed, 2 insertions(+)
create mode 100644 tools/testing/selftests/timers/settings
diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile
index 7656c7c..0e73a16 100644
--- a/tools/testing/selftests/timers/Makefile
+++ b/tools/testing/selftests/timers/Makefile
@@ -13,6 +13,7 @@ DESTRUCTIVE_TESTS = alarmtimer-suspend valid-adjtimex adjtick change_skew \
TEST_GEN_PROGS_EXTENDED = $(DESTRUCTIVE_TESTS)
+TEST_FILES := settings
include ../lib.mk
diff --git a/tools/testing/selftests/timers/settings b/tools/testing/selftests/timers/settings
new file mode 100644
index 0000000..e7b9417
--- /dev/null
+++ b/tools/testing/selftests/timers/settings
@@ -0,0 +1 @@
+timeout=0
--
2.7.4
Summary
------------------------------------------------------------------------
kernel: 5.6.0
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git branch: master
git commit: b2e2a818a01717ba15c74fd355f76822b81a95f6
git describe: next-20200406
Test details: https://qa-reports.linaro.org/lkft/linux-next-oe/build/next-20200406
Regressions (compared to build next-20200405)
------------------------------------------------------------------------
No regressions
Fixes (compared to build next-20200405)
------------------------------------------------------------------------
No fixes
In total:
------------------------------------------------------------------------
Ran 0 total tests in the following environments and test suites.
pass 0
fail 0
xfail 0
skip 0
Environments
--------------
- x15 - arm
Test Suites
-----------
Failures
------------------------------------------------------------------------
x15:
Skips
------------------------------------------------------------------------
No skips
--
Linaro LKFT
https://lkft.linaro.org