Re: [PATCH v2 0/2] selftests/openat2, fchmodat2: fix clang build failures

2024-06-11 Thread Shuah Khan
On 5/31/24 19:45, John Hubbard wrote: These two subsystems require very similar fixes, so I'm sending them out together. Changes since the first version: 1) Rebased onto Linux 6.10-rc1. 2) Added a Reviewed-by tag from Ryan Roberts. See [1] for that. Related work: I've sent a separate fix

Re: [PATCH] selftests/sched: fix code format issues

2024-06-11 Thread Shuah Khan
On 6/10/24 23:18, aigourensheng wrote: There are extra spaces in the middle of #define. It is recommended to delete the spaces to make the code look more comfortable. Signed-off-by: aigourensheng --- tools/testing/selftests/sched/cs_prctl_test.c | 10 +- 1 file changed, 5

Re: [PATCH v2 0/4] kselftests: vdso: conform tests to TAP output

2024-06-11 Thread Shuah Khan
On 6/9/24 23:41, Muhammad Usama Anjum wrote: Conform individual tests to TAP output. One patch conform one test. With this series, all vDSO tests become TAP conformant. First patch conform the test by using kselftest_harness.h. Other patches are conforming using default kselftest.h helpers.

Re: [PATCH v2 1/4] kselftests: vdso: vdso_test_clock_getres: conform test to TAP output

2024-06-11 Thread Shuah Khan
On 6/9/24 23:41, 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. Use kselftest_harness.h to conform to TAP as the number of tests depend on the available options at build time.

Re: [PATCH] selftests: Add information about TAP conformance in tests

2024-06-11 Thread Shuah Khan
On 6/10/24 02:32, Muhammad Usama Anjum wrote: Although "TAP" word is being used already in documentation, but it hasn't been defined in informative way for developers that how to write TAP conformant tests and what are the benefits. Write a short brief about it. Signed-off-by: Muhammad Usama

Re: [PATCH] selftests: filesystems: add return value checks

2024-06-11 Thread Shuah Khan
On 6/10/24 14:09, Abhinav Jain wrote: Add ksft_exit_fail_msg() return value checks for fchdir() & chroot() to address the selftests statmount test compile warnings statmount_test.c:127:2: warning: ignoring return value of ‘fchdir’, declared with attribute warn_unused_result [-Wunused-result]

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

2024-06-11 Thread Shuah Khan
On 6/3/24 05:17, Amer Al Shanawany wrote: On 5/4/24 19:17, Amer Al Shanawany wrote: On 4/19/24 18:41, Muhammad Usama Anjum wrote: On 4/17/24 11:49 PM, Amer Al Shanawany wrote: Fix the following warnings by adding return check and error messages. statmount_test.c: In function

Re: [PATCH] selftests: proc: remove unreached code and fix build warning

2024-06-11 Thread Shuah Khan
On 6/7/24 09:25, Alexey Dobriyan wrote: On Tue, Jun 04, 2024 at 08:25:31PM -0700, Andrew Morton wrote: On Mon, 3 Jun 2024 17:24:47 +0300 Alexey Dobriyan wrote: On Mon, Jun 03, 2024 at 02:42:20PM +0200, Amer Al Shanawany wrote: fix the following warning: proc-empty-vm.c:385:17: warning:

Re: [PATCH v2] selftests: seccomp: fix format-zero-length warnings

2024-06-11 Thread Shuah Khan
On 6/10/24 10:59, Kees Cook wrote: On Fri, Jun 07, 2024 at 02:58:47PM -0600, Shuah Khan wrote: On 6/7/24 06:41, Amer Al Shanawany wrote: fix the following errors by removing empty print statements: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero

Re: [PATCH 07/10] selftests/pidfd: Fix wrong expectation

2024-06-07 Thread Shuah Khan
On 6/6/24 12:02, Okan Tümüklü wrote: From: Mickaël Salaün Replace a wrong EXPECT_GT(self->child_pid_exited, 0) with EXPECT_GE(), which will be actually tested on the parent and child sides with a following commit. Cc: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: Christian Brauner L

Re: [PATCH 0/2] Modify the watchdog selftest for execution with

2024-06-07 Thread Shuah Khan
On 6/7/24 03:53, Laura Nao wrote: Hi Shuah, On 6/7/24 01:03, Shuah Khan wrote: On 6/6/24 03:57, Laura Nao wrote: Hi Shuah, On 5/6/24 13:13, Laura Nao wrote: The watchdog selftest script supports various parameters for testing different IOCTLs. The watchdog ping functionality is validated

Re: [PATCH v2] selftests: seccomp: fix format-zero-length warnings

2024-06-07 Thread Shuah Khan
On 6/7/24 06:41, Amer Al Shanawany wrote: fix the following errors by removing empty print statements: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 197 | ksft_print_msg(""); |^~

Re: [PATCH 0/4] selftest: x86: conform tests to TAP format output

2024-06-07 Thread Shuah Khan
On 5/27/24 23:04, Muhammad Usama Anjum wrote: Kind reminder On 4/14/24 6:18 PM, Muhammad Usama Anjum wrote: In this series, 4 tests are being conformed to TAP. Muhammad Usama Anjum (4): selftests: x86: check_initial_reg_state: conform test to TAP format output selftests: x86:

Re: [PATCH 0/8] selftests: x86: build suite with clang

2024-06-07 Thread Shuah Khan
On 5/27/24 23:04, Muhammad Usama Anjum wrote: Soft reminder On 5/1/24 5:29 PM, Muhammad Usama Anjum wrote: This series fixes build errors found by clang to allow the x86 suite to get built with the clang. Unfortunately, there is one bug [1] in the clang becuase of which extended asm isn't

Re: [PATCH] tools/testing/selftests/x86: add dlclose function in the vdso_restorer.c

2024-06-07 Thread Shuah Khan
On 12/4/23 02:01, liujing wrote: in the main function of vdso_restorer.c,there is a dlopen function, but there is no dlclose function to close the file Explain the change this patch is making in addition to describing the problem. Also tell me how you found this problem. Signed-off-by:

Re: [PATCH 0/4] kselftests: vdso: conform tests to TAP output

2024-06-07 Thread Shuah Khan
On 5/29/24 01:24, Muhammad Usama Anjum wrote: Conform individual tests to TAP output. One patch conform one test. With this series, all vDSO tests become TAP conformant. Muhammad Usama Anjum (4): kselftests: vdso: vdso_test_clock_getres: conform test to TAP output kselftests: vdso:

Re: [PATCH 1/4] kselftests: vdso: vdso_test_clock_getres: conform test to TAP output

2024-06-07 Thread Shuah Khan
On 5/29/24 01:24, 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 The message doesn't match the change. This patch converts the test to use

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

2024-06-07 Thread Shuah Khan
On 6/3/24 16:36, Nathan Chancellor wrote: On Fri, May 31, 2024 at 11:37:51AM -0700, John Hubbard wrote: gcc defaults to silence (off) for the following warnings, but clang defaults to the opposite. The warnings are not useful for the kernel itself, which is why they have remained disabled in

Re: [PATCH 0/2] Modify the watchdog selftest for execution with

2024-06-06 Thread Shuah Khan
On 6/6/24 03:57, Laura Nao wrote: Hi Shuah, On 5/6/24 13:13, Laura Nao wrote: The watchdog selftest script supports various parameters for testing different IOCTLs. The watchdog ping functionality is validated by starting a loop where the watchdog device is periodically pet, which can only be

Re: [PATCH] selftests: seccomp: fix format-zero-length warnings

2024-06-06 Thread Shuah Khan
On 6/3/24 05:54, Amer Al Shanawany wrote: seccomp_benchmark.c:197:24: warning: zero-length gnu_printf format string [-Wformat-zero-length] 197 | ksft_print_msg(""); |^~ seccomp_benchmark.c:202:24: warning: zero-length gnu_printf format string

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 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: [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)

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

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 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 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

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

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 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) Added

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 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

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

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

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

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

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

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

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 *’}

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've

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

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

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

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 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/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

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

[GIT PULL] Kselftest fixes for Linux 6.10-rc1

2024-05-20 Thread Shuah Khan
d 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 _GNU_SOURCE&

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

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") You

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") and dae

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: [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 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/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

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

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

[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

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

[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

[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

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

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] 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

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

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

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

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 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

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

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

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] 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

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

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

2024-04-24 Thread Shuah Khan
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 exit() as __noreturn but it did not change the return type of these functions from 'void' to 'int' like it should have

Re: [PATCH 0/2] selftests: Make sh helper and power supply test POSIX-compliant

2024-04-24 Thread Shuah Khan
On 4/15/24 09:32, Nícolas F. R. A. Prado wrote: The patches in this series make the ktap sh helper and the power_supply selftest POSIX-compliant. Tested with bash, dash and busybox ash. Signed-off-by: Nícolas F. R. A. Prado --- Nícolas F. R. A. Prado (2): selftests: ktap_helpers: Make

Re: [PATCH] selftests: Mark ksft_exit_fail_perror() as __noreturn

2024-04-16 Thread Shuah Khan
On 4/15/24 09:41, Nathan Chancellor wrote: On Sun, Apr 14, 2024 at 11:26:53AM +0500, Muhammad Usama Anjum wrote: Let the compilers (clang) know that this function would just call exit() and would never return. It is needed to avoid false positive static analysis errors. All similar functions

[GIT PULL] Kselftest fixes update for Linux 6.9-rc5

2024-04-15 Thread Shuah Khan
Hi Linus, Please pull the following kselftest fixes update for Linux 6.9-rc5. This kselftest fixes update for Linux 6.9-rc5 consists of a fix to kselftest harness to prevent infinite loop triggered in an assert in FIXTURE_TEARDOWN and a fix to a problem seen in being able to stop

Re: [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning

2024-04-11 Thread Shuah Khan
On 4/11/24 14:53, John Stultz wrote: On Thu, Apr 11, 2024 at 1:45 PM Shuah Khan wrote: On 4/10/24 17:26, John Stultz wrote: After commit 6d029c25b71f ("selftests/timers/posix_timers: Tried to apply this for linux-kselftest next with Nathan's patch. I can't find this commit in Linux 6.

Re: [PATCH] kselftest: Mark functions that unconditionally call exit() as __noreturn

2024-04-11 Thread Shuah Khan
s for a backport (it is an existing issue anyways). I see there is another instance of this problem that will need to be addressed in -next, introduced by commit f07041728422 ("selftests: add ksft_exit_fail_perror()"). Thank you. Assuming this is going through tip/timers/urgent Ack

Re: [PATCH] selftests/clone3: Fix compiler warning

2024-04-11 Thread Shuah Khan
unsigned int’} [-Wformat=] Reported-by: Shuah Khan Signed-off-by: Mark Brown --- tools/testing/selftests/clone3/clone3_set_tid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/clone3/clone3_set_tid.c b/tools/testing/selftests/clone3/clone3_set_tid.c

Re: [PATCH] selftests/clone3: Correct log message for waitpid() failures

2024-04-11 Thread Shuah Khan
On 4/9/24 14:40, Mark Brown wrote: When logging an error from calling waitpid() on the child we print a misleading error message saying that the error we report was returned by the chilld. Fix this to say the error is from waitpid(). Signed-off-by: Mark Brown ---

Re: [PATCH] selftests/clone3: Check that the child exited cleanly

2024-04-11 Thread Shuah Khan
On 4/9/24 14:39, Mark Brown wrote: When the child exits during the clone3() selftest we use WEXITSTATUS() to get the exit status from the process without first checking WIFEXITED() to see if the result will be valid. This can lead to incorrect results, for example if the child exits due to

Re: [PATCH] selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior

2024-04-11 Thread Shuah Khan
fix our use of shifting negative values in the valid-adjtimex test case to use multiply by (1<<16) to avoid this. The patch also aligns the values a bit to make it look nicer. Cc: Thomas Gleixner Cc: Stephen Boyd Cc: Anna-Maria Behnsen Cc: Frederic Weisbecker Cc: Shuah Khan C

Re: [PATCH 1/3] selftests: timers: Fix posix_timers ksft_print_msg warning

2024-04-11 Thread Shuah Khan
ted seeing the following warning building with an older gcc: posix_timers.c:250:2: warning: format not a string literal and no format arguments [-Wformat-security] 250 | ksft_print_msg(errmsg); | ^~ Fix this up by changing it to ksft_print_msg("%s", errmsg) Cc: Shuah

Re: [PATCH v4 RESEND 0/7] Handle faults in KUnit tests

2024-04-09 Thread Shuah Khan
On 4/8/24 01:46, Mickaël Salaün wrote: Hi, This patch series teaches KUnit to handle kthread faults as errors, and it brings a few related fixes and improvements. Shuah, everything should be OK now, could you please merge this series? All these tests pass (on top of v6.8):

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 14:38, Muhammad Usama Anjum wrote: Hi Tim, On 4/6/24 12:36 AM, Bird, Tim wrote: Sorry I didn't catch this on the original submission. -Original Message- From: Shuah Khan On 4/5/24 07: 17, Muhammad Usama Anjum wrote: > "Bail out! " is not descriptive. It r

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 09:32, Kees Cook wrote: On Fri, Apr 05, 2024 at 08:56:31AM -0600, Shuah Khan wrote: On 4/5/24 07:17, Muhammad Usama Anjum wrote: "Bail out! " is not descriptive. It rather should be: "Failed: " and then this added prefix doesn't need to be added everywhere. Usu

Re: [PATCH 0/2] selftests: Replace "Bail out" with "Error" in ksft_exit_fail_msg()

2024-04-05 Thread Shuah Khan
On 4/5/24 07:17, Muhammad Usama Anjum wrote: "Bail out! " is not descriptive. It rather should be: "Failed: " and then this added prefix doesn't need to be added everywhere. Usually in the logs, we are searching for "Failed" or "Error" instead of "Bail out" so it must be replace. Remove

Re: [PATCH 0/2] selftests: add ksft_exit_fail_perror()

2024-04-04 Thread Shuah Khan
On 4/4/24 10:14, Muhammad Usama Anjum wrote: In this series, ksft_exit_fail_perror() is being added which is helper function on top of ksft_exit_fail_msg(). It prints errno and its string form always. After writing and porting several kselftests, I've found out that most of times

Re: [PATCH] kselftest: Add missing signature to the comments

2024-04-04 Thread Shuah Khan
On 4/4/24 09:55, Muhammad Usama Anjum wrote: The comment on top of the file is used by many developers to glance over all the available functions. Add the recently added ksft_perror() to it. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/kselftest.h | 1 + 1 file changed, 1

Re: [BUG] seltests/iommu: runaway ./iommufd consuming 99% CPU after a failed assert()

2024-04-04 Thread Shuah Khan
On 3/27/24 14:04, Mirsad Todorovac wrote: On 3/27/24 11:41, Joao Martins wrote: On 25/03/2024 13:52, Jason Gunthorpe wrote: On Mon, Mar 25, 2024 at 12:17:28PM +, Joao Martins wrote: However, I am not smart enough to figure out why ... Apparently, from the source, mmap() fails to

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

2024-04-04 Thread Shuah Khan
On 3/26/24 15:13, Shengyu Li wrote: 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,

Re: [Bug Report] selftests: Clang: kselftests build errors in KernelCI

2024-04-04 Thread Shuah Khan
On 4/4/24 10:34, Nick Desaulniers wrote: Thanks for the report. We've been tracking getting this working for a while: https://github.com/ClangBuiltLinux/linux/issues/1698. Other fires have continued to take priority. On Thu, Apr 4, 2024 at 9:30 AM Muhammad Usama Anjum wrote: Hi, We have

Re: [PATCH 0/2] tracing/selftests: Verbosity improvements to KTAP output

2024-04-04 Thread Shuah Khan
On 3/26/24 13:11, Shuah Khan wrote: On 3/26/24 10:08, Steven Rostedt wrote: Shuah, If Masami is OK with this, can you take this through your tree? Acked-by: Steven Rostedt (Google) -- Steve Yes. Will do once Masami gives me the okay Hi Masami, Are you okay with this patch? thanks

Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests

2024-04-04 Thread Shuah Khan
On 2/26/24 09:59, Steven Rostedt wrote: On Mon, 26 Feb 2024 15:09:38 +0900 Masami Hiramatsu (Google) wrote: On Mon, 26 Feb 2024 11:18:16 +0800 Yuanhe Shu wrote: While sched* events being traced and sched* events continuously happen, "[xx] event tracing - enable/disable with subsystem level

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

2024-03-29 Thread Shuah Khan
Hi Linus, Please pull the following kselftest fixes update for Linux 6.9rc2. This kselftest fixes update for Linux 6.9-rc2 consists of fixes to seccomp and ftrace tests and a change to add config file for dmabuf-heap test to increase coverage. diff is attached. thanks, -- Shuah

Re: [PATCH v3] kselftest/clone3: Make test names for set_tid test stable

2024-03-29 Thread Shuah Khan
On 3/26/24 14:27, Mark Brown wrote: On Tue, Mar 26, 2024 at 02:20:08PM -0600, Shuah Khan wrote: I am seeing the following compile warnings. Please fix and send patch on top pf linux-kselftest fixes. Which toolchain and architecture are you using? These compile cleanly for me. This is what

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

2024-03-29 Thread Shuah Khan
Hi Linus, Please pull the following kunit fixes update for Linux 6.9rc2. This kunit update for Linux 6.9-rc2 consists of one urgent fix for --alltests build failure related to renaming of CONFIG_DAMON_DBGFS to DAMON_DBGFS_DEPRECATED to the missing config option. This is one of the two fixes to

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

2024-03-29 Thread Shuah Khan
On 3/29/24 01:36, Ingo Molnar wrote: * Shuah Khan wrote: On 3/27/24 05:17, 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

  1   2   3   >