Re: [FIX PATCH] selftests: tracing: Fix to unmount tracefs for recovering environment

2023-09-11 Thread Steven Rostedt
On Tue, 12 Sep 2023 09:54:57 +0900 Masami Hiramatsu (Google) wrote: > > Shouldn't the above be: > > > > if [ ! -z "${UNMOUNT_DIR}" ]; then > > > > ? > > I think both are good. > What about using '-n' explictly? > > [ -n "${UNMOUNT_DIR}" ] Even better. Heh, I never even knew about

Re: [FIX PATCH v2] selftests: tracing: Fix to unmount tracefs for recovering environment

2023-09-11 Thread Steven Rostedt
On Tue, 12 Sep 2023 10:10:39 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Fix to unmount the tracefs if the ftracetest mounted it for recovering > system environment. If the tracefs is already mounted, this does nothing. > > Suggested-by: Mark Brown > Link:

[FIX PATCH v2] selftests: tracing: Fix to unmount tracefs for recovering environment

2023-09-11 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Fix to unmount the tracefs if the ftracetest mounted it for recovering system environment. If the tracefs is already mounted, this does nothing. Suggested-by: Mark Brown Link: https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215...@sirena.org.uk/

Re: [FIX PATCH] selftests: tracing: Fix to unmount tracefs for recovering environment

2023-09-11 Thread Google
On Mon, 11 Sep 2023 13:09:09 -0400 Steven Rostedt wrote: > On Sat, 9 Sep 2023 18:36:39 +0900 > "Masami Hiramatsu (Google)" wrote: > > > From: Masami Hiramatsu (Google) > > > > Fix to unmount the tracefs if the ftracetest mounted it for recovering > > system environment. If the tracefs is

Re: [PATCH RFC] selftests/rseq: fix kselftest Clang build warnings

2023-09-11 Thread Mathieu Desnoyers
On 9/11/23 12:53, Justin Stitt wrote: On Sat, Sep 9, 2023 at 5:37 AM Mathieu Desnoyers wrote: On 9/8/23 19:03, Justin Stitt wrote: Hi, I am experiencing many warnings when trying to build tools/testing/selftests. Here's one such example from rseq tree: | param_test.c:1234:10: error:

[PATCH 3/5] selftests/resctrl: Refactor feature check to use resource and feature name

2023-09-11 Thread Ilpo Järvinen
Feature check in validate_resctrl_feature_request() takes in the test name string and maps that to what to check per test. Pass resource and feature names to validate_resctrl_feature_request() directly rather than deriving them from the test name inside the function which makes the feature check

[PATCH 5/5] selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests

2023-09-11 Thread Ilpo Järvinen
5% difference upper bound for success is a bit on the low side for the MBA and MBM tests. Some platforms produce outliers that are slightly above that, typically 6-7%. Relaxing the MBA/MBM success bound to 8% removes most of the failures due those frequent outliers. Fixes: 06bd03a57f8c

Re: [PATCH] ftrace/selftests: Add softlink to latest log directory

2023-09-11 Thread Shuah Khan
On 9/11/23 12:07, Steven Rostedt wrote: On Mon, 11 Sep 2023 09:21:05 +0900 Masami Hiramatsu (Google) wrote: On Fri, 8 Sep 2023 18:17:21 -0400 Steven Rostedt wrote: From: Steven Rostedt (Google) When I'm debugging something with the ftrace selftests and need to look at the logs, it

Re: [PATCH v2 1/3] selftests/hid: ensure we can compile the tests on kernels pre-6.3

2023-09-11 Thread Eduard Zingerman
On Fri, 2023-09-08 at 22:22 +, Justin Stitt wrote: > From: Benjamin Tissoires > > For the hid-bpf tests to compile, we need to have the definition of > struct hid_bpf_ctx. This definition is an internal one from the kernel > and it is supposed to be defined in the generated vmlinux.h. > >

Re: [PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-11 Thread Thomas Weißschuh
Hi Willy! On 2023-09-11 08:04:49+0200, Willy Tarreau wrote: > On Sun, Sep 10, 2023 at 09:29:01PM +0200, Thomas Weißschuh wrote: > > Newer versions of glibc annotate the poll() function with > > __attribute__(access) which triggers a compiler warning inside the > > testcase poll_fault. > > Avoid

[GIT PULL] Kselftest fixes update for Linux 6.6-rc2

2023-09-11 Thread Shuah Khan
Hi Linus, Please pull the following Kselftest fixes update for Linux 6.6-rc2. This kselftest fixes update for Linux 6.6-rc2 consists of fixes -- kselftest runner script to propagate SIGTERM to runner child to avoid kselftest hang. -- to install symlinks required for test execution to avoid

Re: [PATCH] ftrace/selftests: Add softlink to latest log directory

2023-09-11 Thread Steven Rostedt
On Mon, 11 Sep 2023 09:21:05 +0900 Masami Hiramatsu (Google) wrote: > On Fri, 8 Sep 2023 18:17:21 -0400 > Steven Rostedt wrote: > > > From: Steven Rostedt (Google) > > > > When I'm debugging something with the ftrace selftests and need to look at > > the logs, it becomes tedious that I need

RE: [PATCH V5 4/7] cpufreq: Add a notification message that the highest perf has changed

2023-09-11 Thread Meng, Li (Jassmine)
[AMD Official Use Only - General] Hi Peter: > -Original Message- > From: Peter Zijlstra > Sent: Friday, September 8, 2023 9:24 PM > To: Meng, Li (Jassmine) > Cc: Rafael J . Wysocki ; Huang, Ray > ; linux...@vger.kernel.org; linux- > ker...@vger.kernel.org; x...@kernel.org;

Re: [PATCH 1/2] kunit: Warn if tests are slow

2023-09-11 Thread Jani Nikula
On Mon, 11 Sep 2023, Maxime Ripard wrote: > Kunit recently gained support to setup attributes, the first one being > the speed of a given test, then allowing to filter out slow tests. > > A slow test is defined in the documentation as taking more than one > second. There's an another speed

Re: [PATCH] kselftest/alsa: Mark test plan as skipped when no cards are available

2023-09-11 Thread Nícolas F . R . A . Prado
On Sat, Sep 09, 2023 at 12:08:22AM +0100, Mark Brown wrote: > On Fri, Sep 08, 2023 at 02:12:40PM -0400, Nícolas F. R. A. Prado wrote: > > When no soundcards are available, it won't be possible to run any tests. > > Currently, when this happens, in both pcm-test and mixer-test, 0 > > tests are

[PATCH v5 8/8] selftests/bpf/sockopt: Add io_uring support

2023-09-11 Thread Breno Leitao
Expand the BPF sockopt test to use also check for io_uring {g,s}etsockopt commands operations. Create infrastructure to run io_uring tests using the mini_liburing helpers, so, the {g,s}etsockopt operation could either be called from system calls, or, via io_uring. Add a 'use_io_uring' parameter

Re: [PATCH v2 1/3] selftests/hid: ensure we can compile the tests on kernels pre-6.3

2023-09-11 Thread Eduard Zingerman
On Mon, 2023-09-11 at 15:39 +0200, Benjamin Tissoires wrote: > On Sep 11 2023, Eduard Zingerman wrote: > > On Fri, 2023-09-08 at 22:22 +, Justin Stitt wrote: > > > From: Benjamin Tissoires > > > > > > For the hid-bpf tests to compile, we need to have the definition of > > > struct

[PATCH 0/2] drm/tests: Flag slow kunit tests as such

2023-09-11 Thread Maxime Ripard
/kunit/test.c | 16 3 files changed, 24 insertions(+), 8 deletions(-) --- base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d change-id: 20230911-kms-slow-tests-0261bee9a54b Best regards, -- Maxime Ripard

[PATCH 2/5] selftests/resctrl: Remove duplicate feature check from CMT test

2023-09-11 Thread Ilpo Järvinen
The test runner run_cmt_test() in resctrl_tests.c checks for CMT feature and does not run cmt_resctrl_val() if CMT is not supported. Then cmt_resctrl_val() also check is CMT is supported. Remove the duplicated feature check for CMT from cmt_resctrl_val(). Signed-off-by: Ilpo Järvinen Cc: ---

Re: [PATCH] kselftest/alsa: Mark test plan as skipped when no cards are available

2023-09-11 Thread Mark Brown
On Mon, Sep 11, 2023 at 08:35:37AM -0400, Nícolas F. R. A. Prado wrote: > On Sat, Sep 09, 2023 at 12:08:22AM +0100, Mark Brown wrote: > > Why? > To better reflect the actual test plan status. If 0 tests were run, it doesn't > really make sense to say that the test plan passed, rather it was

Re: [PATCH 1/2] kunit: Warn if tests are slow

2023-09-11 Thread Maxime Ripard
Hi Jani, On Mon, Sep 11, 2023 at 01:07:35PM +0300, Jani Nikula wrote: > On Mon, 11 Sep 2023, Maxime Ripard wrote: > > Kunit recently gained support to setup attributes, the first one being > > the speed of a given test, then allowing to filter out slow tests. > > > > A slow test is defined in

[PATCH 1/5] selftests/resctrl: Extend signal handler coverage to unmount on receiving signal

2023-09-11 Thread Ilpo Järvinen
Unmounting resctrl FS has been moved into the per test functions in resctrl_tests.c by commit caddc0fbe495 ("selftests/resctrl: Move resctrl FS mount/umount to higher level"). In case a signal (SIGINT, SIGTERM, or SIGHUP) is received, the running selftest is aborted by ctrlc_handler() which then

Re: [PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-11 Thread Willy Tarreau
On Mon, Sep 11, 2023 at 04:47:12PM +0200, Thomas Weißschuh wrote: > I used "git rebase --signoff" and dropped the duplicate signoffs it > generated on my own commits. > > It's also pushed to git.kernel.org, could you double-check it? Looks good to me, thank you! Willy

[PATCH 6.4 105/737] selftests/harness: Actually report SKIP for signal tests

2023-09-11 Thread Greg Kroah-Hartman
6.4-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook [ Upstream commit b3d46e11fec0c5a8972e5061bb1462119ae5736d ] Tests that were expecting a signal were not correctly checking for a SKIP condition. Move the check before the signal

[PATCH 4/5] selftests/resctrl: Fix feature checks

2023-09-11 Thread Ilpo Järvinen
The MBA and CMT tests expect support of other features to be able to run. When platform only supports MBA but not MBM, MBA test will fail with: Failed to open total bw file: No such file or directory When platform only supports CMT but not CAT, CMT test will fail with: Failed to open bit mask

[GIT PULL] KUnit fixes update for Linux 6.6-rc2

2023-09-11 Thread Shuah Khan
Hi Linus, Please pull the following KUnit fixes update for Linux 6.6-rc2. This kunit update for Linux 6.6-rc2 consists of important fixes to possible memory leak, null-ptr-deref, wild-memory-access, and error path bugs. diff is attached. thanks, -- Shuah

Re: [PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-11 Thread Willy Tarreau
On Mon, Sep 11, 2023 at 04:26:41PM +0200, Thomas Weißschuh wrote: > Hi Willy! > > On 2023-09-11 08:04:49+0200, Willy Tarreau wrote: > > On Sun, Sep 10, 2023 at 09:29:01PM +0200, Thomas Weißschuh wrote: > > > Newer versions of glibc annotate the poll() function with > > > __attribute__(access)

[PATCH v5 4/8] selftests/net: Extract uring helpers to be reusable

2023-09-11 Thread Breno Leitao
Instead of defining basic io_uring functions in the test case, move them to a common directory, so, other tests can use them. This simplify the test code and reuse the common "mini" liburing infrastructure. This is basically a copy of what we have in io_uring_zerocopy_tx with some minor

[PATCH 2/2] drm/tests: Flag slow tests as such

2023-09-11 Thread Maxime Ripard
Kunit recently gained a speed attribute that allows to filter out slow tests. A slow test is defined in the documentation as a test taking more than a second to execute. Let's flag the few tests that are doing so on my machine when running: ./tools/testing/kunit/kunit.py run

[PATCH] tracing/user_events: fix long size check in the ABI selftest

2023-09-11 Thread Alexander Lobakin
The current check for 64-bit architecture is double-bugged. First of all, %BITS_PER_LONG is not available in the userspace, the underscored version from must be used. The following check: #if BITS_PER_LONG == 0 #error #endif triggers the error in this source file -- the macro is undefined

Re: [PATCH] selftests/nolibc: libc-test: avoid -Wstringop-overflow warnings

2023-09-11 Thread Thomas Weißschuh
On 2023-09-11 16:30:25+0200, Willy Tarreau wrote: > On Mon, Sep 11, 2023 at 04:26:41PM +0200, Thomas Weißschuh wrote: > > On 2023-09-11 08:04:49+0200, Willy Tarreau wrote: > > > On Sun, Sep 10, 2023 at 09:29:01PM +0200, Thomas Weißschuh wrote: > > > > Newer versions of glibc annotate the poll()

[PATCH 1/2] kunit: Warn if tests are slow

2023-09-11 Thread Maxime Ripard
Kunit recently gained support to setup attributes, the first one being the speed of a given test, then allowing to filter out slow tests. A slow test is defined in the documentation as taking more than one second. There's an another speed attribute called "super slow" but whose definition is less

Re: [PATCH RESEND v3 2/2] selftests/resctrl: Move run_benchmark() to a more fitting file

2023-09-11 Thread Reinette Chatre
Hi Maciej, On 9/1/2023 6:42 AM, Wieczor-Retman Maciej wrote: > resctrlfs.c file contains mostly functions that interact in some way This can just be "resctrlfs.c contains ..." (no need for "file") > with resctrl FS entries while functions inside resctrl_val.c deal with > measurements and

Re: [PATCH v2 1/3] selftests/hid: ensure we can compile the tests on kernels pre-6.3

2023-09-11 Thread Benjamin Tissoires
On Sep 11 2023, Eduard Zingerman wrote: > On Fri, 2023-09-08 at 22:22 +, Justin Stitt wrote: > > From: Benjamin Tissoires > > > > For the hid-bpf tests to compile, we need to have the definition of > > struct hid_bpf_ctx. This definition is an internal one from the kernel > > and it is

[PATCH 6.5 019/739] selftests/harness: Actually report SKIP for signal tests

2023-09-11 Thread Greg Kroah-Hartman
6.5-stable review patch. If anyone has any objections, please let me know. -- From: Kees Cook [ Upstream commit b3d46e11fec0c5a8972e5061bb1462119ae5736d ] Tests that were expecting a signal were not correctly checking for a SKIP condition. Move the check before the signal

Re: [PATCH RFC] selftests/rseq: fix kselftest Clang build warnings

2023-09-11 Thread Justin Stitt
On Sat, Sep 9, 2023 at 5:37 AM Mathieu Desnoyers wrote: > > On 9/8/23 19:03, Justin Stitt wrote: > > Hi, > > > > I am experiencing many warnings when trying to build > > tools/testing/selftests. > > > > Here's one such example from rseq tree: > > | param_test.c:1234:10: error: address argument