Re: [PATCH v3 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-04-24 Thread Shuah Khan
On 4/8/24 10:32, Ilpo Järvinen wrote: Hi all, This series does a number of cleanups into resctrl_val() and generalizes it by removing test name specific handling from the function. One of the changes improves MBA/MBM measurement by narrowing down the period the resctrl FS derived memory bandwid

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/24/24 09:05, Nathan Chancellor wrote: On Wed, Apr 24, 2024 at 07:44:31AM -0600, Shuah Khan wrote: On 4/17/24 09:37, Nathan Chancellor wrote: Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call

Re: [PATCH] selftests: Make ksft_exit functions return void instead of int

2024-04-24 Thread Shuah Khan
On 4/24/24 10:10, Nathan Chancellor wrote: On Wed, Apr 24, 2024 at 10:00:12AM -0600, Shuah Khan wrote: Signed-off-by: Nathan Chancellor --- clone patch tools/testing/selftests/clone3/clone3_clear_sighand.c| 2 +- tools/testing/selftests/clone3/clone3_set_tid.c

Re: [PATCH v2 00/10] selftests: Make ksft_exit functions return void instead of int

2024-04-25 Thread Shuah Khan
On 4/24/24 11:24, Nathan Chancellor wrote: Hi all, Commit f7d5bcd35d42 ("selftests: kselftest: Mark functions that unconditionally call exit() as __noreturn") marked functions that call exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it sho

Re: [PATCH] Documentation: kselftest: fix codeblock

2024-05-03 Thread Shuah Khan
On 4/29/24 10:50, Yo-Jung (Leo) Lin wrote: Add extra colon to mark command in the next paragraph as codeblock Signed-off-by: Yo-Jung (Leo) Lin <0xf...@gmail.com> --- Documentation/dev-tools/kselftest.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/dev-too

Re: [PATCH v22 5/5] ring-buffer/selftest: Add ring-buffer mapping test

2024-05-03 Thread Shuah Khan
On 4/30/24 05:13, Vincent Donnefort wrote: This test maps a ring-buffer and validate the meta-page after reset and after emitting few events. Changelog needs to be imperative - refer to the following: https://www.kernel.org/doc/html/latest/process/submitting-patches.html Update the change lo

Re: [PATCH] selftests/resctrl: fix clang build failure: use LOCAL_HDRS

2024-05-03 Thread Shuah Khan
On 5/3/24 12:39, Reinette Chatre wrote: On 5/2/2024 7:17 PM, John Hubbard wrote: First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tools/testing/selftests

Re: [PATCH] selftests/binderfs: use the Makefile's rules, not Make's implicit rules

2024-05-03 Thread Shuah Khan
On 5/3/24 03:10, Christian Brauner wrote: On Thu, May 02, 2024 at 06:58:20PM -0700, John Hubbard wrote: First of all, in order to build with clang at all, one must first apply Valentin Obst's build fix for LLVM [1]. Once that is done, then when building with clang, via: make LLVM=1 -C tool

Re: [PATCH] selftest/tty: Use harness framework in tty

2024-05-03 Thread Shuah Khan
On 4/30/24 09:05, Shengyu Li wrote: Similarly, this one is based on automated tools and a very small percentage of manual modifications to automatically refactor the version that uses kselftest_harness.h, which is logically clearer. Similar to what? How does refactoring help? Follow the impe

Re: [PATCH v2] selftest/tty: Use harness framework in tty

2024-05-03 Thread Shuah Khan
On 4/30/24 10:18, Shengyu Li wrote: Similarly, this one is based on automated tools and a very small percentage of manual modifications to automatically refactor the version that uses kselftest_harness.h, which is logically clearer. Signed-off-by: Shengyu Li --- v2: Fixed the last Assert See

Re: [PATCH] selftests: default to host arch for LLVM builds

2024-05-03 Thread Shuah Khan
On 4/28/24 06:08, Valentin Obst wrote: Align the behavior for gcc and clang builds by interpreting unset `ARCH` and `CROSS_COMPILE` variables in `LLVM` builds as a sign that the user wants to build for the host architecture. This patch preserves the properties that setting the `ARCH` variable to

Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using

2024-05-08 Thread Shuah Khan
On 5/7/24 15:38, Edward Liaw wrote: 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to either be defined prior to including headers or with the -D_GNU_SOURCE flag passed to the compiler. v1:

Re: [PATCH v2 0/5] Define _GNU_SOURCE for sources using

2024-05-09 Thread Shuah Khan
On 5/9/24 00:13, Edward Liaw wrote: On Wed, May 8, 2024 at 4:10 PM Shuah Khan wrote: On 5/7/24 15:38, Edward Liaw wrote: 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs _GNU_SOURCE to

[GIT PULL] nolibc changes for Linux 6.10-rc1

2024-05-13 Thread Shuah Khan
Hi Linus, Please pull the nolibc update for Linux 6.10-rc1. This nolibc update for Linux 6.10-rc1 - adds support for uname(2) - removes open-coded strnlen() - exports strlen() - adds tests for strlcat() and strlcpy() - fixes memory error in realloc() - fixes strlcat() return code and size usage

[GIT PULL] KUnit update for Linux 6.10-rc1

2024-05-13 Thread Shuah Khan
Hi Linus, Please pull the following KUnit next update for Linux 6.10-rc1. This kunit update for Linux 6.10-rc1 consists of: - fix to race condition in try-catch completion - change to __kunit_test_suites_init() to exit early if there is nothing to test - change to string-stream-test to use KU

Re: [GIT PULL] Kselftest fixes for v6.9

2024-05-13 Thread Shuah Khan
On 5/12/24 04:56, Mickaël Salaün wrote: Hi Linus, Without reply from Shuah, and given the importance of these fixes [1], here is a PR to fix Kselftest (broken since v6.9-rc1) for at least KVM, pidfd, and Landlock. I cannot test against all kselftests though. This has been in linux-next since t

[GIT PULL] Kselftest update for Linux 6.10-rc1

2024-05-13 Thread Shuah Khan
Hi Linus, Please pull the kselftest update for Linux 6.10-rc1. This kselftest update for Linux 6.10-rc1 consists of: - changes to make framework and tests reporting KTAP compliant - changes to make ktap_helpers and power_supply test POSIX compliant - adds ksft_exit_fail_perror() to include erro

Re: [PATCH v1 0/4] add tests to verify IFS (In Field Scan) driver functionality

2024-05-14 Thread Shuah Khan
On 4/29/24 21:31, Pengfei Xu wrote: To verify IFS (In Field Scan [1]) driver functionality, add the following 6 test cases: 1. Verify that IFS sysfs entries are created after loading the IFS module 2. Check if loading an invalid IFS test image fails and loading a valid one succeeds

Re: -D_GNU_SOURCE kselftest breakage in mainline

2024-05-16 Thread Shuah Khan
On 5/16/24 08:02, Mark Brown wrote: Hi, I'm seeing quite a lot of breakage in mainline as a result of daef47b89efd0b7 ("selftests: Compile kselftest headers with -D_GNU_SOURCE") and daef47b89efd0 ("selftests: Compile kselftest headers with -D_GNU_SOURCE") - thus far I've found that the use of st

Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE

2024-05-16 Thread Shuah Khan
On 5/13/24 11:02, Tejun Heo wrote: On Fri, May 10, 2024 at 12:06:25AM +, Edward Liaw wrote: _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed-off-by: Edward Liaw Applied to cgroup/for-6.10. Thanks. Hi Tejun, Please don't include this

Re: [PATCH v4 00/66] Define _GNU_SOURCE for sources using

2024-05-16 Thread Shuah Khan
On 5/9/24 18:06, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source code. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs

Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE

2024-05-16 Thread Shuah Khan
On 5/16/24 10:21, Tejun Heo wrote: On Thu, May 16, 2024 at 09:50:06AM -0600, Shuah Khan wrote: On 5/13/24 11:02, Tejun Heo wrote: On Fri, May 10, 2024 at 12:06:25AM +, Edward Liaw wrote: _GNU_SOURCE is provided by lib.mk, so it should be dropped to prevent redefinition warnings. Signed

Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE

2024-05-16 Thread Shuah Khan
On 5/16/24 11:45, Tejun Heo wrote: Hello, On Thu, May 16, 2024 at 10:31:13AM -0600, Shuah Khan wrote: I am exploring options and leaning towards reverting the patch daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE") Your amending the PR helps me if I have to s

Re: -D_GNU_SOURCE kselftest breakage in mainline

2024-05-16 Thread Shuah Khan
On 5/16/24 09:09, Mark Brown wrote: On Thu, May 16, 2024 at 08:53:52AM -0600, Shuah Khan wrote: On 5/16/24 08:02, Mark Brown wrote: I'm seeing quite a lot of breakage in mainline as a result of daef47b89efd0b7 ("selftests: Compile kselftest headers with -D_GNU_SOURCE") an

Re: [PATCH v4 08/66] selftests/cgroup: Drop define _GNU_SOURCE

2024-05-16 Thread Shuah Khan
On 5/16/24 12:05, Shuah Khan wrote: On 5/16/24 11:45, Tejun Heo wrote: Hello, On Thu, May 16, 2024 at 10:31:13AM -0600, Shuah Khan wrote: I am exploring options and leaning towards reverting the patch daef47b89efd ("selftests: Compile kselftest headers with -D_GNU_SOURCE") Your am

Re: [PATCH] kselftest/alsa: Ensure _GNU_SOURCE is defined

2024-05-20 Thread Shuah Khan
On 5/17/24 02:35, Takashi Iwai wrote: On Thu, 16 May 2024 17:27:33 +0200, Mark Brown wrote: The pcmtest driver tests use the kselftest harness which requires that _GNU_SOURCE is defined but nothing causes it to be defined. Since the KHDR_INCLUDES Makefile variable has had the required define a

[GIT PULL] Kselftest fixes for Linux 6.10-rc1

2024-05-20 Thread Shuah Khan
ailures and warnings. ---- Shuah Khan (3): Revert "selftests: Compile kselftest headers with -D_GNU_SOURCE" Revert "selftests/sgx: Include KHDR_INCLUDES in Makefile" Revert "selftests/cgroup: Drop define _G

Re: [PATCH] tracing/selftests: Fix kprobe event name test for .isra. functions

2024-05-21 Thread Shuah Khan
On 5/20/24 19:51, Steven Rostedt wrote: On Tue, 21 May 2024 10:49:19 +0900 Masami Hiramatsu (Google) wrote: It is listed twice. This causes the attached kprobe to it to fail which in turn fails the test. Instead of just picking the function function that is found in available_filter_functions,

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/21/24 18:56, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source code. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into kselftest_harness.h, which is a GNU extension and needs

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 01:42, Paolo Abeni wrote: On Wed, 2024-05-22 at 00:56 +, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source code. 809216233555 ("selftests/harness: remove use of LINE_MAX") introduced asprintf into

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 11:44, Edward Liaw wrote: On Wed, May 22, 2024 at 10:13 AM Jakub Kicinski wrote: On Wed, 22 May 2024 10:19:33 -0600 Shuah Khan wrote: On 5/21/24 18:56, Edward Liaw wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-22 Thread Shuah Khan
On 5/22/24 17:32, patchwork-bot+linux-ri...@kernel.org wrote: Hello: This series was applied to riscv/linux.git (fixes) by Tejun Heo : On Wed, 22 May 2024 00:56:46 + you wrote: Centralizes the definition of _GNU_SOURCE into KHDR_INCLUDES and removes redefinitions of _GNU_SOURCE from source

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-23 Thread Shuah Khan
On 5/22/24 20:28, John Hubbard wrote: On 5/22/24 10:46 AM, Edward Liaw wrote: On Wed, May 22, 2024 at 4:21 AM Mark Brown wrote: On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: ... You've not provided a Signed-off-by for this so people can't do anything with it, please see Docume

Re: [PATCH v5 00/68] Define _GNU_SOURCE for sources using

2024-05-23 Thread Shuah Khan
On 5/22/24 17:36, Shuah Khan wrote: On 5/22/24 17:32, patchwork-bot+linux-ri...@kernel.org wrote: Hello: This series was applied to riscv/linux.git (fixes) by Tejun Heo : Hi Tejun, I noticed you weren't on the email I sent in response. Please drop this series. There is simpler fix t

Re: [PATCH v5 02/68] kselftest: Desecalate reporting of missing _GNU_SOURCE

2024-05-23 Thread Shuah Khan
On 5/23/24 12:12, Edward Liaw wrote: On Thu, May 23, 2024 at 11:02 AM Shuah Khan wrote: On 5/22/24 20:28, John Hubbard wrote: On 5/22/24 10:46 AM, Edward Liaw wrote: On Wed, May 22, 2024 at 4:21 AM Mark Brown wrote: On Wed, May 22, 2024 at 12:56:48AM +, Edward Liaw wrote: ... You&#x

Re: [PATCH] selftests/overlayfs: Fix build error on ppc64

2024-05-29 Thread Shuah Khan
On 5/20/24 20:26, Michael Ellerman wrote: Fix build error on ppc64: dev_in_maps.c: In function ‘get_file_dev_and_inode’: dev_in_maps.c:60:59: error: format ‘%llu’ expects argument of type ‘long long unsigned int *’, but argument 7 has type ‘__u64 *’ {aka ‘long unsigned int *’} [-Werro

Re: [PATCH] selftests: cachestat: Fix build warnings on ppc64

2024-05-29 Thread Shuah Khan
On 5/20/24 21:01, Michael Ellerman wrote: Fix warnings like: test_cachestat.c: In function ‘print_cachestat’: test_cachestat.c:30:38: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] By swi

Re: [PATCH] selftests/openat2: Fix build warnings on ppc64

2024-05-29 Thread Shuah Khan
On 5/20/24 21:03, Michael Ellerman wrote: Fix warnings like: openat2_test.c: In function ‘test_openat2_flags’: openat2_test.c:303:73: warning: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 5 has type ‘__u64’ {aka ‘long unsigned int’} [-Wformat=] By sw

Re: [PATCH v2 0/3] selftests/futex: clang-inspired fixes

2024-05-30 Thread Shuah Khan
On 5/28/24 20:29, John Hubbard wrote: Hi, Here's a few fixes that are part of my effort to get all selftests building cleanly under clang. Plus one that I noticed by inspection. Changes since the first version: 1) Rebased onto Linux 6.10-rc1 2) Added Reviewed-by's. ...and it turns out that al

Re: [PATCH 2/2] selftests/lib.mk: silence some clang warnings that gcc already ignores

2024-05-30 Thread Shuah Khan
On 5/28/24 20:08, John Hubbard wrote: gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. These warnings are not useful for kselftests, so silence them for the clang builds as well: Please you add more information on why they aren't useful for kselftest

Re: [PATCH v2 0/6] selftests/x86: fix build errors and warnings found via clang

2024-05-30 Thread Shuah Khan
On 5/27/24 15:00, John Hubbard wrote: Hi, Just a bunch of build and warnings fixes that show up when building with clang. Some of these depend on each other, so I'm sending them as a series. Changes since the first version: 1) Rebased onto Linux 6.10-rc1 x86 test patches usually go through x

Re: [PATCH v2 1/3] selftests/futex: don't redefine .PHONY targets (all, clean)

2024-05-30 Thread Shuah Khan
On 5/28/24 20:29, John Hubbard wrote: The .PHONY targets "all" and "clean" are both defined in the file that is included in the very next line: ../lib.mk. What problems are you seeing without this patch? If I recall correctly, futex needs these defined. Please provide information on why this

Re: [PATCH v2 2/3] selftests/futex: don't pass a const char* to asprintf(3)

2024-05-30 Thread Shuah Khan
On 5/28/24 20:29, John Hubbard wrote: When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang issues a warning, because test_name is passed into asprintf(3), which then changes it. Please include the warning in the commit log. Fix this by simply removing the con

Re: [PATCH v2 3/3] selftests/futex: pass _GNU_SOURCE without a value to the compiler

2024-05-30 Thread Shuah Khan
On 5/28/24 20:29, John Hubbard wrote: It's slightly better to set _GNU_SOURCE in the source code, but if one must do it via the compiler invocation, then the best way to do so is this: $(CC) -D_GNU_SOURCE= ...because otherwise, if this form is used: $(CC) -D_GNU_SOURCE ...then that

Re: [PATCH v2 0/3] selftests/futex: clang-inspired fixes

2024-05-30 Thread Shuah Khan
On 5/30/24 08:23, Shuah Khan wrote: On 5/28/24 20:29, John Hubbard wrote: Hi, Here's a few fixes that are part of my effort to get all selftests building cleanly under clang. Plus one that I noticed by inspection. Changes since the first version: 1) Rebased onto Linux 6.10-rc1 2)

Re: [PATCH v2 1/3] selftests/futex: don't redefine .PHONY targets (all, clean)

2024-05-30 Thread Shuah Khan
On 5/30/24 13:13, John Hubbard wrote: On 5/30/24 12:03 PM, Shuah Khan wrote: On 5/28/24 20:29, John Hubbard wrote: The .PHONY targets "all" and "clean"  are both defined in the file that is included in the very next line: ../lib.mk. What problems are you seeing withou

Re: [PATCH v2 2/3] selftests/futex: don't pass a const char* to asprintf(3)

2024-05-30 Thread Shuah Khan
On 5/30/24 13:16, John Hubbard wrote: On 5/30/24 12:04 PM, Shuah Khan wrote: On 5/28/24 20:29, John Hubbard wrote: When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang issues a warning, because test_name is passed into asprintf(3), which then changes it

Re: [PATCH 2/2] selftests/lib.mk: silence some clang warnings that gcc already ignores

2024-05-31 Thread Shuah Khan
On 5/30/24 13:28, John Hubbard wrote: On 5/30/24 7:25 AM, Shuah Khan wrote: On 5/28/24 20:08, John Hubbard wrote: gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. These warnings are not useful for kselftests, so silence them for the clang builds as

Re: [PATCH 2/2] selftests/tracing: Fix to check the required syscall event

2024-05-31 Thread Shuah Khan
return `unsupported` result. Fixes: 297e1dcdca3d ("selftests/ftrace: Add selftest for testing duplicate eprobes and kprobes") Signed-off-by: Masami Hiramatsu (Google) Signed-off-by: Shuah Khan thanks, -- Shuah

Re: [PATCH 1/2] selftests/tracing: Fix event filter test to retry up to 10 times

2024-05-31 Thread Shuah Khan
On 5/31/24 03:43, Masami Hiramatsu (Google) wrote: From: Masami Hiramatsu (Google) Commit eb50d0f250e9 ("selftests/ftrace: Choose target function for filter test from samples") choose the target function from samples, but sometimes this test failes randomly because the target function does not

Re: [PATCH] list: test: remove unused struct 'klist_test_struct'

2024-05-31 Thread Shuah Khan
On 5/31/24 12:58, Dr. David Alan Gilbert wrote: * Muhammad Usama Anjum (usama.an...@collabora.com) wrote: On 5/31/24 8:18 PM, li...@treblig.org wrote: From: "Dr. David Alan Gilbert" 'klist_test_struct' has been unused since the original commit 57b4f760f94d ("list: test: Test the klist structu

Re: [PATCH v3 0/3] selftests/futex: clang-inspired fixes

2024-05-31 Thread Shuah Khan
On 5/31/24 14:07, John Hubbard wrote: Hi, Here's a few fixes that are part of my effort to get all selftests building cleanly under clang. Plus one that I noticed by inspection. Changes since v2: 1) Added a sentence to the .PHONY patch, to show that it is removing duplicate code. 2) Added

[GIT PULL] Kselftest fixes for Linux 6.10-rc3

2024-06-04 Thread Shuah Khan
Hi Linus, Please pull this urgent kselftest fixes update for Linux 6.10-rc3. This kselftest fixes update consists of fixes to build warnings in several tests and fixes to ftrace tests. diff for pull request is attached. thanks, -- Shuah

Re: [GIT PULL] Kselftest fixes for Linux 6.10-rc3

2024-06-04 Thread Shuah Khan
On 6/4/24 09:37, Shuah Khan wrote: Hi Linus, Please pull this urgent kselftest fixes update for Linux 6.10-rc3. Sorry for the copy and paste "urgent" - this is a normal fixes PR. thanks, -- Shuah

[GIT PULL] Kselftest fixes update for Linux 6.11-rc3

2024-08-05 Thread Shuah Khan
Hi Linus, Please pull the kselftest fixes update for Linux 6.11-rc3. This kselftest fixes update consists of a single fix to the conditional in ksft.py script which incorrectly flags a test suite failed when there are skipped tests in the mix. The logic is fixed to take skipped tests into accoun

Re: [PATCH RFT v7 0/9] fork: Support shadow stacks in clone3()

2024-08-05 Thread Shuah Khan
91501f017b change-id: 20231019-clone3-shadow-stack-15d40d2bf536 Best regards, For selftests: Acked-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v2] kselftest/devices/probe: Fix SyntaxWarning in regex strings for Python 3

2024-08-05 Thread Shuah Khan
On 8/5/24 04:37, Alessandro Zanni wrote: Insert raw strings to prevent Python3 from interpreting string literals as Unicode strings and, consequently, '\d' as an invalid escaped sequence. Avoid the 'SyntaxWarning: invalid escape sequence '\d'' warning for Python versions greater than 3.6. Ch

Re: [PATCH] selftests: kvm: fix mkdir error when building for non-supported arch

2024-08-06 Thread Shuah Khan
On 8/6/24 06:10, Muhammad Usama Anjum wrote: The mkdir generates an error when kvm suite is build for non-supported built unsupported architecture such as arm. Fix it by ignoring the error from mkdir. mkdir: missing operand Try 'mkdir --help' for more information. Simply suppressing the me

Re: [PATCH v2 0/2] selftests: harness: refactor __constructor_order

2024-08-06 Thread Shuah Khan
On 8/5/24 22:27, Kees Cook wrote: On Sat, Jul 27, 2024 at 11:37:35PM +0900, Masahiro Yamada wrote: This series refactors __constructor_order because __constructor_order_last() is unneeded. No code change since v1. I reworded "reverse-order" to "backward-order" in commit description. Masahiro

Re: [PATCH] selftests/uprobes: Add a basic uprobe testcase

2024-08-07 Thread Shuah Khan
On 8/7/24 14:36, Steven Rostedt wrote: On Fri, 24 May 2024 09:49:55 +0900 "Masami Hiramatsu (Google)" wrote: From: Masami Hiramatsu (Google) Add a basic uprobe testcase which checks whether add/remove/trace operations works on /bin/sh. Signed-off-by: Masami Hiramatsu (Google) Reviewed-by

Re: [PATCH] tracing/selftests: Run the ownership test twice

2024-08-07 Thread Shuah Khan
On 8/7/24 14:29, Steven Rostedt wrote: On Fri, 14 Jun 2024 12:41:51 -0400 Steven Rostedt wrote: Shuah, Can you take this through your tree? Ping! -- Steve Sorry for the delay. Applied it o linux-kselftest next for Linux 6.12-rc1. thanks, -- Shuah

Re: [PATCH v2 00/15] tools/nolibc: improve LLVM/clang support

2024-08-07 Thread Shuah Khan
s changed, 83 insertions(+), 48 deletions(-) --- base-commit: ae1f550efc11eaf1496c431d9c6e784cb49124c5 change-id: 20240727-nolibc-llvm-3fad68590d4c Best regards, Looks good to me. For selftests patches: Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] selftests/rseq/Makefile: fix relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 09:13, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to

Re: [PATCH] selftests/sched/Makefile: remove relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 09:16, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. However, the s

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-08 Thread Shuah Khan
On 8/8/24 08:57, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it to

Re: [PATCH] selftests: memfd_secret: don't build memfd_secret test on unsupported arches

2024-08-09 Thread Shuah Khan
M_MERGE_TIME_HUGE_PAGES test with size of 100 CATEGORY="ksm" run_test ./ksm_tests -H -s 100 Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] selftests/alsa/Makefile: fix relative rpath usage

2024-08-09 Thread Shuah Khan
On 8/8/24 19:00, Eugene Syromiatnikov wrote: On Thu, Aug 08, 2024 at 02:20:21PM -0600, Shuah Khan wrote: Wouldn't make sense to fix fix this in selftests main Makefile instead of changing the all the test makefiles As of now, the usage of rpath is localised, so it is relatively ea

Re: [PATCH 2/2] selftests/mm: Do not fail test for a single migration failure

2024-08-09 Thread Shuah Khan
On 8/9/24 04:31, Dev Jain wrote: Do not fail the test for just a single instance of migration failure, since migration is a best-effort service. The cover letter says: "Given that migration is a best-effort service, it is wrong to fail the test for just a single failure; hence, fail the test a

Re: [PATCH] selftests/mm: compaction_test: Fix off by one in check_compaction()

2024-08-09 Thread Shuah Khan
efine? - sprintf(init_nr_hugepages, "%lu", initial_nr_hugepages); + snprintf(init_nr_hugepages, sizeof(init_nr_hugepages), +"%lu", initial_nr_hugepages); /* We want to test with 80% of available memory. Else, OOM killer comes in to play */ Wi

Re: [PATCH 2/2] selftests: rust: config: disable GCC_PLUGINS

2024-08-11 Thread Shuah Khan
On 8/10/24 04:34, Miguel Ojeda wrote: On Fri, Aug 2, 2024 at 2:45 PM Anders Roxell wrote: CONFIG_RUST depends on !CONFIG_GCC_PLUGINS. Disable CONFIG_GCC_PLUGINS in rust/config file to make sure it doesn't get enabled. Signed-off-by: Anders Roxell Acked-by: Miguel Ojeda When https://lore

Re: [PATCH 1/2] selftests: rust: config: add trailing newline

2024-08-11 Thread Shuah Khan
On 8/10/24 04:33, Miguel Ojeda wrote: On Fri, Aug 2, 2024 at 2:45 PM Anders Roxell wrote: If adding multiple config files to the merge_config.sh script and rust/config is the fist one, then the last config fragment in this file and the first config fragment in the second file wont be set, sinc

Re: [PATCH] kselftest/cgroup: Add missing newline in test_zswap.c

2024-08-12 Thread Shuah Khan
) { - ksft_print_msg("zswpwb_after is %ld while wb is %s", + ksft_print_msg("zswpwb_after is %ld while wb is %s\n", zswpwb_after, wb ? "enabled" : "disabled"); goto out; } The change looks good

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-12 Thread Shuah Khan
On 8/9/24 02:45, Ilpo Järvinen wrote: Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: On 8/9/24 12:23 PM, Ilpo Järvinen wrote: On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: This test doesn't have support for other architectures. Altough resctrl is supported on x86 and ARM, b

Re: [PATCH v2] selftests: fix relative rpath usage

2024-08-12 Thread Shuah Khan
On 8/12/24 10:56, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the executable directory, which will lead in incorrect resolution when the test executables are run from elsewhere. Changing it t

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-13 Thread Shuah Khan
On 8/12/24 18:05, Reinette Chatre wrote: Hi Shuah, On 8/12/24 3:49 PM, Shuah Khan wrote: On 8/9/24 02:45, Ilpo Järvinen wrote: Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: On 8/9/24 12:23 PM, Ilpo Järvinen wrote: On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: This test

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-13 Thread Shuah Khan
On 8/13/24 01:39, Ilpo Järvinen wrote: On Mon, 12 Aug 2024, Reinette Chatre wrote: On 8/12/24 3:49 PM, Shuah Khan wrote: On 8/9/24 02:45, Ilpo Järvinen wrote: Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: On 8/9/24 12:23 PM, Ilpo Järvinen wrote: On Fri, 9 Aug 2024

Re: [PATCH v2] selftests: fix relative rpath usage

2024-08-14 Thread Shuah Khan
On 8/13/24 10:33, Eugene Syromiatnikov wrote: On Mon, Aug 12, 2024 at 05:03:45PM -0600, Shuah Khan wrote: On 8/12/24 10:56, Eugene Syromiatnikov wrote: The relative RPATH ("./") supplied to linker options in CFLAGS is resolved relative to current working directory and not the

Re: [PATCH v3 3/3] selftests/tracing: Add hist poll() support test

2024-08-14 Thread Shuah Khan
On 8/13/24 18:11, Masami Hiramatsu (Google) wrote: From: Masami Hiramatsu (Google) Add a testcase for poll() on hist file. This introduces a helper binary to the ftracetest, because there is no good way to reliably execute poll() on hist file. Signed-off-by: Masami Hiramatsu (Google) --- Ch

Re: [PATCH] selftests/ftrace: Add required dependency for kprobe tests

2024-08-14 Thread Shuah Khan
On 8/13/24 18:53, Masami Hiramatsu (Google) wrote: Hi Shuah, Can you pick this? I confirmed this can be applied on v6.11-rc3. On Thu, 13 Jun 2024 07:12:10 +0900 "Masami Hiramatsu (Google)" wrote: From: Masami Hiramatsu (Google) kprobe_args_{char,string}.tc are using available_filter_func

Re: [PATCH] selftests: filesystems: fix warn_unused_result build warnings

2024-08-16 Thread Shuah Khan
On 8/10/24 07:53, Abhinav Jain wrote: Add return value checks for read & write calls in test_listmount_ns function. This patch resolves below compilation warnings: ``` statmount_test_ns.c: In function ‘test_listmount_ns’: statmount_test_ns.c:322:17: warning: ignoring return value of ‘write’ dec

Re: [PATCH v4 3/3] selftests/tracing: Add hist poll() support test

2024-08-16 Thread Shuah Khan
== BUFSIZE); + + ret = poll(&pfd, 1, timeout); + if (ret < 0 && errno != EINTR) { + perror("poll"); + return -1; + } + close(pfd.fd); + + /* If timeout happned, return code is 0 */ Looks like you missed this one :) Otherwise looks good to me. With this fixed Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v2] selftests: fix relative rpath usage

2024-08-19 Thread Shuah Khan
On 8/14/24 06:25, Eugene Syromiatnikov wrote: On Wed, Aug 14, 2024 at 05:14:08AM -0600, Shuah Khan wrote: On 8/13/24 10:33, Eugene Syromiatnikov wrote: On Mon, Aug 12, 2024 at 05:03:45PM -0600, Shuah Khan wrote: On 8/12/24 10:56, Eugene Syromiatnikov wrote: The relative RPATH ("./"

Re: [PATCH v2] selftests: kvm: fix mkdir error when building for unsupported arch

2024-08-19 Thread Shuah Khan
Looks good to me. Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH 0/3] selftests: Fix cpuid / vendor checking build issues

2024-08-20 Thread Shuah Khan
On 8/13/24 04:45, Ilpo Järvinen wrote: First, generalize resctrl selftest non-contiguous CAT check to not assume non-AMD vendor implies Intel. Second, improve kselftest common parts and resctrl selftest such that the use of __cpuid_count() does not lead into a build failure (happens at least on A

Re: [PATCH] selftests/ftrace: Fix test to handle both old and new kernels

2024-08-20 Thread Shuah Khan
On 8/19/24 13:20, Steven Rostedt wrote: On Fri, 14 Jun 2024 12:43:22 -0400 Steven Rostedt wrote: Shuah, Can you take this through your tree? Ping. -- Steve Thanks, -- Steve On Wed, 15 May 2024 01:36:20 -0400 Steven Rostedt wrote: From: "Steven Rostedt (Google)" The function "sch

Re: [PATCH v1] tools:mm:Check mmap based on return values

2024-08-21 Thread Shuah Khan
WRITE, MAP_ANONYMOUS|MAP_PRIVATE, -1, 0); - if (!map) + if (map == MAP_FAILED) ksft_exit_fail_msg("anon mmap failed\n"); } else { test_fd = open(fname, O_RDWR | O_CREAT, 0664); With the above fixed: Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v5 1/2] selftests: Rename sigaltstack to generic signal

2024-08-21 Thread Shuah Khan
On 8/21/24 00:15, Dev Jain wrote: Rename sigaltstack to signal, and rename the existing test to sigaltstack.c. Can you elaborate on the benefits if renaming the test? Also you have such a good information in the cover-letter for this patch - it would be good to include it in the change log for

Re: [PATCH] ftrace/selftest: Test combination of function_graph tracer and function profiler

2024-08-21 Thread Shuah Khan
nabled with +# function graph tracer. If the below fails, mark it as unsupported +echo 1 > function_profile_enabled || exit_unsupported + +sleep 1 Any specific reason for this sleep 1 - can you add a comment on top? + +exit 0 Reviewed-by: Shuah Khan Let me know if you would like v2 for

Re: [PATCH v1] selftests:tdx:Use min macro

2024-08-21 Thread Shuah Khan
On 8/21/24 22:46, Yan Zhen wrote: Using the min macro is usually more intuitive and readable. How did you find this problem? Signed-off-by: Yan Zhen --- tools/testing/selftests/tdx/tdx_guest_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftest

Re: [PATCH] test coverage for dup_fd() failure handling in unshare_fd()

2024-08-21 Thread Shuah Khan
On 8/21/24 22:39, Al Viro wrote: At some point there'd been a dumb braino during the dup_fd() calling conventions change; caught by smatch and immediately fixed. The trouble is, there had been no test coverage for the dup_fd() failure handling - neither in kselftests nor in LTP. Fortunat

Re: [PATCH] ftrace/selftest: Test combination of function_graph tracer and function profiler

2024-08-26 Thread Shuah Khan
On 8/22/24 07:19, Steven Rostedt wrote: On Wed, 21 Aug 2024 21:54:42 -0600 Shuah Khan wrote: On 8/21/24 13:09, Steven Rostedt wrote: From: Steven Rostedt Masami reported a bug when running function graph tracing then the function profiler. The following commands would cause a kernel crash

Re: [PATCH v5 1/2] selftests: Rename sigaltstack to generic signal

2024-08-27 Thread Shuah Khan
On 8/22/24 05:10, Dev Jain wrote: On 8/22/24 08:33, Shuah Khan wrote: On 8/21/24 00:15, Dev Jain wrote: Rename sigaltstack to signal, and rename the existing test to sigaltstack.c. Can you elaborate on the benefits if renaming the test? Also you have such a good information in the cover

Re: [PATCH v6 1/2] selftests: Rename sigaltstack to generic signal

2024-08-27 Thread Shuah Khan
On 8/22/24 06:14, Dev Jain wrote: Rename sigaltstack to generic signal directory, to allow adding more signal tests in the future. Sorry - I think I mentioned I don't like this test renamed. Why are you sending this rename still included in the patch series? thanks, -- Shuah

Re: [PATCH v3] Documentation: KUnit: Update filename best practices

2024-08-27 Thread Shuah Khan
On 8/22/24 18:18, Kees Cook wrote: On Fri, Jul 26, 2024 at 03:14:36PM +0800, David Gow wrote: On Thu, 25 Jul 2024 at 04:14, Kees Cook wrote: Based on feedback from Linus[1] and follow-up discussions, change the suggested file naming for KUnit tests. Link: https://lore.kernel.org/lkml/CAHk-=

Re: [PATCH] selftests/vDSO: support DT_GNU_HASH

2024-08-27 Thread Shuah Khan
On 8/26/24 00:07, Xi Ruoyao wrote: On Wed, 2024-08-14 at 20:26 -0700, Fangrui Song wrote: glibc added support for DT_GNU_HASH in 2006 and DT_HASH has been obsoleted for more than one decade in many Linux distributions. Many vDSOs support DT_GNU_HASH. This patch adds selftests support. Signed-o

Re: [PATCH] selftests: splice: Add splice_read.sh and hint

2024-08-30 Thread Shuah Khan
On 8/27/24 21:40, Rong Tao wrote: From: Rong Tao Add test scripts and prompts. Can you give more details on what these scripts and prompts do? Signed-off-by: Rong Tao --- tools/testing/selftests/splice/splice_read.c | 1 + tools/testing/selftests/splice/splice_read.sh | 9 +

Re: [PATCH] kselftest/arm64: Fix build warnings for ptrace

2024-08-30 Thread Shuah Khan
t_exit_fail_msg("raise(SIGSTOP)", strerror(errno)); + ksft_exit_fail_perror("raise(SIGSTOP)"); return EXIT_SUCCESS; } Thanks for doing this. Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH 1/5] selftests: vdso: Fix vDSO name for powerpc

2024-08-30 Thread Shuah Khan
vgetrandom code can go on top of it? Jason Yes - here is the Ack to apply to all patches in the series: Acked-by: Shuah Khan thanks, -- Shuah

[GIT PULL] KUnit fixes update for Linux 6.11-rc7

2024-09-04 Thread Shuah Khan
Hi Linus, Please pull the following KUnit fixes update for Linux 6.11-rc7. This kunit update for Linux 6.11-rc7 consist of one single fix to a use-after-free bug resulting from kunit_driver_create() failing to copy the driver name leaving it on the stack or freeing it. diff is attached. thanks

Re: [PATCH v5] lib/math: Add int_pow test suite

2024-09-12 Thread Shuah Khan
On 9/10/24 22:33, David Gow wrote: On Tue, 10 Sept 2024 at 09:10, Luis Felipe Hernandez wrote: Adds test suite for integer based power function. It would be nice to see more details on what this test does> What's the output look like? I fixed it up with the details from the Kconfig. Please

<    1   2   3   4   5   >