This series introduces the selftests/arm directory, which tests 32 and 64-bit
kernel compatibility with 32-bit ELFs running on the Aarch platform.
The need for this bucket of tests is that 32 bit applications built on legacy
ARM architecture must not break on the new Aarch64 platforms and the 64-bi
This patch tests the 4GB VA restriction for 32-bit processes; it is required
to test the compat layer, whether the kernel knows that it is running a 32-bit
process or not. Chunks are allocated until the VA gets exhausted; mmap must
fail beyond 4GB. This is asserted against the VA mappings found
in
This patch introduces two signal tests, and generic test wrappers similar to
selftests/arm64/signal directory, along with the mangling testcases found
therein. arm_cpsr, dumped by the kernel to user space in the ucontext structure
to the signal handler, is mangled with. The kernel must spot this il
This patch introduces an ELF parsing test; the 5th byte of the ELF header
must be 0x01 for a 32-bit process. A basic sanity check is required to ensure
that we are actually testing a 32-bit build.
Signed-off-by: Dev Jain
---
tools/testing/selftests/arm/elf/parse_elf.c | 74 +
Add arm target, individual Makefile targets, and instructions to build the
tests, along with .gitignore files and a config file.
Signed-off-by: Dev Jain
---
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/arm/Makefile | 57 +++
tools/testing
On 19/04/2024 17:49, Conor Dooley wrote:
> On Thu, Apr 18, 2024 at 02:42:26PM +0200, Clément Léger wrote:
>> As stated by Zc* spec:
>>
>> "As C defines the same instructions as Zca, Zcf and Zcd, the rule is that:
>> - C always implies Zca
>> - C+F implies Zcf (RV32 only)
>> - C+D implies Zcd"
On 19/04/2024 17:51, Conor Dooley wrote:
> On Thu, Apr 18, 2024 at 02:42:27PM +0200, Clément Léger wrote:
>> The Zc* standard extension for code reduction introduces new extensions.
>> This patch adds support for Zca, Zcf, Zcd and Zcb. Zce, Zcmt and Zcmp
>> are left out of this patch since they
When KUnit tests are enabled, under very big kernel configurations
(e.g. `allyesconfig`), we can trigger a `rustdoc` ICE [1]:
RUSTDOC TK rust/kernel/lib.rs
error: the compiler unexpectedly panicked. this is a bug.
The reason is that this build step has a duplicated `@rustc_cfg` argument
On Mon, Apr 22, 2024 at 11:13 AM Miguel Ojeda wrote:
>
> When KUnit tests are enabled, under very big kernel configurations
> (e.g. `allyesconfig`), we can trigger a `rustdoc` ICE [1]:
>
> RUSTDOC TK rust/kernel/lib.rs
> error: the compiler unexpectedly panicked. this is a bug.
>
> The r
On 19.04.24 09:43, Ryan Roberts wrote:
Previously soft-dirty was unconditionally exiting with success, even if
one of it's testcases failed. Let's fix that so that failure can be
reported to automated systems properly.
Signed-off-by: Ryan Roberts
---
tools/testing/selftests/mm/soft-dirty.c |
On Mon, Apr 22, 2024 at 10:53:10AM +0200, Clément Léger wrote:
> On 19/04/2024 17:51, Conor Dooley wrote:
> > On Thu, Apr 18, 2024 at 02:42:27PM +0200, Clément Léger wrote:
> >> The Zc* standard extension for code reduction introduces new extensions.
> >> This patch adds support for Zca, Zcf, Zcd a
On Sat, Apr 20, 2024 at 5:17 AM Atish Patra wrote:
>
> This series implements SBI PMU improvements done in SBI v2.0[1] i.e. PMU
> snapshot
> and fw_read_hi() functions.
>
> SBI v2.0 introduced PMU snapshot feature which allows the SBI implementation
> to provide counter information (i.e. values/o
On 22/04/2024 11:35, Conor Dooley wrote:
> On Mon, Apr 22, 2024 at 10:53:10AM +0200, Clément Léger wrote:
>> On 19/04/2024 17:51, Conor Dooley wrote:
>>> On Thu, Apr 18, 2024 at 02:42:27PM +0200, Clément Léger wrote:
The Zc* standard extension for code reduction introduces new extensions.
>
On Mon, Apr 22, 2024 at 10:53:04AM +0200, Clément Léger wrote:
> On 19/04/2024 17:49, Conor Dooley wrote:
> > On Thu, Apr 18, 2024 at 02:42:26PM +0200, Clément Léger wrote:
> >> As stated by Zc* spec:
> >>
> >> "As C defines the same instructions as Zca, Zcf and Zcd, the rule is that:
> >> - C alw
On Mon, Apr 22, 2024 at 01:14:26PM +0200, Clément Léger wrote:
> On 22/04/2024 11:35, Conor Dooley wrote:
> > On Mon, Apr 22, 2024 at 10:53:10AM +0200, Clément Léger wrote:
> >> On 19/04/2024 17:51, Conor Dooley wrote:
> >>> On Thu, Apr 18, 2024 at 02:42:27PM +0200, Clément Léger wrote:
> The
On 22/04/2024 13:19, Conor Dooley wrote:
> On Mon, Apr 22, 2024 at 10:53:04AM +0200, Clément Léger wrote:
>> On 19/04/2024 17:49, Conor Dooley wrote:
>>> On Thu, Apr 18, 2024 at 02:42:26PM +0200, Clément Léger wrote:
As stated by Zc* spec:
"As C defines the same instructions as Zc
On 22/04/2024 13:36, Conor Dooley wrote:
> On Mon, Apr 22, 2024 at 01:14:26PM +0200, Clément Léger wrote:
>> On 22/04/2024 11:35, Conor Dooley wrote:
>>> On Mon, Apr 22, 2024 at 10:53:10AM +0200, Clément Léger wrote:
On 19/04/2024 17:51, Conor Dooley wrote:
> On Thu, Apr 18, 2024 at 02:
On Thu, Apr 18, 2024 at 9:51 PM David Woodhouse wrote:
> gpa_t time;
> struct pvclock_vcpu_time_info hv_clock;
> - unsigned int hw_tsc_khz;
> + unsigned int hw_tsc_hz;
Why not change this to u64? 4.3 GHz is scarily close to current
processors, though I expect that it w
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: corrupt_xstate_header: conform test to TAP format
>
Reminder
On 4/14/24 6:21 PM, Muhammad Usama Anjum wrote:
> Soft reminder for this patch
>
> On 3/7/24 11:37 PM, 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-o
fix compiler warning and errors when compiling statmount test.
gcc 12.3 (Ubuntu 12.3.0-1ubuntu1~22.04)
statmount_test.c:572:24: warning: implicit declaration of function
‘offsetof’ [-Wimplicit-function-declaration]
572 | #define str_off(memb) (offsetof(struct statmount, memb) /
sizeof(uint32_t)
The sources for the powerpc selftests are arranged into sub-directories.
However when the tests are built and installed, the sub-directories are
squashed, losing the structure.
For example, with the current code the result of installing the selftests is:
$ tree tools/testing/selftests/kselftest
The pmu Makefile has grown more sub directories over the years. Rather
than open coding the rules for each subdir, use for loops.
Signed-off-by: Michael Ellerman
---
tools/testing/selftests/powerpc/pmu/Makefile | 43 ++--
1 file changed, 22 insertions(+), 21 deletions(-)
v2: Act
The sources for the powerpc selftests are arranged into sub-directories.
However when the tests are built and installed, the sub-directories are
squashed, losing the structure.
For example, with the current code the result of installing the selftests is:
$ tree tools/testing/selftests/kselftest
Michael Ellerman writes:
> The sources for the powerpc selftests are arranged into sub-directories.
> However when the tests are built and installed, the sub-directories are
> squashed, losing the structure.
This is missing a preparatory patch, new version coming.
cheers
On Sun, 21 Apr 2024 13:32:24 -0600 David Ahern wrote:
> On 4/21/24 1:17 PM, Eric Dumazet wrote:
> > I wonder if NLM_F_DUMP_FILTERED should not be reported to user space ?
>
> good point. We do set that flag for other dumps when a filter has been
> used to limit data returned.
That flag appears
On 4/22/24 6:16 PM, Amer Al Shanawany wrote:
> fix compiler warning and errors when compiling statmount test.
>
> gcc 12.3 (Ubuntu 12.3.0-1ubuntu1~22.04)
>
> statmount_test.c:572:24: warning: implicit declaration of function
> ‘offsetof’ [-Wimplicit-function-declaration]
> 572 | #define str_off
On Thu, Apr 18, 2024 at 9:46 PM David Woodhouse wrote:
> + curr_tsc_hz = get_cpu_tsc_khz() * 1000LL;
> + if (unlikely(curr_tsc_hz == 0)) {
> + rc = -EINVAL;
> + goto out;
> + }
> +
> + if (kvm_caps.has_tsc_control)
> + curr_tsc_hz =
On Wed, Apr 17 2024 at 08:37, Nathan Chancellor wrote:
> into the more idiomatic
>
> if (ret)
> ksft_exit_fail();
> ksft_exit_pass();
>
> as well as a few style clean ups now that the code is shorter.
Reviewed-by: Thomas Gleixner
On 16 Apr 2024, at 12:26, Muhammad Usama Anjum wrote:
> Fix the warnings by initializing and marking the variable as unused.
> I've caught the warnings by using clang.
>
> split_huge_page_test.c:303:6: warning: variable 'dummy' set but not used
> [-Wunused-but-set-variable]
> 303 | int
On Mon, 2024-04-22 at 16:11 +0200, Paolo Bonzini wrote:
> On Thu, Apr 18, 2024 at 9:46 PM David Woodhouse wrote:
> > + curr_tsc_hz = get_cpu_tsc_khz() * 1000LL;
> > + if (unlikely(curr_tsc_hz == 0)) {
> > + rc = -EINVAL;
> > + goto out;
> > + }
> > +
>
On Mon, Apr 22, 2024 at 3:48 PM Jakub Kicinski wrote:
>
> On Sun, 21 Apr 2024 13:32:24 -0600 David Ahern wrote:
> > On 4/21/24 1:17 PM, Eric Dumazet wrote:
> > > I wonder if NLM_F_DUMP_FILTERED should not be reported to user space ?
> >
> > good point. We do set that flag for other dumps when a fi
On 4/22/24 7:48 AM, Jakub Kicinski wrote:
> On Sun, 21 Apr 2024 13:32:24 -0600 David Ahern wrote:
>> On 4/21/24 1:17 PM, Eric Dumazet wrote:
>>> I wonder if NLM_F_DUMP_FILTERED should not be reported to user space ?
>>
>> good point. We do set that flag for other dumps when a filter has been
>> u
On Mon, 2024-04-22 at 14:22 +0200, Paolo Bonzini wrote:
> On Thu, Apr 18, 2024 at 9:51 PM David Woodhouse wrote:
> > gpa_t time;
> > struct pvclock_vcpu_time_info hv_clock;
> > - unsigned int hw_tsc_khz;
> > + unsigned int hw_tsc_hz;
>
> Why not change this to u64? 4
On Mon, Apr 22, 2024 at 5:39 PM David Woodhouse wrote:
> > ... especially considering that you did use a 64-bit integer here
> > (though---please use u64 not uint64_t; and BTW if you want to add a
> > patch to change kvm_get_time_scale() to u64, please do.
>
> Meh, I'm used to programming in C. Y
Hi Atish,
On 2024-04-20 10:17 AM, Atish Patra wrote:
> SBI v2.0 SBI introduced PMU snapshot feature which adds the following
> features.
>
> 1. Read counter values directly from the shared memory instead of
> csr read.
> 2. Start multiple counters with initial values with one SBI call.
>
> These
On Mon, 2024-04-22 at 17:54 +0200, Paolo Bonzini wrote:
> On Mon, Apr 22, 2024 at 5:39 PM David Woodhouse wrote:
>
> > > ... especially considering that you did use a 64-bit integer here
> > > (though---please use u64 not uint64_t; and BTW if you want to add a
> > > patch to change kvm_get_time_s
Include kvm_test_harness.h first which will include kselftest_harness.h
for _GNU_SOURCE to get defined first before inclusion of stdio.h. It
is required for declaration of asprintf(). It removes the following
build error caught by clang-17:
In file included from x86_64/fix_hypercall_test.c:12:
In
On Mon, Apr 22, 2024 at 12:37:13PM +0530, Dev Jain wrote:
> This series introduces the selftests/arm directory, which tests 32 and 64-bit
> kernel compatibility with 32-bit ELFs running on the Aarch platform.
> The need for this bucket of tests is that 32 bit applications built on legacy
> ARM arch
On Wed, Apr 03, 2024 at 06:19:35AM -0700, Guenter Roeck wrote:
> Add name of functions triggering warning backtraces to the __bug_table
> object section to enable support for suppressing WARNING backtraces.
>
> To limit image size impact, the pointer to the function name is only added
> to the __b
On Mon, Apr 22, 2024, Muhammad Usama Anjum wrote:
> Include kvm_test_harness.h first which will include kselftest_harness.h
> for _GNU_SOURCE to get defined first before inclusion of stdio.h. It
> is required for declaration of asprintf(). It removes the following
> build error caught by clang-17:
> Subject: [PATCH] KVM: selftest: Define _GNU_SOURCE for all selftests code
>
> Define _GNU_SOURCE is the base CFLAGS instead of relying on selftests to
> manually #define _GNU_SOURCE, which is repetitive and error prone. E.g.
> kselftest_harness.h requres _GNU_SOURCE for asprintf(), but if a sel
On 4/18/24 9:37 AM, Jordan Rife wrote:
The test_sock_addr.{c,sh} can be retired as long as all its tests are migrated
to sock_addr.c
test_sock_addr.c has a few more test dimensions than
prog_tests/sock_addr.c currently does, so it covers a few more
scenarios.
struct sock_addr_test {
const
On Thu, Apr 18, 2024, Yan Zhao wrote:
> On Tue, Apr 16, 2024 at 11:50:19AM -0700, Sean Christopherson wrote:
> > On Mon, Apr 15, 2024, Yan Zhao wrote:
> > > On Mon, Apr 15, 2024 at 08:05:49AM +, Ackerley Tng wrote:
> > > > >> The Intel GHCI Spec says in R12, bit 63 is set if the GPA is valid.
On 4/20/2024 9:03 AM, David Woodhouse wrote:
> On Fri, 2024-04-19 at 16:54 -0700, Chen, Zide wrote:
>>
>> However, the selftest hangs:
>>
>> [Apr19 16:15] kselftest: Running tests in kvm
>> [Apr19 16:16] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
>> [ +0.000628] rcu: 78-...0: (1
This patch series adds unit tests for the clk fixed rate basic type and
the clk registration functions that use struct clk_parent_data. To get
there, we add support for loading device tree overlays onto the live DTB
along with probing platform drivers to bind to device nodes in the
overlays. With t
Add test managed wrappers for of_overlay_apply() that automatically
removes the overlay when the test is finished. This API is intended for
use by KUnit tests that test code which relies on 'struct device_node's
and of_*() APIs.
KUnit tests will call of_overlay_apply_kunit() to load an overlay tha
Add the vendor prefix "test" to reserve a vendor prefix for bindings
that are purely for testing device tree code. This allows test code to
write bindings that can be checked by the schema validator.
Reviewed-by: Rob Herring
Cc: Krzysztof Kozlowski
Cc: Conor Dooley
Signed-off-by: Stephen Boyd
Describe a binding for an empty device node used by KUnit tests to
confirm overlays load properly.
Reviewed-by: Rob Herring
Cc: Krzysztof Kozlowski
Cc: Conor Dooley
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Moar
Signed-off-by: Stephen Boyd
---
.../devicetree/bindings/test/test,empty.yaml
Test the KUnit test managed overlay APIs. Confirm that platform devices
are created and destroyed properly. This provides us confidence that the
test managed APIs work correctly and can be relied upon to provide tests
with fake platform devices and device nodes via overlays compiled into
the kernel
Introduce KUnit resource wrappers around platform_driver_register(),
platform_device_alloc(), and platform_device_add() so that test authors
can register platform drivers/devices from their tests and have the
drivers/devices automatically be unregistered when the test is done.
This makes test setu
Describe a binding for a device that consumes a fixed rate clk in DT so
that a KUnit test can get the clk registered by of_fixed_clk_setup() and
test that it is setup properly.
Reviewed-by: Rob Herring
Cc: Krzysztof Kozlowski
Cc: Conor Dooley
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Moar
Si
Unit tests are more ergonomic and simpler to understand if they don't
have to hoist a bunch of code into the test harness init and exit
functions. Add some test managed wrappers for the clk APIs so that clk
unit tests can write more code in the actual test and less code in the
harness.
Only add AP
Test that the fixed rate basic type clk works as intended.
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Moar
Signed-off-by: Stephen Boyd
---
drivers/clk/.kunitconfig | 2 +
drivers/clk/Kconfig| 8 +
drivers/clk/Makefile | 1 +
Describe a binding for a device that provides and consumes clks in DT so
that a KUnit test can register clks based on the device node and test
clk_hw_register() with clk_parent_data.
Reviewed-by: Rob Herring
Cc: Krzysztof Kozlowski
Cc: Conor Dooley
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Mo
Test that clks registered with 'struct clk_parent_data' work as
intended and can find their parents.
Cc: Christian Marangi
Cc: Brendan Higgins
Cc: David Gow
Cc: Rae Moar
Signed-off-by: Stephen Boyd
---
drivers/clk/Kconfig | 1 +
drivers/clk/Makefile
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
From: John Stultz
[ Upstream commit 076361362122a6d8a4c45f172ced5576b2d4a50d ]
The struct adjtimex freq field takes a signed value who's units are in
shifted (<<16) parts-per-million.
Unfortunately for negative adjustments, the straightforward use of:
freq = ppm << 16 trips undefined behavio
On Mon, Apr 22, 2024 at 11:13 AM Miguel Ojeda wrote:
>
> When KUnit tests are enabled, under very big kernel configurations
> (e.g. `allyesconfig`), we can trigger a `rustdoc` ICE [1]:
>
> RUSTDOC TK rust/kernel/lib.rs
> error: the compiler unexpectedly panicked. this is a bug.
>
> The r
64 matches
Mail list logo