[PATCH v2] lib: math: Move kunit tests into tests/ subdir

2024-09-23 Thread Luis Felipe Hernandez
This patch is a follow-up task from a discussion stemming from point 3 in a recent patch introducing the int_pow kunit test [1] and documentation regarding kunit test style and nomenclature [2]. Colocate all kunit test suites in lib/math/tests/ and follow recommended naming convention for files _k

[PATCH] lib: math: Move kunit tests into tests/ subdir

2024-09-23 Thread Luis Felipe Hernandez
Cc: linux-kselftest@vger.kernel.org, kunit-...@googlegroups.com, sk...@linuxfoundation.org, rica...@marliere.net, linux-kernel-ment...@lists.linuxfoundation.org This patch is a follow-up task from a discussion stemming from point 3 in a recent patch introducing the int_pow kuni

Re: [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom

2024-09-23 Thread Yu Liao
Hi, On 2024/9/23 23:30, Shuah Khan wrote: > On 9/20/24 09:31, Jason A. Donenfeld wrote: >> Indeed probably is what's wanted here. >> > > Yu Liao, Please send v2 as per the review comments. > CLONE_NEWTIME was introduced in glibc-2.36, which was released in August 2022. As Christophe mentioned,

[PATCH v3 v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Yifei Liu
"step_after_suspend_test fails with device busy error while writing to /sys/power/state to start suspend." The test believes it failed to enter suspend state with $ sudo ./step_after_suspend_test TAP version 13 Bail out! Failed to enter Suspend state However, in the kernel message, I indeed see

Re: [External] : Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Yifei Liu
> On Sep 23, 2024, at 2:46 PM, Shuah Khan wrote: > > On 9/23/24 15:18, Yifei Liu wrote: >>> On Sep 23, 2024, at 1:56 PM, Shuah Khan wrote: >>> >>> On 9/23/24 14:47, Yifei Liu wrote: We recently notice that the step_after_suspend_test would >>> >>> noticed >> How about change this to fin

Re: [External] : Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Shuah Khan
On 9/23/24 15:18, Yifei Liu wrote: On Sep 23, 2024, at 1:56 PM, Shuah Khan wrote: On 9/23/24 14:47, Yifei Liu wrote: We recently notice that the step_after_suspend_test would noticed How about change this to find? Either is fine - it would found instead of find - or you could write it

Re: [External] : Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Yifei Liu
> On Sep 23, 2024, at 1:56 PM, Shuah Khan wrote: > > On 9/23/24 14:47, Yifei Liu wrote: >> We recently notice that the step_after_suspend_test would > > noticed How about change this to find? > >> fail on our plenty devices. The test believesit failed to > > "several of our devices" believ

Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Shuah Khan
On 9/23/24 14:47, Yifei Liu wrote: We recently notice that the step_after_suspend_test would noticed fail on our plenty devices. The test believesit failed to "several of our devices" believes it enter suspend state with Please do fix the above as pointed out earlier on v1. $ sudo ./

[PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use remaining time to check if suspend succeed

2024-09-23 Thread Yifei Liu
We recently notice that the step_after_suspend_test would fail on our plenty devices. The test believesit failed to enter suspend state with $ sudo ./step_after_suspend_test TAP version 13 Bail out! Failed to enter Suspend state However, in the kernel message, I indeed see the system get suspend

Re: [PATCH 1/2] unicode: kunit: refactor selftest to kunit tests

2024-09-23 Thread Gabriel Krisman Bertazi
Gabriela Bittencourt writes: > > -static ssize_t utf8len(const struct unicode_map *um, enum utf8_normalization > n, > - const char *s) > +static ssize_t utf8len(const struct unicode_map *um, enum utf8_normalization > n, const char *s) > { Please, do not make indentation-only chang

Re: [PATCH 2/2] unicode: kunit: change tests filename and path

2024-09-23 Thread Shuah Khan
On 9/23/24 11:34, Gabriela Bittencourt wrote: Change utf8 kunit test filename and path to follow the style convention on Documentation/dev-tools/kunit/style.rst Co-developed-by: Pedro Orlando Signed-off-by: Pedro Orlando Co-developed-by: Danilo Pereira Signed-off-by: Danilo Pereira Signed-of

Re: [PATCH 1/2] unicode: kunit: refactor selftest to kunit tests

2024-09-23 Thread Shuah Khan
On 9/23/24 11:34, Gabriela Bittencourt wrote: Instead of creating 'test' functions, use kunit functions to test utf-8 support in unicode subsystem. Can you elaborate on the reefactoring changes. This will help others who would want to take on such refactoring in the future. Co-developed-by:

[PATCH 0/2] unicode: kunit: refactor selftest to kunit tests

2024-09-23 Thread Gabriela Bittencourt
Hey all, We are making these changes as part of a KUnit Hackathon at LKCamp [1]. This patch sets out to refactor fs/unicode/utf8-selftest.c to KUnit tests. The first commit is the refactoring itself from self test into KUnit, while the second one applies the naming style conventions. We appreci

[PATCH 1/2] unicode: kunit: refactor selftest to kunit tests

2024-09-23 Thread Gabriela Bittencourt
Instead of creating 'test' functions, use kunit functions to test utf-8 support in unicode subsystem. Co-developed-by: Pedro Orlando Signed-off-by: Pedro Orlando Co-developed-by: Danilo Pereira Signed-off-by: Danilo Pereira Signed-off-by: Gabriela Bittencourt --- fs/unicode/.kunitconfig|

[PATCH 2/2] unicode: kunit: change tests filename and path

2024-09-23 Thread Gabriela Bittencourt
Change utf8 kunit test filename and path to follow the style convention on Documentation/dev-tools/kunit/style.rst Co-developed-by: Pedro Orlando Signed-off-by: Pedro Orlando Co-developed-by: Danilo Pereira Signed-off-by: Danilo Pereira Signed-off-by: Gabriela Bittencourt --- fs/unicode/Make

Re: [External] : Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use time passed to check if suspend succeed

2024-09-23 Thread Yifei Liu
Hi Shuah, Thanks for the review. I will send a v2 soon. Yifei > On Sep 23, 2024, at 8:37 AM, Shuah Khan wrote: > > On 9/20/24 11:52, Yifei Liu wrote: >> Hi Shuah, >>> On Sep 20, 2024, at 8:07 AM, Shuah Khan wrote: >>> >>> On 9/19/24 17:09, Yifei Liu wrote: Hi Shuah, > On Sep 19, 202

Re: [External] : Re: [PATCH v6.11 v5.15 v5.4 v4.19 1/1] selftests: breakpoints: use time passed to check if suspend succeed

2024-09-23 Thread Shuah Khan
On 9/20/24 11:52, Yifei Liu wrote: Hi Shuah, On Sep 20, 2024, at 8:07 AM, Shuah Khan wrote: On 9/19/24 17:09, Yifei Liu wrote: Hi Shuah, On Sep 19, 2024, at 11:36 AM, Shuah Khan wrote: On 9/17/24 16:48, Yifei Liu wrote: We recently notice that the step_after_suspend_test would fail on ou

Re: [PATCH] selftests: vDSO: fix compile error for vdso_test_getrandom

2024-09-23 Thread Shuah Khan
On 9/20/24 09:31, Jason A. Donenfeld wrote: Indeed probably is what's wanted here. Yu Liao, Please send v2 as per the review comments. Shuah - I was taking patches for this code during the 6.12 development cycle, because it all interacted with the dev work I was doing. But I think that's di

Re: [PATCH bpf-next v1 2/3] bpf: btf: Ensure natural alignment of .BTF_ids section

2024-09-23 Thread Eduard Zingerman
On Mon, 2024-09-23 at 12:54 +0200, Jiri Olsa wrote: [...] > > > diff --git a/include/linux/btf_ids.h b/include/linux/btf_ids.h > > > index c0e3e1426a82..c10b163dc340 100644 > > > --- a/include/linux/btf_ids.h > > > +++ b/include/linux/btf_ids.h > > > @@ -89,6 +89,7 @@ word

Re: [PATCH bpf-next v1 0/3] Improve .BTF_ids patching and alignment

2024-09-23 Thread Jiri Olsa
On Fri, Sep 20, 2024 at 12:49:10AM -0700, Tony Ambardar wrote: > Hello all, > > This patch series offers improvements to the way .BTF_ids section data is > created and later patched by resolve_btfids. > > Patch #1 simplifies the byte-order translation in resolve_btfids while > making it more resi

Re: [PATCH bpf-next v1 1/3] tools/resolve_btfids: Simplify handling cross-endian compilation

2024-09-23 Thread Jiri Olsa
On Fri, Sep 20, 2024 at 12:49:11AM -0700, Tony Ambardar wrote: SNIP > +static int btfids_endian_fix(struct object *obj) > +{ > + Elf_Data *btfids = obj->efile.idlist; > + Elf *elf = obj->efile.elf; > + int file_byteorder; > + > + /* This should always succeed due to prior ELF chec

Re: [PATCH bpf-next v1 2/3] bpf: btf: Ensure natural alignment of .BTF_ids section

2024-09-23 Thread Jiri Olsa
On Sat, Sep 21, 2024 at 02:46:17AM -0700, Eduard Zingerman wrote: > On Fri, 2024-09-20 at 00:49 -0700, Tony Ambardar wrote: > > While building of vmlinux employs a linker script to align the .BTF_ids > > section to 4 bytes, other usage leaves .BTF_ids unaligned and may lead to > > problems (e.g. [1