Re: [PATCH] platform/surface: aggregator: fix a bit test

2021-04-20 Thread Hans de Goede
Hi, On 4/20/21 10:44 AM, Dan Carpenter wrote: > The "funcs" variable is a u64. If "func" is more than 31 then the > BIT() shift will wrap instead of testing the high bits. > > Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-20 Thread Alexander Monakov
On Tue, 20 Apr 2021, Suthikulpanit, Suravee wrote: > David / Joerg, > > On 4/10/2021 5:03 PM, David Coe wrote: > > > > The immediately obvious difference is the with the enormous count seen on > > mem_dte_mis on the older Ryzen 2400G. Will do some RTFM but anyone > > with comments and insight?

Re: [PATCH] platform/surface: aggregator: fix a bit test

2021-04-20 Thread Maximilian Luz
On 4/20/21 10:44 AM, Dan Carpenter wrote: The "funcs" variable is a u64. If "func" is more than 31 then the BIT() shift will wrap instead of testing the high bits. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Reported-by: kernel

[PATCH] platform/surface: aggregator: fix a bit test

2021-04-20 Thread Dan Carpenter
The "funcs" variable is a u64. If "func" is more than 31 then the BIT() shift will wrap instead of testing the high bits. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Reported-by: kernel test robot Signed-off-by: Dan Carpenter

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-20 Thread Suthikulpanit, Suravee
David / Joerg, On 4/10/2021 5:03 PM, David Coe wrote: The immediately obvious difference is the with the enormous count seen on mem_dte_mis on the older Ryzen 2400G. Will do some RTFM but anyone with  comments and insight? 841,689,151,202,939   amd_iommu_0/mem_dte_mis/  

[PATCH v7 7/9] perf: arm64: Add test for userspace counter access on heterogeneous systems

2021-04-19 Thread Rob Herring
Userspace counter access only works on heterogeneous systems with some restrictions. The userspace process must be pinned to a homogeneous subset of CPUs and must open the corresponding PMU for those CPUs. This commit adds a test implementing these requirements. Signed-off-by: Rob Herring --- v6

[PATCH 1/4] lib/math: Add a `do_div' test module

2021-04-19 Thread Maciej W. Rozycki
32bit division and modulo test" + depends on DEBUG_KERNEL || m + help + Enable this to turn on 'do_div()' function test. This test is + executed only once during system boot (so affects only boot time), + or at module load time. + + If unsure, say N.

[PATCH 30/30] KVM: selftests: Introduce hyperv_features test

2021-04-19 Thread Vitaly Kuznetsov
The initial implementation of the test only tests that access to Hyper-V MSRs and hypercalls is in compliance with guest visible CPUID feature bits. Signed-off-by: Vitaly Kuznetsov --- tools/testing/selftests/kvm/.gitignore| 1 + tools/testing/selftests/kvm/Makefile | 1

[PATCH v2 5/5] selftests/vm: add test for MADV_POPULATE_(READ|WRITE)

2021-04-19 Thread David Hildenbrand
Let's add a simple test for MADV_POPULATE_READ and MADV_POPULATE_WRITE, verifying some error handling, that population works, and that softdirty tracking works as expected. For now, limit the test to private anonymous memory. Cc: Andrew Morton Cc: Arnd Bergmann Cc: Michal Hocko Cc: Oscar

[PATCH 5.11 069/122] ixgbe: Fix NULL pointer dereference in ethtool loopback test

2021-04-19 Thread Greg Kroah-Hartman
From: Alexander Duyck commit 31166efb1cee348eb6314e9c0095d84cbeb66b9d upstream. The ixgbe driver currently generates a NULL pointer dereference when performing the ethtool loopback test. This is due to the fact that there isn't a q_vector associated with the test ring when it is setup

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-18 Thread David Coe
Hi Suravee! Results for Ryzen 2400G on Ubuntu 20.10, kernel 5.8.0-50 with patch 2/2 alone. Events batched 3 x 8 to avoid counter-multiplexing (?) artefacts. On 15/04/2021 10:28, Suthikulpanit, Suravee wrote: David, For the Ryzen 2400G, could you please try with: - 1 event at a time - Not

[PATCH v3 0/2] KVM: selftests: fix races in dirty log test

2021-04-17 Thread Peter Xu
Please consider overtake the previous v2 [1] of this patch which is a single patch, also please find more information in the commit message of each patch. I kept the versioning since it solves the same problem, but mostly rewritten. I've run a few hours of below workloads in parallel to test

drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame size of 2848 bytes in function 'vidtv_mux_tick'

2021-04-17 Thread kernel test robot
make.cross W=1 ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame >> size of 2848 bytes in functi

Re: [PATCH v6 00/10] KVM: selftests: some improvement and a new test for kvm page table

2021-04-17 Thread Paolo Bonzini
. In the second part, a new test is added: This test is added to serve as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), it gives guidance for the people trying to make some improvement for kvm. And the following explains what we can exactly do through this t

Re: [PATCH v6] lib: add basic KUnit test for lib/math

2021-04-16 Thread kernel test robot
Hi Daniel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 7e25f40eab52c57ff6772d27d2aef3640a3237d7] url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/lib-add-basic-KUnit-test-for-lib-math/20210417-020619 base

Re: [PATCH v6] lib: add basic KUnit test for lib/math

2021-04-16 Thread David Gow
On Sat, Apr 17, 2021 at 2:04 AM Daniel Latypov wrote: > > Add basic test coverage for files that don't require any config options: > * part of math.h (what seem to be the most commonly used macros) > * gcd.c > * lcm.c > * int_sqrt.c > * reciprocal_div.c > (Ignored int_p

Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
On Fri, Apr 16 2021 at 23:37, Thomas Gleixner wrote: > On Fri, Apr 16 2021 at 13:38, Sami Tolvanen wrote: >> #ifdef CONFIG_STATIC_CALL_SELFTEST >> >> -static int func_a(int x) >> +int func_a(int x) >> { >> return x+1; >> } >> >> -static int func_b(int x) >> +int func_b(int x) >> { >>

[PATCH 1/2] test_firmware: add suspend support to test buggy drivers

2021-04-16 Thread Luis Chamberlain
we are allowing races for filesystems to race against the disappearance of a block device, and this is presently an issue which can lead to a stall. It is difficult to reproduce this unless you have hardware which mimics this setup. So to test this setup, let's just implement support for doing

[PATCH v2] kunit: add unit test for filtering suites by names

2021-04-16 Thread Daniel Latypov
This adds unit tests for kunit_filter_subsuite() and kunit_filter_suites(). Note: what the executor means by "subsuite" is the array of suites corresponding to each test file. This patch lightly refactors executor.c to avoid the use of global variables to make it testable. It als

Re: [PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Thomas Gleixner
sembly. Make the self-test functions global to prevent the > compiler from renaming them. Sorry, no. > Signed-off-by: Sami Tolvanen > --- > kernel/static_call.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/kernel/static_call.c b/kernel/static_call.c &

[PATCH 04/15] static_call: Use global functions for the self-test

2021-04-16 Thread Sami Tolvanen
With CONFIG_CFI_CLANG, the compiler renames static functions. This breaks static_call users using static functions, because the current implementation assumes functions have stable names by hardcoding them in inline assembly. Make the self-test functions global to prevent the compiler from

Re: [PATCH v5] lib: add basic KUnit test for lib/math

2021-04-16 Thread Daniel Latypov
On Tue, Apr 13, 2021 at 5:33 PM Daniel Latypov wrote: > > On Mon, Apr 12, 2021 at 11:41 PM David Gow wrote: > > > > On Tue, Apr 13, 2021 at 3:07 AM Daniel Latypov wrote: > > > > > > Add basic test coverage for files that don't require any config option

Re: [PATCH v2] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Joe Perches
On Fri, 2021-04-16 at 19:57 +0200, Christophe JAILLET wrote: > The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested > Add the corresponding check. > > Signed-off-by: Christophe JAILLET > --- > v2: use a cleaner regex as proposed by Joe Perches Acked-by: Joe Perches > --- >  

[PATCH v6] lib: add basic KUnit test for lib/math

2021-04-16 Thread Daniel Latypov
Add basic test coverage for files that don't require any config options: * part of math.h (what seem to be the most commonly used macros) * gcd.c * lcm.c * int_sqrt.c * reciprocal_div.c (Ignored int_pow.c since it's a simple textbook algorithm.) These tests aren't particularly interesting

Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Christophe JAILLET
(devm_|)(kcalloc|kmalloc_array)\s*\(\s*sizeof\b/) { Perhaps nicer using I'll send a V2. Thx for the feedback. CJ if ($line =~ /\b((?:devm_)?(?:kcalloc|kmalloc_array))\s*\*\s*sizeof\b/) { The \* above should be \(. Yes I've seen it when I tested the updated test case. I

[PATCH v2] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Christophe JAILLET
The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested Add the corresponding check. Signed-off-by: Christophe JAILLET --- v2: use a cleaner regex as proposed by Joe Perches --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Joe Perches
On Fri, 2021-04-16 at 18:51 +0200, Christophe JAILLET wrote: > Le 16/04/2021 à 18:11, Joe Perches a écrit : > > On Fri, 2021-04-16 at 17:58 +0200, Christophe JAILLET wrote: > > > The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested > > > Add the corresponding check. > > [] > > >

Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Christophe JAILLET
Le 16/04/2021 à 18:11, Joe Perches a écrit : On Fri, 2021-04-16 at 17:58 +0200, Christophe JAILLET wrote: The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested Add the corresponding check. [] diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] @@ -7006,9 +7006,9 @@

Re: [PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Joe Perches
On Fri, 2021-04-16 at 17:58 +0200, Christophe JAILLET wrote: > The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested > Add the corresponding check. [] > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -7006,9 +7006,9 @@ sub process { >   } >   > >  #

[PATCH] checkpatch: Improve ALLOC_ARRAY_ARGS test

2021-04-16 Thread Christophe JAILLET
The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested Add the corresponding check. Signed-off-by: Christophe JAILLET --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index

[PATCH v4 25/25] perf tests: Skip 'perf stat metrics (shadow stat) test' for hybrid

2021-04-16 Thread Jin Yao
/instructions/ 841,158,734 cpu_atom/instructions/ 1.002644773 seconds time elapsed Now there is no shadow stat 'insn per cycle' reported. We will support it later and now just skip the 'perf stat metrics (shadow stat) test'. Signed-off-by: Jin Yao --- tools/perf/tests/shell

[PATCH v4 22/25] perf tests: Support 'Parse and process metrics' test for hybrid

2021-04-16 Thread Jin Yao
Some events are not supported. Only pick up some cases for hybrid. # ./perf test 67 67: Parse and process metrics : Ok Signed-off-by: Jin Yao --- tools/perf/tests/parse-metric.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff

[PATCH v4 24/25] perf tests: Support 'Convert perf time to TSC' test for hybrid

2021-04-16 Thread Jin Yao
Since for "cycles:u' on hybrid platform, it creates two "cycles". So the second evsel in evlist also needs initialization. With this patch, # ./perf test 71 71: Convert perf time to TSC: Ok Signed-off-by: Jin Yao --- tools/perf/

[PATCH v4 23/25] perf tests: Support 'Session topology' test for hybrid

2021-04-16 Thread Jin Yao
Force to create one event "cpu_core/cycles/" by default, otherwise in evlist__valid_sample_type, the checking of 'if (evlist->core.nr_entries == 1)' would be failed. # ./perf test 41 41: Session topology: Ok Signed-off-by: Jin Ya

[PATCH v4 21/25] perf tests: Support 'Track with sched_switch' test for hybrid

2021-04-16 Thread Jin Yao
Since for "cycles:u' on hybrid platform, it creates two "cycles". So the number of events in evlist is not expected in next test steps. Now we just use one event "cpu_core/cycles:u/" for hybrid. # ./perf test 35 35: Track with sched_switch

[PATCH v4 20/25] perf tests: Skip 'Setup struct perf_event_attr' test for hybrid

2021-04-16 Thread Jin Yao
For hybrid, the attr.type consists of pmu type id + original type. There will be much changes for this test. Now we temporarily skip this test case and TODO in future. Signed-off-by: Jin Yao --- tools/perf/tests/attr.c | 4 1 file changed, 4 insertions(+) diff --git a/tools/perf/tests

[PATCH v4 18/25] perf tests: Add hybrid cases for 'Parse event definition strings' test

2021-04-16 Thread Jin Yao
Add basic hybrid test cases for 'Parse event definition strings' test. # perf test 6 6: Parse event definition strings : Ok Signed-off-by: Jin Yao --- tools/perf/tests/parse-events.c | 152 1 file changed, 152 insertions

[PATCH v4 19/25] perf tests: Add hybrid cases for 'Roundtrip evsel->name' test

2021-04-16 Thread Jin Yao
d by 2. # ./perf test 14 14: Roundtrip evsel->name : Ok Signed-off-by: Jin Yao --- tools/perf/tests/evsel-roundtrip-name.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/perf/tests/evsel-roundtrip-

Re: [PATCH 5.10 12/25] radix tree test suite: Fix compilation

2021-04-15 Thread Sasha Levin
don't see 4bba4c4bb09a backported to 5.10.y, so I think this will break compilation of the radix tree test suite. The corresponding commit for 5.11.y is good, since 5.11.y includes 4bba4c4bb09a. I'll drop it from 5.10, thanks! -- Thanks, Sasha

[PATCH v3 07/10] userfaultfd/selftests: reinitialize test context in each test

2021-04-15 Thread Axel Rasmussen
Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test area

[PATCH v3 05/10] userfaultfd/selftests: use memfd_create for shmem test type

2021-04-15 Thread Axel Rasmussen
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can

[PATCH v3 06/10] userfaultfd/selftests: create alias mappings in the shmem test

2021-04-15 Thread Axel Rasmussen
, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Reviewed-by: Peter Xu Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions

Re: [PATCH v2 7/9] userfaultfd/selftests: reinitialize test context in each test

2021-04-15 Thread Axel Rasmussen
On Tue, Apr 13, 2021 at 1:15 PM Peter Xu wrote: > > On Mon, Apr 12, 2021 at 10:17:19PM -0700, Axel Rasmussen wrote: > > Currently, the context (fds, mmap-ed areas, etc.) are global. Each test > > mutates this state in some way, in some cases really "clobbering it"

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-15 Thread David Coe
Hi Suravee! On 15/04/2021 10:28, Suthikulpanit, Suravee wrote: David, On 4/14/2021 10:33 PM, David Coe wrote: Hi Suravee! I've re-run your revert+update patch on Ubuntu's latest kernel 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached the code! There are 3 sets of

Re: [PATCH 5.10 12/25] radix tree test suite: Fix compilation

2021-04-15 Thread Matthew Wilcox
09a backported to 5.10.y, so I think this will break compilation of the radix tree test suite. The corresponding commit for 5.11.y is good, since 5.11.y includes 4bba4c4bb09a.

[PATCH 5.11 16/23] idr test suite: Create anchor before launching throbber

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 094ffbd1d8eaa27ed426feb8530cb1456348b018 ] The throbber could race with creation of the anchor entry and cause the IDR to have zero entries in it, which would cause the test to fail. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Sasha

[PATCH 5.11 14/23] radix tree test suite: Register the main thread with the RCU library

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 1bb4bd266cf39fd2fa711f2d265c558b92df1119 ] Several test runners register individual worker threads with the RCU library, but neglect to register the main thread, which can lead to objects being freed while the main thread is in what appears

[PATCH 5.11 15/23] idr test suite: Take RCU read lock in idr_find_test_1

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 703586410da69eb40062e64d413ca33bd735917a ] When run on a single CPU, this test would frequently access already-freed memory. Due to timing, this bug never showed up on multi-CPU tests. Reported-by: Chris von Recklinghausen Signed-off

[PATCH 5.11 12/23] radix tree test suite: Fix compilation

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 7487de534dcbe143e6f41da751dd3ffcf93b00ee ] Commit 4bba4c4bb09a added tools/include/linux/compiler_types.h which includes linux/compiler-gcc.h. Unfortunately, we had our own (empty) compiler_types.h which overrode the one added by that commit, and

[PATCH 5.10 14/25] radix tree test suite: Register the main thread with the RCU library

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 1bb4bd266cf39fd2fa711f2d265c558b92df1119 ] Several test runners register individual worker threads with the RCU library, but neglect to register the main thread, which can lead to objects being freed while the main thread is in what appears

[PATCH 5.10 16/25] idr test suite: Create anchor before launching throbber

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 094ffbd1d8eaa27ed426feb8530cb1456348b018 ] The throbber could race with creation of the anchor entry and cause the IDR to have zero entries in it, which would cause the test to fail. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Sasha

[PATCH 5.10 15/25] idr test suite: Take RCU read lock in idr_find_test_1

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 703586410da69eb40062e64d413ca33bd735917a ] When run on a single CPU, this test would frequently access already-freed memory. Due to timing, this bug never showed up on multi-CPU tests. Reported-by: Chris von Recklinghausen Signed-off

[PATCH 5.10 12/25] radix tree test suite: Fix compilation

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 7487de534dcbe143e6f41da751dd3ffcf93b00ee ] Commit 4bba4c4bb09a added tools/include/linux/compiler_types.h which includes linux/compiler-gcc.h. Unfortunately, we had our own (empty) compiler_types.h which overrode the one added by that commit, and

[PATCH 5.4 10/18] idr test suite: Create anchor before launching throbber

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 094ffbd1d8eaa27ed426feb8530cb1456348b018 ] The throbber could race with creation of the anchor entry and cause the IDR to have zero entries in it, which would cause the test to fail. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Sasha

[PATCH 5.4 09/18] idr test suite: Take RCU read lock in idr_find_test_1

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 703586410da69eb40062e64d413ca33bd735917a ] When run on a single CPU, this test would frequently access already-freed memory. Due to timing, this bug never showed up on multi-CPU tests. Reported-by: Chris von Recklinghausen Signed-off

[PATCH 5.4 08/18] radix tree test suite: Register the main thread with the RCU library

2021-04-15 Thread Greg Kroah-Hartman
From: Matthew Wilcox (Oracle) [ Upstream commit 1bb4bd266cf39fd2fa711f2d265c558b92df1119 ] Several test runners register individual worker threads with the RCU library, but neglect to register the main thread, which can lead to objects being freed while the main thread is in what appears

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-15 Thread David Coe
I think you've put your finger on it, Suravee! On 15/04/2021 10:28, Suthikulpanit, Suravee wrote: David, On 4/14/2021 10:33 PM, David Coe wrote: Hi Suravee! I've re-run your revert+update patch on Ubuntu's latest kernel 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached

Re: [PATCH 0/2] iommu/amd: Revert and remove failing PMC test

2021-04-15 Thread Joerg Roedel
On Fri, Apr 09, 2021 at 03:58:46AM -0500, Suravee Suthikulpanit wrote: > Paul Menzel (1): > Revert "iommu/amd: Fix performance counter initialization" > > Suravee Suthikulpanit (1): > iommu/amd: Remove performance counter pre-initialization test Applied, thanks Paul and Suravee.

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-15 Thread Marco Elver
ter allocation and changing > >> > pointer to next free node, first byte, 50th byte and redzone > >> > byte. Check if validation finds errors. > >> > > >> > There are several differences from the original resiliency test: > >> > Tests create o

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-15 Thread Vlastimil Babka
t;> > byte. Check if validation finds errors. >> > >> > There are several differences from the original resiliency test: >> > Tests create own caches with known state instead of corrupting >> > shared kmalloc caches. >> > >> > The corruption of freepo

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-15 Thread Vlastimil Babka
byte in redzone after allocation and changing > pointer to next free node, first byte, 50th byte and redzone > byte. Check if validation finds errors. > > There are several differences from the original resiliency test: > Tests create own caches with known state instead o

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-15 Thread Oliver Glitta
so nobody > > runs it. KUnit should be a proper replacement for it. > > > > Try changing byte in redzone after allocation and changing > > pointer to next free node, first byte, 50th byte and redzone > > byte. Check if validation finds errors. > > > > There are seve

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-15 Thread Oliver Glitta
t; runs it. KUnit should be a proper replacement for it. > > > > Try changing byte in redzone after allocation and changing > > pointer to next free node, first byte, 50th byte and redzone > > byte. Check if validation finds errors. > > > > There are several differences f

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-15 Thread Suthikulpanit, Suravee
David, On 4/14/2021 10:33 PM, David Coe wrote: Hi Suravee! I've re-run your revert+update patch on Ubuntu's latest kernel 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached the code! There are 3 sets of results in the attachment, all for the Ryzen 2400G. The as-distributed

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-14 Thread David Coe
Hi again! For completeness, I'm attaching results for the revert+update patch running the Ubuntu 21.04β kernel 5.11.0-14 on a Ryzen 4700U laptop. The enormous amd_iommu running stats aren't always there, as they nearly always are on the the 2400G desktop, but they do turn up (depending on

Re: [PATCH 2/2] srcu: Early test SRCU polling start

2021-04-14 Thread Paul E. McKenney
On Wed, Apr 14, 2021 at 03:24:13PM +0200, Frederic Weisbecker wrote: > Test an early call to start_poll_synchronize_srcu() and place it before > the early test to call_srcu() on the same ssp. > > After the later call to srcu_barrier(), we expect the first grace period > completio

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-14 Thread David Coe
Hi Suravee! I've re-run your revert+update patch on Ubuntu's latest kernel 5.11.0-14 partly to check my mailer's 'mangling' hadn't also reached the code! There are 3 sets of results in the attachment, all for the Ryzen 2400G. The as-distributed kernel already incorporates your IOMMU RFCv3

[PATCH 2/2] srcu: Early test SRCU polling start

2021-04-14 Thread Frederic Weisbecker
Test an early call to start_poll_synchronize_srcu() and place it before the early test to call_srcu() on the same ssp. After the later call to srcu_barrier(), we expect the first grace period completion to be visible by a subsequent call to poll_state_synchronize_srcu(). Report otherwise. Signed

Re: [PATCH AUTOSEL 4.19 6/8] radix tree test suite: Fix compilation

2021-04-14 Thread Sasha Levin
On Mon, Apr 05, 2021 at 07:11:09PM +0100, Matthew Wilcox wrote: On Mon, Apr 05, 2021 at 12:05:13PM -0400, Sasha Levin wrote: From: "Matthew Wilcox (Oracle)" [ Upstream commit dd841a749d1ded8e2e5facc4242ee0b6779fc0cb ] Introducing local_lock broke compilation; fix it all up. I don't think

Re: [PATCH v5] lib: add basic KUnit test for lib/math

2021-04-13 Thread Daniel Latypov
On Mon, Apr 12, 2021 at 11:41 PM David Gow wrote: > > On Tue, Apr 13, 2021 at 3:07 AM Daniel Latypov wrote: > > > > Add basic test coverage for files that don't require any config options: > > * part of math.h (what seem to be the most commonly used macros)

Re: [PATCH] kunit: add unit test for filtering suites by names

2021-04-13 Thread Daniel Latypov
the array of suites > > corresponding to each test file. > > > > This patch lightly refactors executor.c to avoid the use of global > > variables to make it testable. > > It also includes a clever `kfree_at_end()` helper that makes this test > > easier to wri

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-13 Thread Daniel Latypov
ng byte in redzone after allocation and changing > pointer to next free node, first byte, 50th byte and redzone > byte. Check if validation finds errors. > > There are several differences from the original resiliency test: > Tests create own caches with known state instead of corrupting >

Re: [PATCH v2 6/9] userfaultfd/selftests: create alias mappings in the shmem test

2021-04-13 Thread Peter Xu
On Mon, Apr 12, 2021 at 10:17:18PM -0700, Axel Rasmussen wrote: > static void shmem_allocate_area(void **alloc_area) > { > - unsigned long offset = > - alloc_area == (void **)_src ? 0 : nr_pages * page_size; > + void *area_alias = NULL; > + bool is_src = alloc_area ==

Re: [PATCH v2 5/9] userfaultfd/selftests: use memfd_create for shmem test type

2021-04-13 Thread Peter Xu
On Mon, Apr 12, 2021 at 10:17:17PM -0700, Axel Rasmussen wrote: > This is a preparatory commit. In the future, we want to be able to setup > alias mappings for area_src and area_dst in the shmem test, like we do > in the hugetlb_shared test. With a VMA obtained via > mmap(M

Re: [PATCH v2 7/9] userfaultfd/selftests: reinitialize test context in each test

2021-04-13 Thread Peter Xu
On Mon, Apr 12, 2021 at 10:17:19PM -0700, Axel Rasmussen wrote: > Currently, the context (fds, mmap-ed areas, etc.) are global. Each test > mutates this state in some way, in some cases really "clobbering it" > (e.g., the events test mremap-ing area_dst over the top of area_

Re: [PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-13 Thread Marco Elver
zone after allocation and changing > pointer to next free node, first byte, 50th byte and redzone > byte. Check if validation finds errors. > > There are several differences from the original resiliency test: > Tests create own caches with known state instead of corrupting > sh

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-13 Thread Suthikulpanit, Suravee
On 4/10/2021 5:03 PM, David Coe wrote: Results for AMD Ryzen 4700U running Ubuntu 21.04β kernel 5.11.0-13 $ sudo dmesg | grep IOMMU [    0.490352] pci :00:00.2: AMD-Vi: IOMMU performance counters supported [    0.491985] pci :00:00.2: AMD-Vi: Found IOMMU cap 0x40 [    0.493732]

Re: [PATCH v4 1/3] kunit: make test->lock irq safe

2021-04-13 Thread Brendan Higgins
On Tue, Apr 13, 2021 at 3:07 AM wrote: > > From: Vlastimil Babka > > The upcoming SLUB kunit test will be calling kunit_find_named_resource() from > a context with disabled interrupts. That means kunit's test->lock needs to be > IRQ safe to avoid potential deadloc

[PATCH v4 2/3] mm/slub, kunit: add a KUnit test for SLUB debugging functionality

2021-04-13 Thread glittao
byte, 50th byte and redzone byte. Check if validation finds errors. There are several differences from the original resiliency test: Tests create own caches with known state instead of corrupting shared kmalloc caches. The corruption of freepointer uses correct offset, the original resiliency test

[PATCH v4 1/3] kunit: make test->lock irq safe

2021-04-13 Thread glittao
From: Vlastimil Babka The upcoming SLUB kunit test will be calling kunit_find_named_resource() from a context with disabled interrupts. That means kunit's test->lock needs to be IRQ safe to avoid potential deadlocks and lockdep splats. This patch therefore changes the test->lock

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-13 Thread David Coe
Hi Suravee! Just in case (!), I've run your revert+update patch on kernel 5.11.0-13, Ubuntu 21.04β running on an AMD FX-8350 (pre Zen and IOMMUv2). As with the AMD Ryzen 2400G and 4700U, I'm finding no obvious issues. $ sudo dmesg | grep IOMMU [0.948890] pci :00:00.2: AMD-Vi: Found

Re: [PATCH] kunit: add unit test for filtering suites by names

2021-04-13 Thread kernel test robot
Hi Daniel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on 1678e493d530e7977cce34e59a86bb86f3c5631e] url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-add-unit-test-for-filtering-suites-by-names/20210413-080913 base

Re: [PATCH v5] lib: add basic KUnit test for lib/math

2021-04-13 Thread David Gow
On Tue, Apr 13, 2021 at 3:07 AM Daniel Latypov wrote: > > Add basic test coverage for files that don't require any config options: > * part of math.h (what seem to be the most commonly used macros) > * gcd.c > * lcm.c > * int_sqrt.c > * reciprocal_div.c > (Ignored int_p

[PATCH v2 6/9] userfaultfd/selftests: create alias mappings in the shmem test

2021-04-12 Thread Axel Rasmussen
, we'll leverage this setup to exercise minor fault handling support for shmem, just like we do in the hugetlb_shared test. Signed-off-by: Axel Rasmussen --- tools/testing/selftests/vm/userfaultfd.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/tools

[PATCH v2 7/9] userfaultfd/selftests: reinitialize test context in each test

2021-04-12 Thread Axel Rasmussen
Currently, the context (fds, mmap-ed areas, etc.) are global. Each test mutates this state in some way, in some cases really "clobbering it" (e.g., the events test mremap-ing area_dst over the top of area_src, or the minor faults tests overwriting the count_verify values in the test area

[PATCH v2 5/9] userfaultfd/selftests: use memfd_create for shmem test type

2021-04-12 Thread Axel Rasmussen
This is a preparatory commit. In the future, we want to be able to setup alias mappings for area_src and area_dst in the shmem test, like we do in the hugetlb_shared test. With a VMA obtained via mmap(MAP_ANONYMOUS | MAP_SHARED), it isn't clear how to do this. So, mmap() with an fd, so we can

Re: [PATCH] kunit: add unit test for filtering suites by names

2021-04-12 Thread David Gow
On Tue, Apr 13, 2021 at 8:08 AM Daniel Latypov wrote: > > This adds unit tests for kunit_filter_subsuite() and > kunit_filter_suites(). > > Note: what the executor means by "subsuite" is the array of suites > corresponding to each test file. > > This patch lig

[PATCH] kunit: add unit test for filtering suites by names

2021-04-12 Thread Daniel Latypov
This adds unit tests for kunit_filter_subsuite() and kunit_filter_suites(). Note: what the executor means by "subsuite" is the array of suites corresponding to each test file. This patch lightly refactors executor.c to avoid the use of global variables to make it testable. It als

[PATCH v5] lib: add basic KUnit test for lib/math

2021-04-12 Thread Daniel Latypov
Add basic test coverage for files that don't require any config options: * part of math.h (what seem to be the most commonly used macros) * gcd.c * lcm.c * int_sqrt.c * reciprocal_div.c (Ignored int_pow.c since it's a simple textbook algorithm.) These tests aren't particularly interesting

[tip: locking/core] kcsan: Make test follow KUnit style recommendations

2021-04-11 Thread tip-bot2 for Marco Elver
Committer: Paul E. McKenney CommitterDate: Mon, 08 Mar 2021 14:27:43 -08:00 kcsan: Make test follow KUnit style recommendations Per recently added KUnit style recommendations at Documentation/dev-tools/kunit/style.rst, make the following changes to the KCSAN test: 1. Rename 'kcsan-test.c

[tip: core/rcu] rcuscale: Add kfree_rcu() single-argument scale test

2021-04-11 Thread tip-bot2 for Uladzislau Rezki (Sony)
Committer: Paul E. McKenney CommitterDate: Mon, 08 Mar 2021 14:18:07 -08:00 rcuscale: Add kfree_rcu() single-argument scale test The single-argument variant of kfree_rcu() is currently not tested by any member of the rcutoture test suite. This commit therefore adds rcuscale code to test

[tip: core/rcu] refscale: Disable verbose torture-test output

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Mon, 08 Mar 2021 14:23:01 -08:00 refscale: Disable verbose torture-test output Given large numbers of threads, the quantity of torture-test output is sufficient to sometimes result in RCU CPU stall warnings. The probability of these stall warnings

[tip: core/rcu] rcuscale: Disable verbose torture-test output

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Mon, 08 Mar 2021 14:23:01 -08:00 rcuscale: Disable verbose torture-test output Given large numbers of threads, the quantity of torture-test output is sufficient to sometimes result in RCU CPU stall warnings. The probability of these stall warnings

[tip: core/rcu] torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Mon, 22 Mar 2021 08:29:17 -07:00 torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs This commit records the process IDs of the kvm-test-1-run.sh and kvm-test-1-run-qemu.sh scripts to ease monitoring of remotely running instances

[tip: core/rcu] torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Mon, 22 Mar 2021 08:29:16 -07:00 torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh Currently, kvm-test-1-run.sh both builds and runs an rcutorture kernel, which is inconvenient when it is necessary to re-run an old run or to carry out a run

[tip: core/rcu] torture: Add kvm-again.sh to rerun a previous torture-test

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Mon, 22 Mar 2021 08:29:19 -07:00 torture: Add kvm-again.sh to rerun a previous torture-test This commit adds a kvm-again.sh script that, given the results directory of a torture-test run, re-runs that test. This means that the kernels need not be rebuilt

[tip: core/rcu] rcutorture: Test start_poll_synchronize_rcu() and poll_state_synchronize_rcu()

2021-04-11 Thread tip-bot2 for Paul E. McKenney
Committer: Paul E. McKenney CommitterDate: Wed, 24 Mar 2021 17:17:38 -07:00 rcutorture: Test start_poll_synchronize_rcu() and poll_state_synchronize_rcu() This commit causes rcutorture to test the new start_poll_synchronize_rcu() and poll_state_synchronize_rcu() functions. Because

[PATCH 20/25] staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c

2021-04-10 Thread Fabio Aiuto
fix following post-commit hook checkpatch issue: CHECK: Comparison to NULL could be written "psta" 72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854: + if (psta != NULL) { Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 2

[PATCH 18/25] staging: rtl8723bs: put constant on the right side of the test

2021-04-10 Thread Fabio Aiuto
fix following post-commit hook checpatch issues: WARNING: Comparisons should place the constant on the right side of the test 287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738: + if (_SUCCESS != ret) Signed-off-by: Fabio Aiuto --- drivers/staging/rtl8723bs/hal/sdio_halinit.c

Re: [PATCH 2/2] iommu/amd: Remove performance counter pre-initialization test

2021-04-10 Thread David Coe
Results for AMD Ryzen 4700U running Ubuntu 21.04β kernel 5.11.0-13 $ sudo dmesg | grep IOMMU [0.490352] pci :00:00.2: AMD-Vi: IOMMU performance counters supported [0.491985] pci :00:00.2: AMD-Vi: Found IOMMU cap 0x40 [0.493732] perf/amd_iommu: Detected AMD IOMMU #0 (2

<    1   2   3   4   5   6   7   8   9   10   >