Re: [PATCH] selftests: timers: Fix clock_adjtime for newer 32-bit arches

2024-09-18 Thread John Stultz
On Wed, Sep 18, 2024 at 2:47 AM Khem Raj wrote: > > Newer 32-bit architectures e.g. riscv32 are using 64-bit time_t > from get go, they have not wired __NR_clock_adjtime at all > valid-adjtimex testcase fails to compile on such architectures. > if this condition is found then use 64-bit adjtime sy

Re: [PATCH] kselftest: timers: Fix const correctness

2024-08-19 Thread John Stultz
s found by running cppcheck tool on the patched file as > follows: > ``` > cppcheck --enable=all \ > tools/testing/selftests/timers/threadtest.c \ > --suppress=missingIncludeSystem \ > --suppress=unusedFunction > ``` > > Reviewed-by: Shuah Khan >

Re: [PATCH v3] selftests/timers: remove unused irqcount variable

2024-07-03 Thread John Stultz
is by deleting the irqcount variable. > > Signed-off-by: John Hubbard Acked-by: John Stultz

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

2024-04-11 Thread John Stultz
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 Lin

Re: [PATCH 2/3] selftests: timers: Fix uninitialized variable warning in ksft_min_kernel_version

2024-04-11 Thread John Stultz
On Thu, Apr 11, 2024 at 8:39 AM Nathan Chancellor wrote: > On Wed, Apr 10, 2024 at 04:26:29PM -0700, John Stultz wrote: > > Building with clang, I see the following warning: > > > > In file included from posix_timers.c:17: > > ./../kselftest.h:398:6: warnin

Re: [PATCH] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-11 Thread John Stultz
On Thu, Apr 11, 2024 at 5:42 AM Mark Brown wrote: > On Sat, Apr 06, 2024 at 05:09:51PM +0200, Oleg Nesterov wrote: > > Without the commit bcb7ee79029d ("posix-timers: Prefer delivery of signals > > to the current thread") the test-case fails immediately, the very 1st tick > > wakes the leader up.

[PATCH 3/3] selftests: timers: Fix abs() warning in posix_timers test

2024-04-10 Thread John Stultz
on Cc: Edward Liaw Cc: Carlos Llamas Cc: kernel-t...@android.com Cc: linux-kselftest@vger.kernel.org Fixes: 0bc4b0cf1570 ("selftests: add basic posix timers selftests") Signed-off-by: John Stultz --- tools/testing/selftests/timers/posix_timers.c | 2 +- 1 file changed, 1 inserti

[PATCH 2/3] selftests: timers: Fix uninitialized variable warning in ksft_min_kernel_version

2024-04-10 Thread John Stultz
: Bill Wendling Cc: Justin Stitt Cc: Oleg Nesterov Cc: Andrew Morton Cc: Edward Liaw Cc: Carlos Llamas Cc: kernel-t...@android.com Cc: linux-kselftest@vger.kernel.org Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()") Signed-off-by: John Stult

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

2024-04-10 Thread John Stultz
c: Oleg Nesterov Cc: Andrew Morton Cc: Edward Liaw Cc: Carlos Llamas Cc: kernel-t...@android.com Cc: linux-kselftest@vger.kernel.org Fixes: 6d029c25b71f ("selftests/timers/posix_timers: Reimplement check_timer_distribution()") Signed-off-by: John Stultz --- tools/testing/selftests/t

Re: [PATCH v2] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-10 Thread John Stultz
On Wed, Apr 10, 2024 at 3:31 PM Thomas Gleixner wrote: > > On Wed, Apr 10 2024 at 15:21, John Stultz wrote: > > On Tue, Apr 9, 2024 at 6:39 AM Oleg Nesterov wrote: > > This is working great here (on both 6.6 and the older 6.1)! Thanks so > > much for fixing this! > >

Re: [PATCH v2] selftests/timers/posix_timers: reimplement check_timer_distribution()

2024-04-10 Thread John Stultz
is is a > feature that obviously fails on the older kernels. So the patch adds the > new simple ksft_ck_kernel_version() helper and uses ksft_test_result_skip() > if check_timer_distribution() fails on the older kernel. > > Signed-off-by: Oleg Nesterov This is working great here (o

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

2024-04-09 Thread John Stultz
Lee Jones Cc: Muhammad Usama Anjum Cc: linux-kselftest@vger.kernel.org Reported-by: Lee Jones Reported-by: Muhammad Usama Anjum Link: https://lore.kernel.org/lkml/0c6d4f0d-2064--986b-1d1ed7821...@collabora.com/ Signed-off-by: John Stultz --- .../testing/selftests/timers/valid-adjtimex

Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread

2024-04-03 Thread John Stultz
On Wed, Apr 3, 2024 at 12:10 PM Thomas Gleixner wrote: > > On Wed, Apr 03 2024 at 11:16, John Stultz wrote: > > On Wed, Apr 3, 2024 at 9:32 AM Thomas Gleixner wrote: > > Thanks for this, Thomas! > > > > Just FYI: testing with 6.1, the test no longer hangs, but I d

Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread

2024-04-03 Thread John Stultz
On Wed, Apr 3, 2024 at 9:32 AM Thomas Gleixner wrote: > Subject: selftests/timers/posix_timers: Make signal distribution test less > fragile > From: Thomas Gleixner > > The signal distribution test has a tendency to hang for a long time as the > signal delivery is not really evenly distributed.

Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread

2024-04-02 Thread John Stultz
On Tue, Apr 2, 2024 at 7:57 AM Thomas Gleixner wrote: > On Mon, Apr 01 2024 at 13:17, John Stultz wrote: > > This change does seem to cherry-pick cleanly back to at least > > stable/linux-5.10.y cleanly, so it looks simple to pull this change > > back. But I wanted to m

Re: [PATCH v6 1/2] posix-timers: Prefer delivery of signals to the current thread

2024-04-01 Thread John Stultz
On Thu, Mar 16, 2023 at 5:30 AM Marco Elver wrote: > > From: Dmitry Vyukov > > POSIX timers using the CLOCK_PROCESS_CPUTIME_ID clock prefer the main > thread of a thread group for signal delivery. However, this has a > significant downside: it requires waking up a potentially idle thread. > >