close_range() test type conflicts with close_range() library call in
x86_64-linux-gnu/bits/unistd_ext.h. Fix it by changing the name to
core_close_range().
gcc -g -I../../../../usr/include/ close_range_test.c -o ../tools/testing/selftests/core/close_range_test
In file included from close_range_test.c:16:
close_range_test.c:57:6: error: conflicting types for ‘close_range’; have ‘void(struct __test_metadata *)’
57 | TEST(close_range)
| ^~~~~~~~~~~
../kselftest_harness.h:181:21: note: in definition of macro ‘__TEST_IMPL’
181 | static void test_name(struct __test_metadata *_metadata); \
| ^~~~~~~~~
close_range_test.c:57:1: note: in expansion of macro ‘TEST’
57 | TEST(close_range)
| ^~~~
In file included from /usr/include/unistd.h:1204,
from close_range_test.c:13:
/usr/include/x86_64-linux-gnu/bits/unistd_ext.h:56:12: note: previous declaration of ‘close_range’ with type ‘int(unsigned int, unsigned int, int)’
56 | extern int close_range (unsigned int __fd, unsigned int __max_fd,
| ^~~~~~~~~~~
Signed-off-by: Shuah Khan <skhan(a)linuxfoundation.org>
---
tools/testing/selftests/core/close_range_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/core/close_range_test.c b/tools/testing/selftests/core/close_range_test.c
index 73eb29c916d1..aa7d13d91963 100644
--- a/tools/testing/selftests/core/close_range_test.c
+++ b/tools/testing/selftests/core/close_range_test.c
@@ -54,7 +54,7 @@ static inline int sys_close_range(unsigned int fd, unsigned int max_fd,
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
-TEST(close_range)
+TEST(core_close_range)
{
int i, ret;
int open_fds[101];
--
2.32.0
Hi,
On Fri, 29 Oct 2021 14:48:18 +0800
kernel test robot <oliver.sang(a)intel.com> wrote:
>
>
> Greeting,
>
> FYI, we noticed the following commit (built with gcc-9):
>
> commit: cfece71411dbca5dc5e1fa2d9ce5a3f38e55d4fe ("[PATCH v4 7/8] tracing/selftests: Add tests for hist trigger expression parsing")
> url: https://github.com/0day-ci/linux/commits/Kalesh-Singh/tracing-Extend-histog…
>
>
> in testcase: kernel-selftests
> version: kernel-selftests-x86_64-c8c9111a-1_20210929
> with following parameters:
>
> group: ftrace
> ucode: 0xe2
>
> test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
> test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
Thanks! This issue has been found and will be fixed next version.
BTW, I have some questions about this bot;
>
>
> on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory
>
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>
>
>
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <oliver.sang(a)intel.com>
>
>
>
> TAP version 13
> 1..1
> # selftests: ftrace: ftracetest
> # === Ftrace unit tests ===
> # [1] Basic trace file check [PASS]
> ...
> <<< [1] - [67] have same results as parent, i.e. both PASS or both FAIL >>>
At first, I guess the robot just checks the "[number]" instead
of the test description, but the ftracetest doesn't fix the "[number]"
for each test, Thus, it can be different when updated it.
So if you compare the result, please check the descriptions too.
> ...
> # [67] event trigger - test multiple actions on hist trigger [PASS]
>
> >>> [68] - [72] can PASS on parent
> # [68] event trigger - test inter-event histogram trigger onchange action [FAIL]
> # [69] event trigger - test inter-event histogram trigger onmatch action [FAIL]
> # [70] event trigger - test inter-event histogram trigger onmatch-onmax action [FAIL]
> # [71] event trigger - test inter-event histogram trigger onmax action [FAIL]
> # [72] event trigger - test inter-event histogram trigger snapshot action [FAIL]
>
> >>> [73] fail on parent, too
> # [73] event trigger - test inter-event histogram trigger eprobe on synthetic event [FAIL]
>
> >>> [74] - [92] can PASS on parent
> # [74] event trigger - test synthetic event create remove [FAIL]
> # [75] event trigger - test inter-event histogram trigger trace action with dynamic string param [FAIL]
> # [76] event trigger - test synthetic_events syntax parser [FAIL]
> # [77] event trigger - test synthetic_events syntax parser errors [FAIL]
> # [78] event trigger - test inter-event histogram trigger trace action [FAIL]
> # [79] event trigger - test event enable/disable trigger [FAIL]
> # [80] event trigger - test trigger filter [FAIL]
> # [81] event trigger - test histogram expression parsing [FAIL]
> # [82] event trigger - test histogram modifiers [FAIL]
> # [83] event trigger - test histogram parser errors [FAIL]
> # [84] event trigger - test histogram trigger [FAIL]
> # [85] event trigger - test multiple histogram triggers [FAIL]
> # [86] event trigger - test snapshot-trigger [FAIL]
> # [87] event trigger - test stacktrace-trigger [FAIL]
> # [88] trace_marker trigger - test histogram trigger [FAIL]
> # [89] trace_marker trigger - test snapshot trigger [FAIL]
> # [90] trace_marker trigger - test histogram with synthetic event against kernel event [FAIL]
> # [91] trace_marker trigger - test histogram with synthetic event [FAIL]
> # [92] event trigger - test traceon/off trigger [FAIL]
> # [93] (instance) Basic test for tracers [PASS]
> ...
> <<< [93] - [112] have same results as parent, all PASS >>>
> ...
> # [112] (instance) trace_marker trigger - test histogram trigger [PASS]
>
> >>> parent has no [113]
> # [113] (instance) trace_marker trigger - test snapshot trigger [PASS]
And next, some patch series may *ADD* new testcases if the series add
a new feature, so if you find the difference which is not in the
parent commit but it is passed, please ignore that.
> # tac: failed to create temporary file in '/tmp/ftracetest-dir.o54lNh': No such file or directory
> # tac: failed to create temporary file in '/tmp/ftracetest-dir.o54lNh': No such file or directory
> # tac: failed to create temporary file in '/tmp/ftracetest-dir.o54lNh': No such file or directory
> # tac: failed to create temporary file in '/tmp/ftracetest-dir.o54lNh': No such file or directory
And if you find this kind of new error message like above, please report it.
This is more important for us.
> #
> #
> # # of passed: 85
> # # of failed: 26
> # # of unresolved: 1
> # # of untested: 0
> # # of unsupported: 0
> # # of xfailed: 1
> # # of undefined(test bug): 0
> not ok 1 selftests: ftrace: ftracetest # exit=1
Also, please configure your running environment correctly so that all
ftracetest passes. If you unsure how to do, please ask me.
Thank you,
>
>
>
> To reproduce:
>
> git clone https://github.com/intel/lkp-tests.git
> cd lkp-tests
> sudo bin/lkp install job.yaml # job file is attached in this email
> bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
> sudo bin/lkp run generated-yaml-file
>
> # if come across any failure that blocks the test,
> # please remove ~/.lkp and /lkp dir to run from a clean state.
>
>
>
> ---
> 0DAY/LKP+ Test Infrastructure Open Source Technology Center
> https://lists.01.org/hyperkitty/list/lkp@lists.01.org Intel Corporation
>
> Thanks,
> Oliver Sang
>
--
Masami Hiramatsu <mhiramat(a)kernel.org>
This series adds optimiztion for division by constants and updates the
histogram trigger expression kselftests and documentation.
It is dependent on the series at [1] and the fix at [2]; and can be applied
on top of those after dropping the patch 7 in [1].
[1] https://lore.kernel.org/r/20211025200852.3002369-1-kaleshsingh@google.com/
[2] https://lore.kernel.org/r/20211028170548.2597449-1-kaleshsingh@google.com/
Kalesh Singh (4):
tracing/histogram: Optimize division by constants (v2)
tracing/histogram: Update division by 0 documentation (v1)
tracing/histogram: Document hist trigger variables (v3)
tracing/selftests: Add tests for hist trigger expression parsing (v7)
Documentation/trace/histogram.rst | 3 +-
kernel/trace/trace.c | 11 ++
kernel/trace/trace_events_hist.c | 117 +++++++++++++++++-
.../trigger/trigger-hist-expressions.tc | 63 ++++++++++
4 files changed, 192 insertions(+), 2 deletions(-)
create mode 100644 tools/testing/selftests/ftrace/test.d/trigger/trigger-hist-expressions.tc
--
2.33.1.1089.g2158813163f-goog
V1 available at:
https://lore.kernel.org/lkml/cover.1631731214.git.reinette.chatre@intel.com/
Changes since V1:
- Biggest change: The non-kselftest placeholder patches included in this series
that the kselftest work depends on are still being discussed elsewhere
(link below) but has changed significantly since the first submission,
warranting an update to the kselftest patches that depend on it.
Jarkko: I made significant modifications to your
"selftests/sgx: Add a new kselftest: unclobbered_vdso_oversubscribed"
that you may want to look at.
- Improve cover letter and changelogs (Dave).
- Add Jarkko and Dave's signatures where obtained (Jarkko and Dave).
- Fix Cedric's signature in patch 1 (Jarkko and Cedric).
- Improve the loop locating the data segment (Jarkko).
- Update placeholder patches that makes the amount of SGX memory available to
latest version (v8). Previously this dependency consisted out of one
patch, now it spans two.
Hi Everybody,
This series consists out of outstanding SGX selftests changes, rebased
and gathered in a single series that can easily be merged for testing
and development, and a few more changes added to expand the existing tests.
The outstanding SGX selftest changes included in this series that have already
been submitted separately are:
* A more than two year old patch fixing a benign linker warning that is still
present today:
https://lore.kernel.org/linux-sgx/20191017030340.18301-2-sean.j.christopher…
The original patch is added intact and not all email addresses
within are valid.
* Latest (v4) of Jarkko Sakkinen's series to add an oversubscription test:
https://lore.kernel.org/linux-sgx/20210809093127.76264-1-jarkko@kernel.org/
* Latest (v2) of Jarkko Sakkinen's patch that provides per-op
parameter structs for the test enclave:
https://lore.kernel.org/linux-sgx/20210812224645.90280-1-jarkko@kernel.org/
The reason why most of these patches are outstanding is that they depend
on a kernel change that is still under discussion. Decision to wait in:
https://lore.kernel.org/linux-sgx/f8674dac5579a8a424de1565f7ffa2b5bf2f8e36.…
The latest patches (v8) for this dependency is included in
this series as a placeholder until the ongoing discussions are concluded:
https://lore.kernel.org/lkml/20211018135744.45527-1-jarkko@kernel.org/https://lore.kernel.org/lkml/20211018135744.45527-2-jarkko@kernel.org/
The new changes introduced in this series builds on Jarkko's outstanding
SGX selftest changes and adds new tests for page permissions, exception
handling, and thread entry.
Building and running enclaves is painful and traditionally requires a
big software stack. This adds features like threads to the SGX selftests
which are traditionally implemented in that big software stack. This
helps test SGX kernel support with only code from the kernel tree.
Reinette
Jarkko Sakkinen (10):
x86/sgx: Rename fallback labels in sgx_init()
x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node
selftests/sgx: Assign source for each segment
selftests/sgx: Make data measurement for an enclave segment optional
selftests/sgx: Create a heap for the test enclave
selftests/sgx: Dump segments and /proc/self/maps only on failure
selftests/sgx: Encpsulate the test enclave creation
selftests/sgx: Move setup_test_encl() to each TEST_F()
selftests/sgx: Add a new kselftest: unclobbered_vdso_oversubscribed
selftests/sgx: Provide per-op parameter structs for the test enclave
Reinette Chatre (4):
selftests/sgx: Rename test properties in preparation for more enclave
tests
selftests/sgx: Add page permission and exception test
selftests/sgx: Enable multiple thread support
selftests/sgx: Add test for multiple TCS entry
Sean Christopherson (1):
selftests/x86/sgx: Fix a benign linker warning
Documentation/ABI/stable/sysfs-devices-node | 7 +
arch/x86/kernel/cpu/sgx/main.c | 97 ++++-
arch/x86/kernel/cpu/sgx/sgx.h | 2 +
tools/testing/selftests/sgx/Makefile | 2 +-
tools/testing/selftests/sgx/defines.h | 33 +-
tools/testing/selftests/sgx/load.c | 40 +-
tools/testing/selftests/sgx/main.c | 396 ++++++++++++++++--
tools/testing/selftests/sgx/main.h | 7 +-
tools/testing/selftests/sgx/sigstruct.c | 12 +-
tools/testing/selftests/sgx/test_encl.c | 60 ++-
.../selftests/sgx/test_encl_bootstrap.S | 21 +-
11 files changed, 585 insertions(+), 92 deletions(-)
base-commit: 7d2a07b769330c34b4deabeed939325c77a7ec2f
--
2.25.1
The Testing & Fuzzing Micro-Conference[1] at Linux Plumbers 2021 will
remain open to new proposals for talks and discussion topics until the
end of next week (Friday 10th Sept). Please feel free to submit yours
with the "Submit new proposal" form on this page:
https://linuxplumbersconf.org/event/11/abstracts/
The MC is currently scheduled for Wednesday 22nd. This is where the
timetable will appear as submissions get accepted:
https://linuxplumbersconf.org/event/11/sessions/110/#20210922
Last year's edition was very effective in spite of being fully online
rather than in-person. Topics around testing were mentioned in many
other tracks too, such as real-time and toolchains. See also the
related KernelCI blog post with community notes[2]. We're looking
forward to having an equally good virtual experience this time again.
Best wishes,
Guillaume
[1] https://www.linuxplumbersconf.org/blog/2021/index.php/2021/07/09/testing-an…
The Testing and Fuzzing microconference focuses on advancing the current
state of testing of the Linux kernel. We aim to create connections
between folks working on similar projects, and help individual projects
make progress.
We ask that any topic discussions will focus on issues/problems they are
facing and possible alternatives to resolving them. The Microconference
is open to all topics related to testing & fuzzing on Linux, not
necessarily in the kernel space.
Suggested topics:
KernelCI: Extending coverage and improving user experience.
Growing KCIDB, integrating more sources.
Better sanitizers: KFENCE, improving KCSAN.
Using Clang for better testing coverage.
How to spread KUnit throughout the kernel?
Testing in-kernel Rust code.
MC leads:
Sasha Levin <sashal(a)kernel.org>
Guillaume Tucker <guillaume.tucker(a)collabora.com>
[2] https://foundation.kernelci.org/blog/2020/09/23/kernelci-notes-from-plumber…