Re: [PATCH v2] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-14 Thread Chang S. Bae
On 3/14/2024 4:44 AM, Muhammad Usama Anjum wrote: Skip instead of failing when prerequisite conditions aren't fulfilled, such as invalid xstate values etc. This patch would make the tests show as skip when run by: make -C tools/testing/selftests/ TARGETS=x86 run_tests ... # timeout set

[PATCH] selftests/harness: Prevent infinite loop due to Assert in FIXTURE_TEARDOWN

2024-03-14 Thread Shengyu Li
This patch addresses an issue in the selftests/harness where an assertion within FIXTURE_TEARDOWN could trigger an infinite loop. The problem arises because the teardown procedure is meant to execute once, but the presence of failing assertions (ASSERT_EQ(0, 1)) leads to repeated attempts to exe

Re: [RFC PATCH v5 27/29] KVM: selftests: Propagate KVM_EXIT_MEMORY_FAULT to userspace

2024-03-14 Thread Chen, Zide
On 12/12/2023 12:47 PM, Shashar, Sagi wrote: > > > -Original Message- > From: Sagi Shahar > Sent: Tuesday, December 12, 2023 12:47 PM > To: linux-kselftest@vger.kernel.org; Ackerley Tng ; > Afranji, Ryan ; Aktas, Erdem ; > Sagi Shahar ; Yamahata, Isaku > Cc: Sean Christopherson ;

Re: [PATCH v2 08/13] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-03-14 Thread Ilpo Järvinen
On Thu, 14 Mar 2024, Maciej Wieczor-Retman wrote: > On 2024-03-11 at 15:52:25 +0200, Ilpo Järvinen wrote: > >diff --git a/tools/testing/selftests/resctrl/mbm_test.c > >b/tools/testing/selftests/resctrl/mbm_test.c > >index 17398cd3aace..ffbfcecf9bd6 100644 > >--- a/tools/testing/selftests/resctrl/m

Re: [PATCH v2 08/13] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-03-14 Thread Maciej Wieczor-Retman
Hi again :) On 2024-03-11 at 15:52:25 +0200, Ilpo Järvinen wrote: >diff --git a/tools/testing/selftests/resctrl/mbm_test.c >b/tools/testing/selftests/resctrl/mbm_test.c >index 17398cd3aace..ffbfcecf9bd6 100644 >--- a/tools/testing/selftests/resctrl/mbm_test.c >+++ b/tools/testing/selftests/resctr

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-14 Thread Guenter Roeck
On 3/14/24 08:02, Maxime Ripard wrote: On Thu, Mar 14, 2024 at 07:37:13AM -0700, Guenter Roeck wrote: On 3/14/24 06:36, Geert Uytterhoeven wrote: Hi Günter, On Tue, Mar 12, 2024 at 6:03 PM Guenter Roeck wrote: Some unit tests intentionally trigger warning backtraces by passing bad parameters

Re: [PATCH v1 5/5] selftests: KVM: SVM: Add Idle HLT intercept test

2024-03-14 Thread Sean Christopherson
On Thu, Mar 14, 2024, Manali Shukla wrote: > >> +#define VINTR_VECTOR 0x30 > >> +#define NUM_ITERATIONS 10 > > > > What's the runtime? If it's less than a second, then whatever, but if it's > > at > > all longer than that, then I'd prefer to use a lower default and make this > > user- >

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-14 Thread Maxime Ripard
On Thu, Mar 14, 2024 at 07:37:13AM -0700, Guenter Roeck wrote: > On 3/14/24 06:36, Geert Uytterhoeven wrote: > > Hi Günter, > > > > On Tue, Mar 12, 2024 at 6:03 PM Guenter Roeck wrote: > > > Some unit tests intentionally trigger warning backtraces by passing bad > > > parameters to kernel API fun

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-14 Thread Guenter Roeck
On 3/14/24 06:36, Geert Uytterhoeven wrote: Hi Günter, On Tue, Mar 12, 2024 at 6:03 PM Guenter Roeck wrote: Some unit tests intentionally trigger warning backtraces by passing bad parameters to kernel API functions. Such unit tests typically check the return value from such calls, not the exis

Re: [musl] Re: [PATCH v8 00/38] arm64/gcs: Provide support for GCS in userspace

2024-03-14 Thread Mark Brown
On Sat, Mar 02, 2024 at 03:57:02PM +0100, Szabolcs Nagy wrote: > * Mark Brown [2024-02-21 17:36:12 +]: > > > I said NOP but there's no reason it strictly needs to be a NOP. It > > > could instead do something reasonable to convey the state of racing > > > with shadow stack being disabled. >

Re: [PATCH 11/14] s390: Add support for suppressing warning backtraces

2024-03-14 Thread Guenter Roeck
On 3/14/24 00:57, Geert Uytterhoeven wrote: Hi Günter, On Tue, Mar 12, 2024 at 6:06 PM Guenter Roeck wrote: Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to th

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-14 Thread Geert Uytterhoeven
Hi Günter, On Tue, Mar 12, 2024 at 6:03 PM Guenter Roeck wrote: > Some unit tests intentionally trigger warning backtraces by passing bad > parameters to kernel API functions. Such unit tests typically check the > return value from such calls, not the existence of the warning backtrace. > > Such

Re: [PATCH] selftests/mm: virtual_address_range: Switch to ksft_exit_fail_msg

2024-03-14 Thread Muhammad Usama Anjum
Thanks for the patch. The patch should have been sent to a separate new thread. On 3/14/24 5:22 PM, Dev Jain wrote: > mmap() must not succeed in validate_lower_address_hint(), for if it does, it > is a bug in mmap() itself. Reflect this behaviour with ksft_exit_fail_msg(). > While at it, do some f

[PATCH] selftests/mm: virtual_address_range: Switch to ksft_exit_fail_msg

2024-03-14 Thread Dev Jain
mmap() must not succeed in validate_lower_address_hint(), for if it does, it is a bug in mmap() itself. Reflect this behaviour with ksft_exit_fail_msg(). While at it, do some formatting changes. Signed-off-by: Dev Jain --- tools/testing/selftests/mm/virtual_address_range.c | 12 +--- 1 f

[PATCH v2] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-14 Thread Muhammad Usama Anjum
Skip instead of failing when prerequisite conditions aren't fulfilled, such as invalid xstate values etc. This patch would make the tests show as skip when run by: make -C tools/testing/selftests/ TARGETS=x86 run_tests ... # timeout set to 45 # selftests: x86: amx_64 # # xstate cpuid: in

[PATCH v2] tools/testing/selftests/bpf/test_tc_tunnel.sh: Prevent client connect before server bind

2024-03-14 Thread Alessandro Carminati (Red Hat)
In some systems, the netcat server can incur in delay to start listening. When this happens, the test can randomly fail in various points. This is an example error message: # ip gre none gso # encap 192.168.1.1 to 192.168.1.2, type gre, mac none len 2000 # test basic connectivity # Nca

[PATCH 2/2] selftests: x86: test_mremap_vdso: conform test to TAP format output

2024-03-14 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Signed-off-by: Muhammad Usama Anjum --- .../testing/selftests/x86/test_mremap_vdso.c | 43 +-- 1 file changed, 21 insertions(+), 22 deletions(

[PATCH 1/2] selftests: x86: test_vsyscall: conform test to TAP format output

2024-03-14 Thread Muhammad Usama Anjum
Conform the layout, informational and status messages to TAP. No functional change is intended other than the layout of output messages. Without using TAP messages, the passed/failed/skip test names cannot be found. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/x86/test_vsyscal

[PATCH] selftests: mm: restore settings from only parent process

2024-03-14 Thread Muhammad Usama Anjum
The atexit() is called from parent process as well as forked processes. Hence the child restores the settings at exit while the parent is still executing. Fix this by checking pid of atexit() calling process and only restore THP number from parent process. Fixes: c23ea61726d5 ("selftests/mm: prote

Re: [PATCH v3 4/5] selftests/mm: protection_keys: save/restore nr_hugepages settings

2024-03-14 Thread Joey Gouly
On Wed, Mar 13, 2024 at 11:12:58PM +0500, Muhammad Usama Anjum wrote: > On 3/13/24 7:58 PM, Joey Gouly wrote: > > Hi Muhammad, > > > > On Thu, Jan 25, 2024 at 08:46:07PM +0500, Muhammad Usama Anjum wrote: > >> Save and restore nr_hugepages before changing it during the test. A test > >> should not

Re: [PATCH] selftests/exec: execveat: Improve debug reporting

2024-03-14 Thread Muhammad Usama Anjum
On 3/13/24 11:56 PM, Kees Cook wrote: > Children processes were reporting their status, duplicating the > parent's. Remove that, and add some additional details about the test > execution. > > Signed-off-by: Kees Cook > --- > Cc: Eric Biederman > Cc: Shuah Khan > Cc: Mark Brown > Cc: Muhammad

Re: [Test Failure Report] exec: Test failures in execveat

2024-03-14 Thread Muhammad Usama Anjum
On 3/14/24 8:05 AM, Kees Cook wrote: > On Mon, Mar 11, 2024 at 10:08:36PM +0500, Muhammad Usama Anjum wrote: >> On 3/8/24 1:39 AM, Kees Cook wrote: >>> On Thu, Mar 07, 2024 at 02:22:27PM +0500, Muhammad Usama Anjum wrote: I've tested this patch. Still getting same failures. >>> >>> Okay, thank

Re: [PATCH v2 12/12] selftests/mm: virtual_address_range: conform to TAP format output

2024-03-14 Thread Muhammad Usama Anjum
On 3/14/24 10:00 AM, Dev Jain wrote: > > On 2/2/24 17:01, Muhammad Usama Anjum wrote: >> Conform the layout, informational and status messages to TAP. No >> functional change is intended other than the layout of output messages. >> >> Signed-off-by: Muhammad Usama Anjum >> --- >>   .../selftests/

Re: [PATCH 11/14] s390: Add support for suppressing warning backtraces

2024-03-14 Thread Geert Uytterhoeven
Hi Günter, On Tue, Mar 12, 2024 at 6:06 PM Guenter Roeck wrote: > Add name of functions triggering warning backtraces to the __bug_table > object section to enable support for suppressing WARNING backtraces. > > To limit image size impact, the pointer to the function name is only added > to the _

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-14 Thread Naresh Kamboju
On Tue, 12 Mar 2024 at 22:33, Guenter Roeck wrote: > This series is based on the RFC patch and subsequent discussion at > https://patchwork.kernel.org/project/linux-kselftest/patch/02546e59-1afe-4b08-ba81-d94f3b691c9a@moroto.mountain/ > and offers a more comprehensive solution of the problem di