On Sat, 11 Mar 2023 at 07:21, Stephen Boyd <sboyd(a)kernel.org> wrote:
>
> Quoting David Gow (2023-03-02 23:15:35)
> > On Thu, 2 Mar 2023 at 09:38, Stephen Boyd <sboyd(a)kernel.org> wrote:
> > >
> > > 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 APIs that are used for now. More wrappers can be added in the
> > > future as necessary.
> > >
> > > Cc: Brendan Higgins <brendan.higgins(a)linux.dev>
> > > Cc: David Gow <davidgow(a)google.com>
> > > Signed-off-by: Stephen Boyd <sboyd(a)kernel.org>
> > > ---
> >
> > Looks good, modulo bikeshedding below.
>
> Cool!
>
> > >
> > > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > > index e3ca0d058a25..7efce649b0d3 100644
> > > --- a/drivers/clk/Makefile
> > > +++ b/drivers/clk/Makefile
> > > @@ -17,6 +17,11 @@ ifeq ($(CONFIG_OF), y)
> > > obj-$(CONFIG_COMMON_CLK) += clk-conf.o
> > > endif
> > >
> > > +# KUnit specific helpers
> > > +ifeq ($(CONFIG_COMMON_CLK), y)
> > > +obj-$(CONFIG_KUNIT) += clk-kunit.o
> >
> > Do we want to compile these in whenever KUnit is enabled, or only when
> > we're building clk tests specifically? I suspect this would be served
> > better by being under a CLK_KUNIT config option, which all of the
> > tests then depend on. (Whether that's the existing
> > CONFIG_CLK_KUNIT_TEST, and all of the clk tests live under the same
> > config option, or a separate parent option would be up to you).
>
> I was thinking of building it in with whatever mode CONFIG_KUNIT is
> built as. If this is a module because CONFIG_KUNIT=m, then unit tests
> would depend on that, and this would be a module as well. modprobe would
> know that some unit test module depends on symbols provided by
> clk-kunit.ko and thus load clk-kunit.ko first.
>
Personally, I'd rather have this behind CONFIG_CLK_KUNIT_TEST if
possible, if only to avoid needlessly building these if someone just
wants to test some other subsystem (but needs CONFIG_COMMON_CLK
enabled anyway). I doubt it'd be a problem in practice in this case,
but we definitely want to keep build (and hence iteration) times down
as much as possible, so it's probably good practice to keep all tests
behind at least some sort of "test this subsystem" option.
> >
> > Equally, this could be a bit interesting if CONFIG_KUNIT=m. Given
> > CONFIG_COMMON_CLK=y, this would end up as a clk-kunit module, no?
>
> Yes, that is the intent.
>
> >
> > > +endif
> > > +
> > > # hardware specific clock types
> > > # please keep this section sorted lexicographically by file path name
> > > obj-$(CONFIG_COMMON_CLK_APPLE_NCO) += clk-apple-nco.o
> > > diff --git a/drivers/clk/clk-kunit.c b/drivers/clk/clk-kunit.c
> > > new file mode 100644
> > > index 000000000000..78d85b3a7a4a
> > > --- /dev/null
> > > +++ b/drivers/clk/clk-kunit.c
> > > @@ -0,0 +1,204 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * KUnit helpers for clk tests
> > > + */
> > > +#include <linux/clk.h>
> > > +#include <linux/clk-provider.h>
> > > +#include <linux/err.h>
> > > +#include <linux/kernel.h>
> > > +#include <linux/slab.h>
> > > +
> > > +#include <kunit/resource.h>
> > > +
> > > +#include "clk-kunit.h"
> > > +
> > > +static void kunit_clk_disable_unprepare(struct kunit_resource *res)
> >
> > We need to decide on the naming scheme of these, and in particular if
> > they should be kunit_clk or clk_kunit (or something else).
> >
> > I'd lean to clk_kunit, if only to match DRM's KUnit helpers being
> > drm_kunit_helper better, and so that these are more tightly bound to
> > the subsystem being tested.
> > (i.e., so I don't have to scroll through every subsystem's helpers
> > when autocompleting kunit_).
>
> Ok, got it. I was trying to match kunit_kzalloc() style. It makes it
> easy to slap the 'kunit_' prefix on existing auto-completed function
> names like kzalloc() or clk_prepare_enable().
Yeah: my rule of thumb at the moment is to keep the kunit_ prefix for
things which are generic across the whole kernel (and tend to be
implemented in lib/kunit), and to use suffixes or infixes (whichever
works best) for things which are subsystem-specific.
> I wasn't aware of drm_kunit_helper. That's a mouthful! We don't call it
> slab_kunit_helper_kzalloc(). Maybe to satisfy all conditions it should
> be:
>
> clk_prepare_enable_kunit()
>
> so that kunit_ autocomplete doesn't have a big scroll list, and clk
> subsystem autocompletes, and we know it is kunit specific.
Sounds good to me.
Cheers,
-- David
From: Xu Kuohai <xukuohai(a)huawei.com>
This patchset fixes a umin > umax reg bound error and adds cases for it.
v2:
1. add bound check to avoid min > max
2. update 32-bit reg min/max when 64-bit reg value is a constant
3. add Fixes tag
v1: https://lore.kernel.org/bpf/20230307220449.2933650-1-xukuohai@huaweicloud.c…
Xu Kuohai (2):
bpf: Fix a umin > umax reg bound error
selftests/bpf: check bounds not in the 32-bit range
kernel/bpf/verifier.c | 143 ++++++++++++------
tools/testing/selftests/bpf/verifier/bounds.c | 121 +++++++++++++++
2 files changed, 214 insertions(+), 50 deletions(-)
--
2.30.2
This is to add Intel VT-d nested translation based on IOMMUFD nesting
infrastructure. As the iommufd nesting infrastructure series[1], iommu
core supports new ops to report iommu hardware information, allocate
domains with user data and sync stage-1 IOTLB. The data required in
the three paths are vendor-specific, so
1) IOMMU_HW_INFO_TYPE_INTEL_VTD and struct iommu_device_info_vtd are
defined to report iommu hardware information for Intel VT-d .
2) IOMMU_HWPT_DATA_VTD_S1 is defined for the Intel VT-d stage-1 page
table, it will be used in the stage-1 domain allocation and IOTLB
syncing path. struct iommu_hwpt_intel_vtd is defined to pass user_data
for the Intel VT-d stage-1 domain allocation.
struct iommu_hwpt_invalidate_intel_vtd is defined to pass the data for
the Intel VT-d stage-1 IOTLB invalidation.
With above IOMMUFD extensions, the intel iommu driver implements the three
callbacks to support nested translation.
Complete code can be found in [2], QEMU could can be found in [3].
base-commit: f01f1c95684dd18c15dd0e51b4fd6e796a0a2c0e
[1] https://lore.kernel.org/linux-iommu/20230309080910.607396-1-yi.l.liu@intel.…
[2] https://github.com/yiliu1765/iommufd/tree/iommufd_nesting
[3] https://github.com/yiliu1765/qemu/tree/wip/iommufd_rfcv3%2Bnesting
Change log:
v2:
- The iommufd infrastructure is split to be separate series.
v1: https://lore.kernel.org/linux-iommu/20230209043153.14964-1-yi.l.liu@intel.c…
Regards,
Yi Liu
Lu Baolu (4):
iommu/vt-d: Implement hw_info for iommu capability query
iommu/vt-d: Extend dmar_domain to support nested domain
iommu/vt-d: Add helper to setup pasid nested translation
iommu/vt-d: Add nested domain support
Yi Liu (1):
iommufd: Add nesting related data structures for Intel VT-d
drivers/iommu/intel/Makefile | 2 +-
drivers/iommu/intel/iommu.c | 57 ++++++++---
drivers/iommu/intel/iommu.h | 51 ++++++++--
drivers/iommu/intel/nested.c | 143 +++++++++++++++++++++++++++
drivers/iommu/intel/pasid.c | 142 ++++++++++++++++++++++++++
drivers/iommu/intel/pasid.h | 2 +
drivers/iommu/iommufd/hw_pagetable.c | 7 +-
drivers/iommu/iommufd/main.c | 5 +
include/uapi/linux/iommufd.h | 136 +++++++++++++++++++++++++
9 files changed, 522 insertions(+), 23 deletions(-)
create mode 100644 drivers/iommu/intel/nested.c
--
2.34.1
Hi,
This series enables deadlock detection for srcu_read_lock() vs
synchronize_srcu().
Again, my first time helping prepare PR, so please take a careful look
and yell at me if there is something wrong. Thanks a lot!
You will also be able to find the series at:
https://github/fbq/linux rcu/lockdep.2023.03.12a
top commit is:
24390de55773
List of changes:
Boqun Feng (4):
locking/lockdep: Introduce lock_sync()
rcu: Annotate SRCU's update-side lockdep dependencies
locking: Reduce the number of locks in ww_mutex stress tests
locking/lockdep: Improve the deadlock scenario print for sync and read
lock
Paul E. McKenney (3):
rcutorture: Add SRCU deadlock scenarios
rcutorture: Add RCU Tasks Trace and SRCU deadlock scenarios
rcutorture: Add srcu_lockdep.sh
include/linux/lockdep.h | 8 +-
include/linux/srcu.h | 34 +++-
kernel/locking/lockdep.c | 64 +++++-
kernel/locking/test-ww_mutex.c | 2 +-
kernel/rcu/rcutorture.c | 185 ++++++++++++++++++
kernel/rcu/srcutiny.c | 2 +
kernel/rcu/srcutree.c | 2 +
.../selftests/rcutorture/bin/srcu_lockdep.sh | 73 +++++++
8 files changed, 359 insertions(+), 11 deletions(-)
create mode 100755 tools/testing/selftests/rcutorture/bin/srcu_lockdep.sh
--
2.39.2
selftests: arm64 below list of test cases fails on Linux next and
Linux mainline builds with clang-16 and gcc-12 kernel booted on
recently configured tuxrun qemu-arm64 (v7.2) enabled with MTE=on.
Am I missing anything on test configs / environment ?
List of selftests: arm64 test failures,
- not ok 38 selftests: arm64: check_buffer_fill # exit=1
- not ok 39 selftests: arm64: check_child_memory # exit=1
- not ok 41 selftests: arm64: check_ksm_options # exit=1
- not ok 42 selftests: arm64: check_mmap_options # exit=1
- not ok 44 selftests: arm64: check_tags_inclusion # exit=1
Reported-by: Linux Kernel Functional Testing <lkft(a)linaro.org>
Test log:
--------
[ 0.000000] Linux version 6.3.0-rc3-next-20230320 (tuxmake@tuxmake)
(Debian clang version 16.0.0
(++20230314094206+fce3e75e01ba-1~exp1~20230314094258.55), Debian LLD
16.0.0) #1 SMP PREEMPT @1679285968
..
[ 0.000000] CPU features: detected: Memory Tagging Extension
..
# selftests: arm64: check_buffer_fill
# 1..20
# not ok 1 Check buffer correctness by byte with sync err mode and mmap memory
# not ok 2 Check buffer correctness by byte with async err mode and mmap memory
# not ok 3 Check buffer correctness by byte with sync err mode and
mmap/mprotect memory
# not ok 4 Check buffer correctness by byte with async err mode and
mmap/mprotect memory
# not ok 5 Check buffer write underflow by byte with sync mode and mmap memory
# not ok 6 Check buffer write underflow by byte with async mode and mmap memory
# ok 7 Check buffer write underflow by byte with tag check fault
ignore and mmap memory
# ok 8 Check buffer write underflow by byte with sync mode and mmap memory
# ok 9 Check buffer write underflow by byte with async mode and mmap memory
# ok 10 Check buffer write underflow by byte with tag check fault
ignore and mmap memory
# not ok 11 Check buffer write overflow by byte with sync mode and mmap memory
# not ok 12 Check buffer write overflow by byte with async mode and mmap memory
# ok 13 Check buffer write overflow by byte with tag fault ignore mode
and mmap memory
# not ok 14 Check buffer write correctness by block with sync mode and
mmap memory
# not ok 15 Check buffer write correctness by block with async mode
and mmap memory
# ok 16 Check buffer write correctness by block with tag fault ignore
and mmap memory
# ok 17 Check initial tags with private mapping, sync error mode and mmap memory
# ok 18 Check initial tags with private mapping, sync error mode and
mmap/mprotect memory
# ok 19 Check initial tags with shared mapping, sync error mode and mmap memory
# ok 20 Check initial tags with shared mapping, sync error mode and
mmap/mprotect memory
# # Totals: pass:10 fail:10 xfail:0 xpass:0 skip:0 error:0
not ok 38 selftests: arm64: check_buffer_fill # exit=1
# selftests: arm64: check_child_memory
# 1..12
# not ok 1 Check child anonymous memory with private mapping, precise
mode and mmap memory
# not ok 2 Check child anonymous memory with shared mapping, precise
mode and mmap memory
# not ok 3 Check child anonymous memory with private mapping,
imprecise mode and mmap memory
# not ok 4 Check child anonymous memory with shared mapping, imprecise
mode and mmap memory
# not ok 5 Check child anonymous memory with private mapping, precise
mode and mmap/mprotect memory
# not ok 6 Check child anonymous memory with shared mapping, precise
mode and mmap/mprotect memory
# not ok 7 Check child file memory with private mapping, precise mode
and mmap memory
# not ok 8 Check child file memory with shared mapping, precise mode
and mmap memory
# not ok 9 Check child file memory with private mapping, imprecise
mode and mmap memory
# not ok 10 Check child file memory with shared mapping, imprecise
mode and mmap memory
# not ok 11 Check child file memory with private mapping, precise mode
and mmap/mprotect memory
# not ok 12 Check child file memory with shared mapping, precise mode
and mmap/mprotect memory
# # Totals: pass:0 fail:12 xfail:0 xpass:0 skip:0 error:0
not ok 39 selftests: arm64: check_child_memory # exit=1
# selftests: arm64: check_ksm_options
# 1..4
# # Invalid MTE synchronous exception caught!
not ok 41 selftests: arm64: check_ksm_options # exit=1
# selftests: arm64: check_mmap_options
# 1..22
# ok 1 Check anonymous memory with private mapping, sync error mode,
mmap memory and tag check off
# ok 2 Check file memory with private mapping, sync error mode,
mmap/mprotect memory and tag check off
# ok 3 Check anonymous memory with private mapping, no error mode,
mmap memory and tag check off
# ok 4 Check file memory with private mapping, no error mode,
mmap/mprotect memory and tag check off
# not ok 5 Check anonymous memory with private mapping, sync error
mode, mmap memory and tag check on
# not ok 6 Check anonymous memory with private mapping, sync error
mode, mmap/mprotect memory and tag check on
# not ok 7 Check anonymous memory with shared mapping, sync error
mode, mmap memory and tag check on
# not ok 8 Check anonymous memory with shared mapping, sync error
mode, mmap/mprotect memory and tag check on
# not ok 9 Check anonymous memory with private mapping, async error
mode, mmap memory and tag check on
# not ok 10 Check anonymous memory with private mapping, async error
mode, mmap/mprotect memory and tag check on
# not ok 11 Check anonymous memory with shared mapping, async error
mode, mmap memory and tag check on
# not ok 12 Check anonymous memory with shared mapping, async error
mode, mmap/mprotect memory and tag check on
# not ok 13 Check file memory with private mapping, sync error mode,
mmap memory and tag check on
# not ok 14 Check file memory with private mapping, sync error mode,
mmap/mprotect memory and tag check on
# not ok 15 Check file memory with shared mapping, sync error mode,
mmap memory and tag check on
# not ok 16 Check file memory with shared mapping, sync error mode,
mmap/mprotect memory and tag check on
# not ok 17 Check file memory with private mapping, async error mode,
mmap memory and tag check on
# not ok 18 Check file memory with private mapping, async error mode,
mmap/mprotect memory and tag check on
# not ok 19 Check file memory with shared mapping, async error mode,
mmap memory and tag check on
# not ok 20 Check file memory with shared mapping, async error mode,
mmap/mprotect memory and tag check on
# not ok 21 Check clear PROT_MTE flags with private mapping, sync
error mode and mmap memory
# not ok 22 Check clear PROT_MTE flags with private mapping and sync
error mode and mmap/mprotect memory
# # Totals: pass:4 fail:18 xfail:0 xpass:0 skip:0 error:0
not ok 42 selftests: arm64: check_mmap_options # exit=1
# selftests: arm64: check_tags_inclusion
# 1..4
# # Unexpected fault recorded for 0xb00ffff97724000-0xb00ffff97724050 in mode 1
# not ok 1 Check an included tag value with sync mode
# # Unexpected fault recorded for 0xc00ffff97724000-0xc00ffff97724050 in mode 1
# not ok 2 Check different included tags value with sync mode
# ok 3 Check none included tags value with sync mode
# # Unexpected fault recorded for 0xc00ffff97724000-0xc00ffff97724050 in mode 1
# not ok 4 Check all included tags value with sync mode
# # Totals: pass:1 fail:3 xfail:0 xpass:0 skip:0 error:0
not ok 44 selftests: arm64: check_tags_inclusion # exit=1
steps to reproduce:
-------
# To install tuxrun on your system globally:
# sudo pip3 install -U tuxrun==0.38.1
#
# See https://tuxrun.org/ for complete documentation.
tuxrun \
--runtime podman \
--device qemu-arm64 \
--boot-args rw \
--kernel https://storage.tuxsuite.com/public/linaro/lkft/builds/2NGM7Z86D9eB4UfDbhPF…
\
--modules https://storage.tuxsuite.com/public/linaro/lkft/builds/2NGM7Z86D9eB4UfDbhPF…
\
--rootfs https://storage.tuxboot.com/debian/bookworm/arm64/rootfs.ext4.xz \
--parameters SKIPFILE=skipfile-lkft.yaml \
--parameters KSELFTEST=https://storage.tuxsuite.com/public/linaro/lkft/builds/2NGM7Z86D9…
\
--image docker.io/lavasoftware/lava-dispatcher:2023.01.0020.gc1598238f \
--tests kselftest-arm64 \
--timeouts boot=30 kselftest-arm64=60
Boot command:
......
/usr/bin/qemu-system-aarch64 \
-cpu max,pauth-impdef=on \
-machine virt,gic-version=3,mte=on \
-nographic \
-nic none \
-m 4G \
-monitor none \
-no-reboot \
-smp 2 \
-kernel Image \
-append \"console=ttyAMA0,115200 rootwait root=/dev/vda debug verbose
console_msg_format=syslog rw earlycon\" \
-drive file=/debian_bookworm_arm64_rootfs.ext4,if=none,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0
Test log links,
Linux next:
https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230320/te…https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230320/te…https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230320/te…https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230320/te…
mainline:
https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc3/tes…https://qa-reports.linaro.org/lkft/linux-mainline-master/build/v6.3-rc3/tes…
--
Linaro LKFT
https://lkft.linaro.org
When the virtual address range selftest is run on arm64 and x86 platforms,
it is observed that both the low and high VA range iterations are skipped
when the MAP_CHUNK_SIZE is set to 16GB. The MAP_CHUNK_SIZE is changed to
1GB to resolve this issue, following which support for arm64 platform is
added by changing the NR_CHUNKS_HIGH for aarch64 to accommodate up to 4PB
of virtual address space allocation requests. Dynamic memory allocation
of array holding addresses is introduced to prevent overflow of the stack.
Finally, the overcommit_policy is set as OVERCOMMIT_ALWAYS to prevent the
kernel from denying a memory allocation request based on a platform's
physical memory availability.
This series has been tested on 6.3.0-rc1 mainline kernel, both on arm64
and x86 platforms.
Cc: Andrew Morton <akpm(a)linux-foundation.org>
Cc: Shuah Khan <shuah(a)kernel.org>
Cc: linux-mm(a)kvack.org
Cc: linux-kselftest(a)vger.kernel.org
Cc: linux-kernel(a)vger.kernel.org
Chaitanya S Prakash (3):
selftests: Change MAP_CHUNK_SIZE
selftests: Change NR_CHUNKS_HIGH for aarch64
selftests: Set overcommit_policy as OVERCOMMIT_ALWAYS
tools/testing/selftests/mm/run_vmtests.sh | 8 +++++++
.../selftests/mm/virtual_address_range.c | 24 +++++++++++++------
2 files changed, 25 insertions(+), 7 deletions(-)
--
2.30.2
Stack protection is a feature to detect and handle stack buffer
overflows at runtime.
For this to work the compiler and libc have to collaborate.
This patch adds the following parts to nolibc that are required by the
compiler:
* __stack_chk_guard: random sentinel value
* __stack_chk_fail: handler for detected stack smashes
In addition an initialization function is added that randomizes the
sentinel value.
Only support for global guards is implemented.
Register guards are useful in multi-threaded context which nolibc does
not provide support for.
Link: https://lwn.net/Articles/584225/
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
Thomas Weißschuh (5):
tools/nolibc: add definitions for standard fds
tools/nolibc: add helpers for wait() signal exits
tools/nolibc: tests: constify test_names
tools/nolibc: add support for stack protector
tools/nolibc: tests: add test for -fstack-protector
tools/include/nolibc/Makefile | 4 +-
tools/include/nolibc/arch-i386.h | 8 ++-
tools/include/nolibc/arch-x86_64.h | 5 ++
tools/include/nolibc/nolibc.h | 1 +
tools/include/nolibc/stackprotector.h | 48 ++++++++++++++++++
tools/include/nolibc/types.h | 2 +
tools/include/nolibc/unistd.h | 5 ++
tools/testing/selftests/nolibc/Makefile | 12 +++++
tools/testing/selftests/nolibc/nolibc-test.c | 76 ++++++++++++++++++++++++++--
9 files changed, 155 insertions(+), 6 deletions(-)
---
base-commit: b7453ccfdbe0b9e95b488814c53e8cbf8966aae4
change-id: 20230223-nolibc-stackprotector-d4d5f48ff771
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
Use ksft_finished() after running tests so that resctrl_tests doesn't
return exit code 0 when tests fail.
Consequently, report the MBA and MBM tests as skipped when running on
non-Intel hardware, otherwise resctrl_tests will exit with a failure
code.
Signed-off-by: Peter Newman <peternewman(a)google.com>
---
tools/testing/selftests/resctrl/resctrl_tests.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
index df0d8d8526fc..69ebb0d7fff6 100644
--- a/tools/testing/selftests/resctrl/resctrl_tests.c
+++ b/tools/testing/selftests/resctrl/resctrl_tests.c
@@ -77,7 +77,7 @@ static void run_mbm_test(bool has_ben, char **benchmark_cmd, int span,
ksft_print_msg("Starting MBM BW change ...\n");
- if (!validate_resctrl_feature_request(MBM_STR)) {
+ if (!validate_resctrl_feature_request(MBM_STR) || (get_vendor() != ARCH_INTEL)) {
ksft_test_result_skip("Hardware does not support MBM or MBM is disabled\n");
return;
}
@@ -98,7 +98,7 @@ static void run_mba_test(bool has_ben, char **benchmark_cmd, int span,
ksft_print_msg("Starting MBA Schemata change ...\n");
- if (!validate_resctrl_feature_request(MBA_STR)) {
+ if (!validate_resctrl_feature_request(MBA_STR) || (get_vendor() != ARCH_INTEL)) {
ksft_test_result_skip("Hardware does not support MBA or MBA is disabled\n");
return;
}
@@ -258,10 +258,10 @@ int main(int argc, char **argv)
ksft_set_plan(tests ? : 4);
- if ((get_vendor() == ARCH_INTEL) && mbm_test)
+ if (mbm_test)
run_mbm_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
- if ((get_vendor() == ARCH_INTEL) && mba_test)
+ if (mba_test)
run_mba_test(has_ben, benchmark_cmd, span, cpu_no, bw_report);
if (cmt_test)
@@ -272,5 +272,5 @@ int main(int argc, char **argv)
umount_resctrlfs();
- return ksft_exit_pass();
+ ksft_finished();
}
base-commit: c9c3395d5e3dcc6daee66c6908354d47bf98cb0c
--
2.40.0.rc1.284.g88254d51c5-goog
The `devlink -j port show` command output may not contain the "flavour"
key, an example from Ubuntu 22.10 s390x LPAR(5.19.0-37-generic), with
mlx4 driver and iproute2-5.15.0:
{"port":{"pci/0001:00:00.0/1":{"type":"eth","netdev":"ens301"},
"pci/0001:00:00.0/2":{"type":"eth","netdev":"ens301d1"},
"pci/0002:00:00.0/1":{"type":"eth","netdev":"ens317"},
"pci/0002:00:00.0/2":{"type":"eth","netdev":"ens317d1"}}}
This will cause a KeyError exception.
Create a validate_devlink_output() to check for this "flavour" from
devlink command output to avoid this KeyError exception. Also let
it handle the check for `devlink -j dev show` output in main().
Apart from this, if the test was not started because the max lanes of
the designated device is 0. The script will still return 0 and thus
causing a false-negative test result.
Use a found_max_lanes flag to determine if these tests were skipped
due to this reason and return KSFT_SKIP to make it more clear.
V2: factor out the skip logic from main(), update commit message and
skip reasons accordingly.
V3: rename flag as Jakub suggested, update commit message
Link: https://bugs.launchpad.net/bugs/1937133
Fixes: f3348a82e727 ("selftests: net: Add port split test")
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/net/devlink_port_split.py | 36 +++++++++++++++++++----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/devlink_port_split.py b/tools/testing/selftests/net/devlink_port_split.py
index 2b5d6ff..2d84c7a 100755
--- a/tools/testing/selftests/net/devlink_port_split.py
+++ b/tools/testing/selftests/net/devlink_port_split.py
@@ -59,6 +59,8 @@ class devlink_ports(object):
assert stderr == ""
ports = json.loads(stdout)['port']
+ validate_devlink_output(ports, 'flavour')
+
for port in ports:
if dev in port:
if ports[port]['flavour'] == 'physical':
@@ -220,6 +222,27 @@ def split_splittable_port(port, k, lanes, dev):
unsplit(port.bus_info)
+def validate_devlink_output(devlink_data, target_property=None):
+ """
+ Determine if test should be skipped by checking:
+ 1. devlink_data contains values
+ 2. The target_property exist in devlink_data
+ """
+ skip_reason = None
+ if any(devlink_data.values()):
+ if target_property:
+ skip_reason = "{} not found in devlink output, test skipped".format(target_property)
+ for key in devlink_data:
+ if target_property in devlink_data[key]:
+ skip_reason = None
+ else:
+ skip_reason = 'devlink output is empty, test skipped'
+
+ if skip_reason:
+ print(skip_reason)
+ sys.exit(KSFT_SKIP)
+
+
def make_parser():
parser = argparse.ArgumentParser(description='A test for port splitting.')
parser.add_argument('--dev',
@@ -240,12 +263,9 @@ def main(cmdline=None):
stdout, stderr = run_command(cmd)
assert stderr == ""
+ validate_devlink_output(json.loads(stdout))
devs = json.loads(stdout)['dev']
- if devs:
- dev = list(devs.keys())[0]
- else:
- print("no devlink device was found, test skipped")
- sys.exit(KSFT_SKIP)
+ dev = list(devs.keys())[0]
cmd = "devlink dev show %s" % dev
stdout, stderr = run_command(cmd)
@@ -255,6 +275,7 @@ def main(cmdline=None):
ports = devlink_ports(dev)
+ found_max_lanes = False
for port in ports.if_names:
max_lanes = get_max_lanes(port.name)
@@ -277,6 +298,11 @@ def main(cmdline=None):
split_splittable_port(port, lane, max_lanes, dev)
lane //= 2
+ found_max_lanes = True
+
+ if not found_max_lanes:
+ print(f"Test not started, no port of device {dev} reports max_lanes")
+ sys.exit(KSFT_SKIP)
if __name__ == "__main__":
--
2.7.4
--
Greetings,
I am contacting you based on the Investment/Loan opportunity for
companies in need of financing a project/business, We have developed a
new method of financing that doesn't take long to receive financing from
our clients.
If you are looking for funds to finance your project/Business or if
you are willing to work as our agent in your country to find clients in
need of financing and earn commissions, then get back to me for more
details.
Regards,
Ibrahim Tafa
ABIENCE INVESTMENT GROUP FZE, United Arab Emirates
Hi, all!
After running tools/testing/selftests/net/tun, there seems to be some kind of hang
in test "FAIL tun.reattach_delete_close" or "FAIL tun.reattach_close_delete".
Two tests exit by timeout, but the processes left are unkillable, even with kill -9 PID:
[root@pc-mtodorov linux_torvalds]# ps -ef | grep tun
root 1140 1 0 12:16 ? 00:00:00 /bin/bash /usr/sbin/ksmtuned
root 1333 1 0 12:16 ? 00:00:01 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
root 3930 2309 0 12:20 pts/1 00:00:00 tools/testing/selftests/net/tun
root 3952 2309 0 12:21 pts/1 00:00:00 tools/testing/selftests/net/tun
root 4056 3765 0 12:25 pts/1 00:00:00 grep --color=auto tun
[root@pc-mtodorov linux_torvalds]# kill -9 3930 3952
[root@pc-mtodorov linux_torvalds]# ps -ef | grep tun
root 1140 1 0 12:16 ? 00:00:00 /bin/bash /usr/sbin/ksmtuned
root 1333 1 0 12:16 ? 00:00:01 /usr/libexec/platform-python -Es /usr/sbin/tuned -l -P
root 3930 2309 0 12:20 pts/1 00:00:00 tools/testing/selftests/net/tun
root 3952 2309 0 12:21 pts/1 00:00:00 tools/testing/selftests/net/tun
root 4060 3765 0 12:25 pts/1 00:00:00 grep --color=auto tun
[root@pc-mtodorov linux_torvalds]#
The kernel seems to be stuck in some loop, and filling the log with the
following messages until reboot, where it is also waiting very long on the
situation to timeout, which apparently never happens.
Mar 14 11:54:09 pc-mtodorov kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3
Mar 14 11:54:19 pc-mtodorov kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3
Mar 14 11:54:29 pc-mtodorov kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3
Mar 14 11:54:40 pc-mtodorov kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3
Mar 14 11:54:50 pc-mtodorov kernel: unregister_netdevice: waiting for tap0 to become free. Usage count = 3
The platform is kernel 6.3.0-rc2 on AlmaLinux 8.7 and a LENOVO_MT_10TX_BU_Lenovo_FM_V530S-07ICB
(lshw output attached).
The .config is here:
https://domac.alu.hr/~mtodorov/linux/selftests/net-tun/config-6.3.0-rc2-mg-…
Basically, it is a vanilla Torvalds tree kernel with MGLRU, KMEMLEAK, and CONFIG_DEBUG_KOBJECT enabled.
And devres patch.
Please find the strace of the net/tun run attached.
I am available for additional diagnostics.
Hope this helps.
Best regards,
Mirsad
--
Mirsad Goran Todorovac
Sistem inženjer
Grafički fakultet | Akademija likovnih umjetnosti
Sveučilište u Zagrebu
System engineer
Faculty of Graphic Arts | Academy of Fine Arts
University of Zagreb, Republic of Croatia
This series fixes a few cleanup/error handling problems and cleans up
code.
v2:
- Improved changelogs
- Return NULL directly from malloc_and_init_memory()
- Added patch to convert memalign() to posix_memalign()
- Added patch to correct function comment parameter
- Dropped literal -> define patch for now (likely superceded soon)
Fenghua Yu (1):
selftests/resctrl: Change name from CBM_MASK_PATH to INFO_PATH
Ilpo Järvinen (8):
selftests/resctrl: Return NULL if malloc_and_init_memory() did not
alloc mem
selftests/resctrl: Move ->setup() call outside of test specific
branches
selftests/resctrl: Allow ->setup() to return errors
selftests/resctrl: Check for return value after write_schemata()
selftests/resctrl: Replace obsolete memalign() with posix_memalign()
selftests/resctrl: Change initialize_llc_perf() return type to void
selftests/resctrl: Use remount_resctrlfs() consistently with boolean
selftests/resctrl: Correct get_llc_perf() param in function comment
tools/testing/selftests/resctrl/cache.c | 17 +++++++--------
tools/testing/selftests/resctrl/cat_test.c | 4 ++--
tools/testing/selftests/resctrl/cmt_test.c | 9 ++++----
tools/testing/selftests/resctrl/fill_buf.c | 7 +++++--
tools/testing/selftests/resctrl/mba_test.c | 11 +++++++---
tools/testing/selftests/resctrl/mbm_test.c | 4 ++--
tools/testing/selftests/resctrl/resctrl.h | 6 ++++--
tools/testing/selftests/resctrl/resctrl_val.c | 21 +++++++------------
tools/testing/selftests/resctrl/resctrlfs.c | 2 +-
9 files changed, 41 insertions(+), 40 deletions(-)
--
2.30.2
Dzień dobry,
rozważali Państwo wybór finansowania, które spełni potrzeby firmy, zapewniając natychmiastowy dostęp do gotówki, bez zbędnych przestojów?
Przygotowaliśmy rozwiązania faktoringowe dopasowane do Państwa branży i wielkości firmy, dzięki którym, nie muszą Państwo martwić się o niewypłacalność kontrahentów, ponieważ transakcje są zabezpieczone i posiadają gwarancję spłaty.
Chcą Państwo przeanalizować dostępne opcje?
Pozdrawiam
Szczepan Kiełbasa
Changelog
v4:
* Rebased on top of Jason's series adding replace() and hwpt_alloc()
https://lore.kernel.org/linux-iommu/0-v2-51b9896e7862+8a8c-iommufd_alloc_jg…
* Rebased on top of cdev series v6
https://lore.kernel.org/kvm/20230308132903.465159-1-yi.l.liu@intel.com/
* Dropped the patch that's moved to cdev series.
* Added unmap function pointer sanity before calling it.
* Added "Reviewed-by" from Kevin and Yi.
* Added back the VFIO change updating the ATTACH uAPI.
v3:
https://lore.kernel.org/linux-iommu/cover.1677288789.git.nicolinc@nvidia.co…
* Rebased on top of Jason's iommufd_hwpt branch:
https://lore.kernel.org/linux-iommu/0-v2-406f7ac07936+6a-iommufd_hwpt_jgg@n…
* Dropped patches from this series accordingly. There were a couple of
VFIO patches that will be submitted after the VFIO cdev series. Also,
renamed the series to be "emulated".
* Moved dma_unmap sanity patch to the first in the series.
* Moved dma_unmap sanity to cover both VFIO and IOMMUFD pathways.
* Added Kevin's "Reviewed-by" to two of the patches.
* Fixed a NULL pointer bug in vfio_iommufd_emulated_bind().
* Moved unmap() call to the common place in iommufd_access_set_ioas().
v2:
https://lore.kernel.org/linux-iommu/cover.1675802050.git.nicolinc@nvidia.co…
* Rebased on top of vfio_device cdev v2 series.
* Update the kdoc and commit message of iommu_group_replace_domain().
* Dropped revert-to-core-domain part in iommu_group_replace_domain().
* Dropped !ops->dma_unmap check in vfio_iommufd_emulated_attach_ioas().
* Added missing rc value in vfio_iommufd_emulated_attach_ioas() from the
iommufd_access_set_ioas() call.
* Added a new patch in vfio_main to deny vfio_pin/unpin_pages() calls if
vdev->ops->dma_unmap is not implemented.
* Added a __iommmufd_device_detach helper and let the replace routine do
a partial detach().
* Added restriction on auto_domains to use the replace feature.
* Added the patch "iommufd/device: Make hwpt_list list_add/del symmetric"
from the has_group removal series.
v1:
https://lore.kernel.org/linux-iommu/cover.1675320212.git.nicolinc@nvidia.co…
Hi all,
The existing IOMMU APIs provide a pair of functions: iommu_attach_group()
for callers to attach a device from the default_domain (NULL if not being
supported) to a given iommu domain, and iommu_detach_group() for callers
to detach a device from a given domain to the default_domain. Internally,
the detach_dev op is deprecated for the newer drivers with default_domain.
This means that those drivers likely can switch an attaching domain to
another one, without stagging the device at a blocking or default domain,
for use cases such as:
1) vPASID mode, when a guest wants to replace a single pasid (PASID=0)
table with a larger table (PASID=N)
2) Nesting mode, when switching the attaching device from an S2 domain
to an S1 domain, or when switching between relevant S1 domains.
This series is rebased on top of Jason Gunthorpe's series that introduces
iommu_group_replace_domain API and IOMMUFD infrastructure for the IOMMUFD
"physical" devices. The IOMMUFD "emulated" deivces will need some extra
steps to replace the access->ioas object and its iopt pointer.
You can also find this series on Github:
https://github.com/nicolinc/iommufd/commits/iommu_group_replace_domain-v4
Thank you
Nicolin Chen
Nicolin Chen (5):
vfio: Do not allow !ops->dma_unmap in vfio_pin/unpin_pages()
iommufd/selftest: Add IOMMU_TEST_OP_ACCESS_SET_IOAS coverage
iommufd: Add replace support in iommufd_access_set_ioas()
iommufd/selftest: Add coverage for access->ioas replacement
vfio: Support IO page table replacement
drivers/iommu/iommufd/device.c | 17 +++++++++--
drivers/iommu/iommufd/iommufd_private.h | 1 +
drivers/iommu/iommufd/iommufd_test.h | 4 +++
drivers/iommu/iommufd/selftest.c | 26 +++++++++++++----
drivers/vfio/iommufd.c | 6 ++--
drivers/vfio/vfio_main.c | 4 +++
include/uapi/linux/vfio.h | 6 ++++
tools/testing/selftests/iommu/iommufd.c | 29 +++++++++++++++++--
tools/testing/selftests/iommu/iommufd_utils.h | 22 ++++++++++++--
9 files changed, 101 insertions(+), 14 deletions(-)
--
2.39.2
On Sat, 11 Mar 2023 at 07:34, Stephen Boyd <sboyd(a)kernel.org> wrote:
>
> Quoting David Gow (2023-03-10 00:09:48)
> > On Fri, 10 Mar 2023 at 07:19, Stephen Boyd <sboyd(a)kernel.org> wrote:
> > >
> > >
> > > Hmm. I think you're suggesting that the unit test data be loaded
> > > whenever CONFIG_OF=y and CONFIG_KUNIT=y. Then tests can check for
> > > CONFIG_OF and skip if it isn't enabled?
> > >
> >
> > More of the opposite: that we should have some way of supporting tests
> > which might want to use a DTB other than the built-in one. Mostly for
> > non-UML situations where an actual devicetree is needed to even boot
> > far enough to get test output (so we wouldn't be able to override it
> > with a compiled-in test one).
>
> Ok, got it.
>
> >
> > I think moving to overlays probably will render this idea obsolete:
> > but the thought was to give test code a way to check for the required
> > devicetree nodes at runtime, and skip the test if they weren't found.
> > That way, the failure mode for trying to boot this on something which
> > required another device tree for, e.g., serial, would be "these tests
> > are skipped because the wrong device tree is loaded", not "I get no
> > output because serial isn't working".
> >
> > Again, though, it's only really needed for non-UML, and just loading
> > overlays as needed should be much more sensible anyway.
>
> I still have one niggle here. Loading overlays requires
> CONFIG_OF_OVERLAY, and the overlay loading API returns -ENOTSUPP when
> CONFIG_OF_OVERLAY=n. For now I'm checking for the config being enabled
> in each test, but I'm thinking it may be better to simply call
> kunit_skip() from the overlay loading function if the config is
> disabled. This way tests can simply call the overlay loading function
> and we'll halt the test immediately if the config isn't enabled.
>
That sounds sensible, though there is a potential pitfall. If
kunit_skip() is called directly from overlay code, might introduce a
dependency on kunit.ko from the DT overlay, which we might not want.
The solution there is either to have a kunit wrapper function (so the
call is already in kunit.ko), or to have a hook to skip the current
test (which probably makes sense to do anyway, but I think the wrapper
is the better option).
> >
> > > >
> > > > That being said, I do think that there's probably some sense in
> > > > supporting the compiled-in DTB as well (it's definitely simpler than
> > > > patching kunit.py to always pass the extra command-line option in, for
> > > > example).
> > > > But maybe it'd be nice to have the command-line option override the
> > > > built-in one if present.
> > >
> > > Got it. I need to test loading another DTB on the commandline still, but
> > > I think this won't be a problem. We'll load the unittest-data DTB even
> > > with KUnit on UML, so assuming that works on UML right now it should be
> > > unchanged by this series once I resend.
> >
> > Again, moving to overlays should render this mostly obsolete, no? Or
> > am I misunderstanding how the overlay stuff will work?
>
> Right, overlays make it largely a moot issue. The way the OF unit tests
> work today is by grafting a DTB onto the live tree. I'm reusing that
> logic to graft a container node target for kunit tests to add their
> overlays too. It will be clearer once I post v2.
>
> >
> > One possible future advantage of being able to test with custom DTs at
> > boot time would be for fuzzing (provide random DT properties, see what
> > happens in the test). We've got some vague plans to support a way of
> > passing custom data to tests to support this kind of case (though, if
> > we're using overlays, maybe the test could just patch those if we
> > wanted to do that).
>
> Ah ok. I can see someone making a fuzzer that modifies devicetree
> properties randomly, e.g. using different strings for clock-names.
>
> This reminds me of another issue I ran into. I wanted to test adding the
> same platform device to the platform bus twice to confirm that the
> second device can't be added. That prints a warning, which makes
> kunit.py think that the test has failed because it printed a warning. Is
> there some way to avoid that? I want something like
>
> KUNIT_EXPECT_WARNING(test, <call some function>)
>
> so I can test error cases.
Hmm... I'd've thought that shouldn't be a problem: kunit.py should
ignore most messages during a test, unless it can't find a valid
result line. What does the raw KTAP output look like? (You can get it
from kunit.py by passing the --raw_output option).
That being said, a KUNIT_EXPECT_LOG_MESSAGE() or similar is something
we've wanted for a while. I think that the KASAN folks have been
working on something similar using console tracepoints:
https://lore.kernel.org/all/ebf96ea600050f00ed567e80505ae8f242633640.166611…
Cheers,
-- David
Copy/pasting the code from the kernel-doc here doesn't compile because
kunit_alloc_resource() takes a gfp flags argument. Pass the gfp
argument from the caller to complete the example.
Signed-off-by: Stephen Boyd <sboyd(a)kernel.org>
---
include/kunit/resource.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/kunit/resource.h b/include/kunit/resource.h
index cf6fb8f2ac1b..c0d88b318e90 100644
--- a/include/kunit/resource.h
+++ b/include/kunit/resource.h
@@ -72,7 +72,7 @@ typedef void (*kunit_resource_free_t)(struct kunit_resource *);
* params.gfp = gfp;
*
* return kunit_alloc_resource(test, kunit_kmalloc_init,
- * kunit_kmalloc_free, ¶ms);
+ * kunit_kmalloc_free, gfp, ¶ms);
* }
*
* Resources can also be named, with lookup/removal done on a name
base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Hi,
This series contains changes for rcutorture and rcu-related tool, which
are targeted for v6.4.
This is my first time helping prepare PRs, so please take a careful look
and yell at me if there is something wrong. Thanks a lot!
You will also be able to find the series at:
https://github/fbq/linux rcu/rcutorture.2023.03.11a
top commit is:
015d88635382
List of changes:
Bhaskar Chowdhury (1):
tools: rcu: Add usage function and check for argument
Paul E. McKenney (5):
rcutorture: Add test_nmis module parameter
rcutorture: Set CONFIG_BOOTPARAM_HOTPLUG_CPU0 to offline CPU 0
rcutorture: Make scenario TREE04 enable lazy call_rcu()
torture: Permit kvm-again.sh --duration to default to previous run
torture: Enable clocksource watchdog with "tsc=watchdog"
Yue Hu (1):
rcutorture: Eliminate variable n_rcu_torture_boost_rterror
Zqiang (1):
rcutorture: Create nocb kthreads only when testing rcu in
CONFIG_RCU_NOCB_CPU=y kernels
kernel/rcu/rcutorture.c | 49 +++++++++++++++----
tools/rcu/extract-stall.sh | 26 +++++++---
.../selftests/rcutorture/bin/kvm-again.sh | 2 +-
.../selftests/rcutorture/bin/torture.sh | 6 +--
.../selftests/rcutorture/configs/rcu/TREE01 | 1 +
.../selftests/rcutorture/configs/rcu/TREE04 | 1 +
6 files changed, 65 insertions(+), 20 deletions(-)
mode change 100644 => 100755 tools/rcu/extract-stall.sh
--
2.39.2
Hi Linus,
Please pull the following Kselftest fixes update for Linux 6.3-rc3.
This kselftest fixes update for Linux 6.3-rc3 consists of a fix to
amd-pstate test Makefile and a fix to LLVM build for i386 and x86_64
in kselftest common lib.mk.
diff is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit fe15c26ee26efa11741a7b632e9f23b01aca4cc6:
Linux 6.3-rc1 (2023-03-05 14:52:03 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-fixes-6.3-rc3
for you to fetch changes up to 624c60f326c6e5a80b008e8a5c7feffe8c27dc72:
selftests: fix LLVM build for i386 and x86_64 (2023-03-10 13:41:10 -0700)
----------------------------------------------------------------
linux-kselftest-fixes-6.3-rc3
This kselftest fixes update for Linux 6.3-rc3 consists of a fix to
amd-pstate test Makefile and a fix to LLVM build for i386 and x86_64
in kselftest common lib.mk.
----------------------------------------------------------------
Guillaume Tucker (2):
selftests: amd-pstate: fix TEST_FILES
selftests: fix LLVM build for i386 and x86_64
tools/testing/selftests/amd-pstate/Makefile | 13 +++++++++----
tools/testing/selftests/lib.mk | 2 ++
2 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------
When running the in-kernel Dhrystone benchmark with
CONFIG_DEBUG_PREEMPT=y:
BUG: using smp_processor_id() in preemptible [00000000] code: bash/938
Fix this by not using smp_processor_id() directly, but instead wrapping
the whole benchmark inside a get_cpu()/put_cpu() pair. This makes sure
the whole benchmark is run on the same CPU core, and the reported values
are consistent.
Fixes: d5528cc16893f1f6 ("lib: add Dhrystone benchmark test")
Reported-by: Tobias Klausmann <klausman(a)schwarzvogel.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217179
Signed-off-by: Geert Uytterhoeven <geert+renesas(a)glider.be>
---
lib/dhry_run.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/dhry_run.c b/lib/dhry_run.c
index f9d33efa6d090604..f15ac666e9d38bd2 100644
--- a/lib/dhry_run.c
+++ b/lib/dhry_run.c
@@ -31,6 +31,7 @@ MODULE_PARM_DESC(iterations,
static void dhry_benchmark(void)
{
+ unsigned int cpu = get_cpu();
int i, n;
if (iterations > 0) {
@@ -45,9 +46,10 @@ static void dhry_benchmark(void)
}
report:
+ put_cpu();
if (n >= 0)
- pr_info("CPU%u: Dhrystones per Second: %d (%d DMIPS)\n",
- smp_processor_id(), n, n / DHRY_VAX);
+ pr_info("CPU%u: Dhrystones per Second: %d (%d DMIPS)\n", cpu,
+ n, n / DHRY_VAX);
else if (n == -EAGAIN)
pr_err("Please increase the number of iterations\n");
else
--
2.34.1
The `devlink -j port show` command output may not contain the "flavour"
key, an example from s390x LPAR with Ubuntu 22.10 (5.19.0-37-generic),
iproute2-5.15.0:
{"port":{"pci/0001:00:00.0/1":{"type":"eth","netdev":"ens301"},
"pci/0001:00:00.0/2":{"type":"eth","netdev":"ens301d1"},
"pci/0002:00:00.0/1":{"type":"eth","netdev":"ens317"},
"pci/0002:00:00.0/2":{"type":"eth","netdev":"ens317d1"}}}
This will cause a KeyError exception.
Create a validate_devlink_output() to check for this "flavour" from
devlink command output to avoid this KeyError exception. Also let
it handle the check for `devlink -j dev show` output in main().
Apart from this, if the test was not started because of any reason
(e.g. "lanes" does not exist, max lanes is 0 or the flavour of the
designated device is not "physical" and etc.) The script will still
return 0 and thus causing a false-negative test result.
Use a test_ran flag to determine if these tests were skipped and
return KSFT_SKIP to make it more clear.
V2: factor out the skip logic from main(), update commit message and
skip reasons accordingly.
Link: https://bugs.launchpad.net/bugs/1937133
Fixes: f3348a82e727 ("selftests: net: Add port split test")
Signed-off-by: Po-Hsu Lin <po-hsu.lin(a)canonical.com>
---
tools/testing/selftests/net/devlink_port_split.py | 36 +++++++++++++++++++----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/devlink_port_split.py b/tools/testing/selftests/net/devlink_port_split.py
index 2b5d6ff..749606c 100755
--- a/tools/testing/selftests/net/devlink_port_split.py
+++ b/tools/testing/selftests/net/devlink_port_split.py
@@ -59,6 +59,8 @@ class devlink_ports(object):
assert stderr == ""
ports = json.loads(stdout)['port']
+ validate_devlink_output(ports, 'flavour')
+
for port in ports:
if dev in port:
if ports[port]['flavour'] == 'physical':
@@ -220,6 +222,27 @@ def split_splittable_port(port, k, lanes, dev):
unsplit(port.bus_info)
+def validate_devlink_output(devlink_data, target_property=None):
+ """
+ Determine if test should be skipped by checking:
+ 1. devlink_data contains values
+ 2. The target_property exist in devlink_data
+ """
+ skip_reason = None
+ if any(devlink_data.values()):
+ if target_property:
+ skip_reason = "{} not found in devlink output, test skipped".format(target_property)
+ for key in devlink_data:
+ if target_property in devlink_data[key]:
+ skip_reason = None
+ else:
+ skip_reason = 'devlink output is empty, test skipped'
+
+ if skip_reason:
+ print(skip_reason)
+ sys.exit(KSFT_SKIP)
+
+
def make_parser():
parser = argparse.ArgumentParser(description='A test for port splitting.')
parser.add_argument('--dev',
@@ -231,6 +254,7 @@ def make_parser():
def main(cmdline=None):
+ test_ran = False
parser = make_parser()
args = parser.parse_args(cmdline)
@@ -240,12 +264,9 @@ def main(cmdline=None):
stdout, stderr = run_command(cmd)
assert stderr == ""
+ validate_devlink_output(json.loads(stdout))
devs = json.loads(stdout)['dev']
- if devs:
- dev = list(devs.keys())[0]
- else:
- print("no devlink device was found, test skipped")
- sys.exit(KSFT_SKIP)
+ dev = list(devs.keys())[0]
cmd = "devlink dev show %s" % dev
stdout, stderr = run_command(cmd)
@@ -277,6 +298,11 @@ def main(cmdline=None):
split_splittable_port(port, lane, max_lanes, dev)
lane //= 2
+ test_ran = True
+
+ if not test_ran:
+ print("Test not started, no suitable device for the test")
+ sys.exit(KSFT_SKIP)
if __name__ == "__main__":
--
2.7.4
Hi Stephen,
On Thu, Mar 09, 2023 at 03:31:15PM -0800, Stephen Boyd wrote:
> Quoting Maxime Ripard (2023-03-03 06:35:28)
> > On Fri, Mar 03, 2023 at 03:15:31PM +0800, David Gow wrote:
> > >
> > > DRM has a similar thing already (albeit with a root_device, which is
> > > more common with KUnit tests generally):
> > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/inc…
> > >
> > > But that's reasonably drm-specific, so it makes sense that it lives
> > > with DRM stuff. platform_device is a bit more generic.
> >
> > I'd be very happy to get something from the core to address the same
> > thing.
> >
> > I think the main thing we needed that isn't covered by this patch is we
> > wanted the device to be bound to its driver, so with probe being called
> > before calling the test (see 57a84a97bbda).
>
> Can you clarify? This patch makes a poor attempt at waiting for the
> platform driver to bind, but in reality it may not be bound by the time
> the driver register function returns.
The issue was that devm will only clean up the resources if the device
was bound to a driver so we were exhausting resources when running
dozens of test in a sequence.
The way I solved it for vc4 was to create a dumb platform driver with a
waitqueue, and wait for probe to be called.
I think we could make it more generic by allowing a pointer to a probe
function and calling it into our own probe implementation. What do you
think?
Maxime
This series, currently based on 6.3-rc1, is divided into two parts:
- Commits 1-3 refactor userfaultfd ioctl code without behavior changes, with the
main goal of improving consistency and reducing the number of function args.
- Commit 4 adds UFFDIO_CONTINUE_MODE_WP.
The refactors are sorted by increasing controversial-ness, the idea being we
could drop some of the refactors if they are deemed not worth it.
Changelog:
v4->v5:
- rename "uffd_flags_has_mode" to "uffd_flags_mode_is"
- modify "uffd_flags_set_mode" to clear mode bits before setting new mode
- update userfaultfd documentation to describe new mode flag
v3->v4:
- massage the uffd_flags_t implementation to eliminate all sparse warnings
- add a couple inline helpers to make uffd_flags_t usage easier
- drop the refactor passing `struct uffdio_range *` around (previously 4/5)
- define a temporary `struct mm_struct *` in function with >=3 `vma->vm_mm`
- consistent argument order between `flags` and `pagep`
- expand on the use case in patch 4/4 message
v2->v3:
- rebase onto 6.3-rc1
- typedef a new type for mfill flags in patch 3/5 (suggested by Nadav)
v1->v2:
- refactor before adding the new flag, to avoid perpetuating messiness
Axel Rasmussen (4):
mm: userfaultfd: rename functions for clarity + consistency
mm: userfaultfd: don't pass around both mm and vma
mm: userfaultfd: combine 'mode' and 'wp_copy' arguments
mm: userfaultfd: add UFFDIO_CONTINUE_MODE_WP to install WP PTEs
Documentation/admin-guide/mm/userfaultfd.rst | 8 +
fs/userfaultfd.c | 29 ++--
include/linux/hugetlb.h | 27 ++-
include/linux/shmem_fs.h | 9 +-
include/linux/userfaultfd_k.h | 69 +++++---
include/uapi/linux/userfaultfd.h | 7 +
mm/hugetlb.c | 28 +--
mm/shmem.c | 14 +-
mm/userfaultfd.c | 170 +++++++++----------
tools/testing/selftests/mm/userfaultfd.c | 4 +
10 files changed, 196 insertions(+), 169 deletions(-)
--
2.40.0.rc1.284.g88254d51c5-goog
From: Ross Zwisler <zwisler(a)google.com>
The canonical location for the tracefs filesystem is at /sys/kernel/tracing.
But, from Documentation/trace/ftrace.rst:
Before 4.1, all ftrace tracing control files were within the debugfs
file system, which is typically located at /sys/kernel/debug/tracing.
For backward compatibility, when mounting the debugfs file system,
the tracefs file system will be automatically mounted at:
/sys/kernel/debug/tracing
Many comments and samples in the bpf code still refer to this older
debugfs path, so let's update them to avoid confusion. There are a few
spots where the bpf code explicitly checks both tracefs and debugfs
(tools/bpf/bpftool/tracelog.c and tools/lib/api/fs/fs.c) and I've left
those alone so that the tools can continue to work with both paths.
Signed-off-by: Ross Zwisler <zwisler(a)google.com>
Acked-by: Michael S. Tsirkin <mst(a)redhat.com>
---
v2 was submitted to bpf-next via a pair of pull requests:
https://github.com/kernel-patches/bpf/pull/4672https://github.com/kernel-patches/bpf/pull/4648
The only change since v2 is that I rebased on the current bpf-next_base.
I've run this through all the BPF selftests on a local machine:
sudo ./test_verifier
sudo make run_tests
and didn't hit any regressions. I've also tested to make sure each
modified selftest runs successfully with each path of tracefs (with and
without debugfs).
---
include/uapi/linux/bpf.h | 8 ++++----
samples/bpf/cpustat_kern.c | 4 ++--
samples/bpf/hbm.c | 4 ++--
samples/bpf/ibumad_kern.c | 4 ++--
samples/bpf/lwt_len_hist.sh | 2 +-
samples/bpf/offwaketime_kern.c | 2 +-
samples/bpf/task_fd_query_user.c | 4 ++--
samples/bpf/test_lwt_bpf.sh | 2 +-
samples/bpf/test_overhead_tp.bpf.c | 4 ++--
tools/include/uapi/linux/bpf.h | 8 ++++----
10 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index d8c534e05b0a..13129df937cd 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1647,17 +1647,17 @@ union bpf_attr {
* Description
* This helper is a "printk()-like" facility for debugging. It
* prints a message defined by format *fmt* (of size *fmt_size*)
- * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if
+ * to file *\/sys/kernel/tracing/trace* from TraceFS, if
* available. It can take up to three additional **u64**
* arguments (as an eBPF helpers, the total number of arguments is
* limited to five).
*
* Each time the helper is called, it appends a line to the trace.
- * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
- * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
+ * Lines are discarded while *\/sys/kernel/tracing/trace* is
+ * open, use *\/sys/kernel/tracing/trace_pipe* to avoid this.
* The format of the trace is customizable, and the exact output
* one will get depends on the options set in
- * *\/sys/kernel/debug/tracing/trace_options* (see also the
+ * *\/sys/kernel/tracing/trace_options* (see also the
* *README* file under the same directory). However, it usually
* defaults to something like:
*
diff --git a/samples/bpf/cpustat_kern.c b/samples/bpf/cpustat_kern.c
index 5aefd19cdfa1..944f13fe164a 100644
--- a/samples/bpf/cpustat_kern.c
+++ b/samples/bpf/cpustat_kern.c
@@ -76,8 +76,8 @@ struct {
/*
* The trace events for cpu_idle and cpu_frequency are taken from:
- * /sys/kernel/debug/tracing/events/power/cpu_idle/format
- * /sys/kernel/debug/tracing/events/power/cpu_frequency/format
+ * /sys/kernel/tracing/events/power/cpu_idle/format
+ * /sys/kernel/tracing/events/power/cpu_frequency/format
*
* These two events have same format, so define one common structure.
*/
diff --git a/samples/bpf/hbm.c b/samples/bpf/hbm.c
index 516fbac28b71..ff58ec43f56a 100644
--- a/samples/bpf/hbm.c
+++ b/samples/bpf/hbm.c
@@ -65,7 +65,7 @@ static void Usage(void);
static void read_trace_pipe2(void);
static void do_error(char *msg, bool errno_flag);
-#define DEBUGFS "/sys/kernel/debug/tracing/"
+#define TRACEFS "/sys/kernel/tracing/"
static struct bpf_program *bpf_prog;
static struct bpf_object *obj;
@@ -77,7 +77,7 @@ static void read_trace_pipe2(void)
FILE *outf;
char *outFname = "hbm_out.log";
- trace_fd = open(DEBUGFS "trace_pipe", O_RDONLY, 0);
+ trace_fd = open(TRACEFS "trace_pipe", O_RDONLY, 0);
if (trace_fd < 0) {
printf("Error opening trace_pipe\n");
return;
diff --git a/samples/bpf/ibumad_kern.c b/samples/bpf/ibumad_kern.c
index 9b193231024a..f07474c72525 100644
--- a/samples/bpf/ibumad_kern.c
+++ b/samples/bpf/ibumad_kern.c
@@ -39,8 +39,8 @@ struct {
/* Taken from the current format defined in
* include/trace/events/ib_umad.h
* and
- * /sys/kernel/debug/tracing/events/ib_umad/ib_umad_read/format
- * /sys/kernel/debug/tracing/events/ib_umad/ib_umad_write/format
+ * /sys/kernel/tracing/events/ib_umad/ib_umad_read/format
+ * /sys/kernel/tracing/events/ib_umad/ib_umad_write/format
*/
struct ib_umad_rw_args {
u64 pad;
diff --git a/samples/bpf/lwt_len_hist.sh b/samples/bpf/lwt_len_hist.sh
index 7078bfcc4f4d..381b2c634784 100755
--- a/samples/bpf/lwt_len_hist.sh
+++ b/samples/bpf/lwt_len_hist.sh
@@ -5,7 +5,7 @@ NS1=lwt_ns1
VETH0=tst_lwt1a
VETH1=tst_lwt1b
BPF_PROG=lwt_len_hist.bpf.o
-TRACE_ROOT=/sys/kernel/debug/tracing
+TRACE_ROOT=/sys/kernel/tracing
function cleanup {
# To reset saved histogram, remove pinned map
diff --git a/samples/bpf/offwaketime_kern.c b/samples/bpf/offwaketime_kern.c
index eb4d94742e6b..23f12b47e9e5 100644
--- a/samples/bpf/offwaketime_kern.c
+++ b/samples/bpf/offwaketime_kern.c
@@ -110,7 +110,7 @@ static inline int update_counts(void *ctx, u32 pid, u64 delta)
}
#if 1
-/* taken from /sys/kernel/debug/tracing/events/sched/sched_switch/format */
+/* taken from /sys/kernel/tracing/events/sched/sched_switch/format */
struct sched_switch_args {
unsigned long long pad;
char prev_comm[TASK_COMM_LEN];
diff --git a/samples/bpf/task_fd_query_user.c b/samples/bpf/task_fd_query_user.c
index a33d74bd3a4b..1e61f2180470 100644
--- a/samples/bpf/task_fd_query_user.c
+++ b/samples/bpf/task_fd_query_user.c
@@ -235,7 +235,7 @@ static int test_debug_fs_uprobe(char *binary_path, long offset, bool is_return)
struct bpf_link *link;
ssize_t bytes;
- snprintf(buf, sizeof(buf), "/sys/kernel/debug/tracing/%s_events",
+ snprintf(buf, sizeof(buf), "/sys/kernel/tracing/%s_events",
event_type);
kfd = open(buf, O_WRONLY | O_TRUNC, 0);
CHECK_PERROR_RET(kfd < 0);
@@ -252,7 +252,7 @@ static int test_debug_fs_uprobe(char *binary_path, long offset, bool is_return)
close(kfd);
kfd = -1;
- snprintf(buf, sizeof(buf), "/sys/kernel/debug/tracing/events/%ss/%s/id",
+ snprintf(buf, sizeof(buf), "/sys/kernel/tracing/events/%ss/%s/id",
event_type, event_alias);
efd = open(buf, O_RDONLY, 0);
CHECK_PERROR_RET(efd < 0);
diff --git a/samples/bpf/test_lwt_bpf.sh b/samples/bpf/test_lwt_bpf.sh
index 2e9f5126963b..0bf2d0f6bf4b 100755
--- a/samples/bpf/test_lwt_bpf.sh
+++ b/samples/bpf/test_lwt_bpf.sh
@@ -21,7 +21,7 @@ IP_LOCAL="192.168.99.1"
PROG_SRC="test_lwt_bpf.c"
BPF_PROG="test_lwt_bpf.o"
-TRACE_ROOT=/sys/kernel/debug/tracing
+TRACE_ROOT=/sys/kernel/tracing
CONTEXT_INFO=$(cat ${TRACE_ROOT}/trace_options | grep context)
function lookup_mac()
diff --git a/samples/bpf/test_overhead_tp.bpf.c b/samples/bpf/test_overhead_tp.bpf.c
index 67cab3881969..8b498328e961 100644
--- a/samples/bpf/test_overhead_tp.bpf.c
+++ b/samples/bpf/test_overhead_tp.bpf.c
@@ -7,7 +7,7 @@
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
-/* from /sys/kernel/debug/tracing/events/task/task_rename/format */
+/* from /sys/kernel/tracing/events/task/task_rename/format */
struct task_rename {
__u64 pad;
__u32 pid;
@@ -21,7 +21,7 @@ int prog(struct task_rename *ctx)
return 0;
}
-/* from /sys/kernel/debug/tracing/events/fib/fib_table_lookup/format */
+/* from /sys/kernel/tracing/events/fib/fib_table_lookup/format */
struct fib_table_lookup {
__u64 pad;
__u32 tb_id;
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index d8c534e05b0a..13129df937cd 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1647,17 +1647,17 @@ union bpf_attr {
* Description
* This helper is a "printk()-like" facility for debugging. It
* prints a message defined by format *fmt* (of size *fmt_size*)
- * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if
+ * to file *\/sys/kernel/tracing/trace* from TraceFS, if
* available. It can take up to three additional **u64**
* arguments (as an eBPF helpers, the total number of arguments is
* limited to five).
*
* Each time the helper is called, it appends a line to the trace.
- * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
- * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
+ * Lines are discarded while *\/sys/kernel/tracing/trace* is
+ * open, use *\/sys/kernel/tracing/trace_pipe* to avoid this.
* The format of the trace is customizable, and the exact output
* one will get depends on the options set in
- * *\/sys/kernel/debug/tracing/trace_options* (see also the
+ * *\/sys/kernel/tracing/trace_options* (see also the
* *README* file under the same directory). However, it usually
* defaults to something like:
*
base-commit: d1d51a62d060d02f99ee407959e24ad10a40e053
prerequisite-patch-id: 9d1a70f239e7476600fe4018125df58a368dc725
prerequisite-patch-id: 29fea9a24684ec09762b277403d7bffffb25cdf3
prerequisite-patch-id: 9cb5a22a0f88413c393ddc29f264fbd96938c598
prerequisite-patch-id: 87ce0f3257a51e8cc06dd21ae3fa4102406ba4b4
prerequisite-patch-id: a46e67372e8493e5f7dab95f72281bd690cbeacf
prerequisite-patch-id: bae92ed6da92da5587f8d54fed5976c7dd6a468a
prerequisite-patch-id: c84726372fab0771a2c2ff0942f13a9556db8740
prerequisite-patch-id: 8a1a8806ec58ca208ee81f83557af90472fcba7f
prerequisite-patch-id: 0f7d6ec99549b042bc37603a2a9034853015a6d6
prerequisite-patch-id: 88a110f7993c374c6df429a1f67706e5abd65a02
prerequisite-patch-id: 3ada332d91275a471e9b65eb532571ef5caad4af
prerequisite-patch-id: e7ade2dda63127886579bf88f3eddda82d6a103b
prerequisite-patch-id: a49488cb1b167a9c85405c142cc3edb7bdb32c3d
prerequisite-patch-id: 9656ecd9c036e140d819c3929f01ac7264452382
prerequisite-patch-id: d1fa19bc1974a78632f48080b4eef3d4d6c07d3d
prerequisite-patch-id: 245b71b3aecf33a9d2a9609fc45f72ac50d1e92a
prerequisite-patch-id: 1253300de46fe258927fd3ddd5009a1468f6e69b
prerequisite-patch-id: 638e5805bdaa8842589729a26707c47a593464c2
prerequisite-patch-id: 1d08f9dfe4c360d566edbee925424b789e0f844b
prerequisite-patch-id: b6c73e77b10fc771566de294973334646cad4d44
prerequisite-patch-id: 57034da9a1b439c9fa3ecca69a099204a339502a
prerequisite-patch-id: ef11bfbcdf2239002958554e2dc5fbe8ec4d6e9a
prerequisite-patch-id: 68c01f7ca5b9c740b9259b73d97f168765c794d0
prerequisite-patch-id: 846110172a75fdaf1017da1fec3709fa301a5a47
prerequisite-patch-id: 8070c339fe5ce2e46b5de76b59d0a3f2c25d9abb
prerequisite-patch-id: c48cc68777605390db454b6392569ccdcd88cdc1
prerequisite-patch-id: 0d36d64d21de2d0df3ac31c5203a5cd868b4be47
prerequisite-patch-id: 6538cefc509c89e2375dcb6dc85d11fb6993474d
prerequisite-patch-id: dc57bbf1190a31aec332cab39f990ac568e6722d
prerequisite-patch-id: 0d90b60b4ce60024f31f576bab79453f6d480a8e
prerequisite-patch-id: 15c1914741be406aeee6c66332f079f3f8367751
prerequisite-patch-id: 78a735554858860fa695dd9e20bf7c5a41fafe20
prerequisite-patch-id: 238aaa7c1f55fdac815a6e14310d074c1ac70983
prerequisite-patch-id: d514061d937de74e8cc3d8848488a60dad2e2a2e
prerequisite-patch-id: 0f1a878f5768b886db78ea0fc6fe17d2297daa2e
prerequisite-patch-id: fa48be79a1e1e1c611d7975501a8f9dfa6f1c4fe
prerequisite-patch-id: 0a193e915faed8479f150c30ba0c335e288f634f
prerequisite-patch-id: 2cab00be3bb34454f98dac426301468e7ef12ad1
prerequisite-patch-id: daa2a81b90fda8ca09d11a35aff5a282e6f76ec2
prerequisite-patch-id: 5001694a51d83ed8ca428855b92b3ead261a469d
--
2.40.0.rc1.284.g88254d51c5-goog
On 3/13/23 5:11 PM, Liu, Jingqi wrote:
>> +struct iommu_domain *intel_nested_domain_alloc(struct iommu_domain *s2_domain,
>> + const void *user_data)
>> +{
>> + const struct iommu_hwpt_intel_vtd *vtd = user_data;
>> + struct dmar_domain *domain;
>> +
>
> Would it be better to add the following check ?
>
> if (WARN_ON(!user_data))
> return NULL;
The iommufd has already done the sanity check. Considering that this
callback is only for iommufd purpose, the individual driver has no need
to check it.
Best regards,
baolu
kselftest: rtc built with clang-16 getting failed but passed with gcc-12
build. Please find more details about test logs on clang-16 and gcc-12
and steps to reproduce locally on your machine by using tuxrun.
On the qemu-x86-64 clang builds it is intermittent failure;
you could notice that from the test history link below.
Reported-by: Linux Kernel Functional Testing <lkft(a)linaro.org>
Test log:
----------
Linux version 6.3.0-rc1-next-20230307 (tuxmake@tuxmake) (Debian clang
version 16.0.0 (++20230228093516+60692a66ced6-1~exp1~20230228093525.41),
Debian LLD 16.0.0) #1 SMP PREEMPT @1678159722
...
kselftest: Running tests in rtc
TAP version 13
1..1
# selftests: rtc: rtctest
# TAP version 13
# 1..8
# # Starting 8 tests from 1 test cases.
# # RUN rtc.date_read ...
# # rtctest.c:54:date_read:Current RTC date/time is 07/03/2023 03:55:04.
# # OK rtc.date_read
# ok 1 rtc.date_read
# # RUN rtc.date_read_loop ...
# # rtctest.c:96:date_read_loop:Continuously reading RTC time for 30s
(with 11ms breaks after every read).
# # rtctest.c:122:date_read_loop:Performed 2630 RTC time reads.
# # OK rtc.date_read_loop
# ok 2 rtc.date_read_loop
# # RUN rtc.uie_read ...
# # OK rtc.uie_read
# ok 3 rtc.uie_read
# # RUN rtc.uie_select ...
# # OK rtc.uie_select
# ok 4 rtc.uie_select
# # RUN rtc.alarm_alm_set ...
# # rtctest.c:222:alarm_alm_set:Alarm time now set to 03:55:44.
# # rtctest.c:241:alarm_alm_set:data: 1a0
# # OK rtc.alarm_alm_set
# ok 5 rtc.alarm_alm_set
# # RUN rtc.alarm_wkalm_set ...
# # rtctest.c:284:alarm_wkalm_set:Alarm time now set to 07/03/2023 03:55:47.
# # rtctest.c:290:alarm_wkalm_set:Expected -1 (-1) != rc (-1)
# # alarm_wkalm_set: Test terminated by assertion
# # FAIL rtc.alarm_wkalm_set
# not ok 6 rtc.alarm_wkalm_set
# # RUN rtc.alarm_alm_set_minute ...
# # rtctest.c:332:alarm_alm_set_minute:Alarm time now set to 03:56:00.
# # rtctest.c:351:alarm_alm_set_minute:data: 1a0
# # OK rtc.alarm_alm_set_minute
# ok 7 rtc.alarm_alm_set_minute
# # RUN rtc.alarm_wkalm_set_minute ...
# # rtctest.c:394:alarm_wkalm_set_minute:Alarm time now set to
07/03/2023 03:57:00.
# # rtctest.c:400:alarm_wkalm_set_minute:Expected -1 (-1) != rc (-1)
# # alarm_wkalm_set_minute: Test terminated by assertion
# # FAIL rtc.alarm_wkalm_set_minute
# not ok 8 rtc.alarm_wkalm_set_minute
# # FAILED: 6 / 8 tests passed.
# # Totals: pass:6 fail:2 xfail:0 xpass:0 skip:0 error:0
Links,
qemu-x86_64:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230306/te…
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230306/te…
qemu-arm64:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
Test history:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
Test log:
---------
Linux version 6.3.0-rc1-next-20230307 (tuxmake@tuxmake)
(aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils
for Debian) 2.40) #1 SMP PREEMPT @1678159736
...
kselftest: Running tests in rtc
TAP version 13
1..1
# selftests: rtc: rtctest
# TAP version 13
# 1..8
# # Starting 8 tests from 1 test cases.
# # RUN rtc.date_read ...
# # rtctest.c:52:date_read:Current RTC date/time is 07/03/2023 03:48:22.
# # OK rtc.date_read
# ok 1 rtc.date_read
# # RUN rtc.date_read_loop ...
# # rtctest.c:95:date_read_loop:Continuously reading RTC time for 30s
(with 11ms breaks after every read).
# # rtctest.c:122:date_read_loop:Performed 2670 RTC time reads.
# # OK rtc.date_read_loop
# ok 2 rtc.date_read_loop
# # RUN rtc.uie_read ...
# # OK rtc.uie_read
# ok 3 rtc.uie_read
# # RUN rtc.uie_select ...
# # OK rtc.uie_select
# ok 4 rtc.uie_select
# # RUN rtc.alarm_alm_set ...
# # rtctest.c:221:alarm_alm_set:Alarm time now set to 03:49:02.
# # rtctest.c:241:alarm_alm_set:data: 1a0
# # OK rtc.alarm_alm_set
# ok 5 rtc.alarm_alm_set
# # RUN rtc.alarm_wkalm_set ...
# # rtctest.c:281:alarm_wkalm_set:Alarm time now set to 07/03/2023 03:49:05.
# # OK rtc.alarm_wkalm_set
# ok 6 rtc.alarm_wkalm_set
# # RUN rtc.alarm_alm_set_minute ...
# # rtctest.c:331:alarm_alm_set_minute:Alarm time now set to 03:50:00.
<47>[ 106.383091] systemd-journald[98]: Sent WATCHDOG=1 notification.
# # rtctest.c:351:alarm_alm_set_minute:data: 1a0
# # OK rtc.alarm_alm_set_minute
# ok 7 rtc.alarm_alm_set_minute
# # RUN rtc.alarm_wkalm_set_minute ...
# # rtctest.c:391:alarm_wkalm_set_minute:Alarm time now set to
07/03/2023 03:51:00.
# # OK rtc.alarm_wkalm_set_minute
# ok 8 rtc.alarm_wkalm_set_minute
# # PASSED: 8 / 8 tests passed.
# # Totals: pass:8 fail:0 xfail:0 xpass:0 skip:0 error:0
ok 1 selftests: rtc: rtctest
Links,
qemu-x86_64:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
qemu-arm64:
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
- https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20230307/te…
Steps to reproduce:
--------------
# To install tuxrun on your system globally:
# sudo pip3 install -U tuxrun==0.37.2
#
# See https://tuxrun.org/ for complete documentation.
tuxrun \
--runtime podman \
--device qemu-x86_64 \
--boot-args rw \
--kernel https://storage.tuxsuite.com/public/linaro/lkft/builds/2McWP6obiL1x51zgkgLX…
\
--modules https://storage.tuxsuite.com/public/linaro/lkft/builds/2McWP6obiL1x51zgkgLX…
\
--rootfs https://storage.tuxboot.com/debian/bookworm/amd64/rootfs.ext4.xz \
--parameters SKIPFILE=skipfile-lkft.yaml \
--parameters KSELFTEST=https://storage.tuxsuite.com/public/linaro/lkft/builds/2McWP6obiL…
\
--image docker.io/lavasoftware/lava-dispatcher:2023.01.0020.gc1598238f \
--tests kselftest-rtc \
--timeouts boot=15
--
Linaro LKFT
https://lkft.linaro.org
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 a DTB into the UML kernel that's
running the unit tests along with probing platform drivers to bind to
device nodes specified in DT.
With this series, we're able to exercise some of the code in the common
clk framework that uses devicetree lookups to find parents and the fixed
rate clk code that scans devicetree directly and creates clks. Please
review.
I Cced everyone to all the patches so they get the full context. I'm
hoping I can take the whole pile through the clk tree as they almost all
depend on each other. In the future I imagine it will be easy to add
more test nodes to the clk.dtsi file and not need to go across various
maintainer trees like this series does.
Stephen Boyd (8):
dt-bindings: Add linux,kunit binding
of: Enable DTB loading on UML for KUnit tests
kunit: Add test managed platform_device/driver APIs
clk: Add test managed clk provider/consumer APIs
dt-bindings: kunit: Add fixed rate clk consumer test
clk: Add KUnit tests for clk fixed rate basic type
dt-bindings: clk: Add KUnit clk_parent_data test
clk: Add KUnit tests for clks registered with struct clk_parent_data
.../clock/linux,clk-kunit-parent-data.yaml | 47 ++
.../kunit/linux,clk-kunit-fixed-rate.yaml | 35 ++
.../bindings/kunit/linux,kunit.yaml | 24 +
arch/um/kernel/dtb.c | 29 +-
drivers/clk/.kunitconfig | 3 +
drivers/clk/Kconfig | 7 +
drivers/clk/Makefile | 6 +
drivers/clk/clk-fixed-rate_test.c | 296 ++++++++++++
drivers/clk/clk-kunit.c | 204 ++++++++
drivers/clk/clk-kunit.h | 28 ++
drivers/clk/clk_test.c | 456 +++++++++++++++++-
drivers/of/Kconfig | 26 +
drivers/of/Makefile | 1 +
drivers/of/kunit/.kunitconfig | 4 +
drivers/of/kunit/Makefile | 4 +
drivers/of/kunit/clk.dtsi | 30 ++
drivers/of/kunit/kunit.dtsi | 9 +
drivers/of/kunit/kunit.dtso | 4 +
drivers/of/kunit/uml_dtb_test.c | 55 +++
include/kunit/platform_driver.h | 15 +
lib/kunit/Makefile | 6 +
lib/kunit/platform_driver-test.c | 107 ++++
lib/kunit/platform_driver.c | 207 ++++++++
23 files changed, 1599 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/linux,clk-kunit-parent-data.yaml
create mode 100644 Documentation/devicetree/bindings/kunit/linux,clk-kunit-fixed-rate.yaml
create mode 100644 Documentation/devicetree/bindings/kunit/linux,kunit.yaml
create mode 100644 drivers/clk/clk-fixed-rate_test.c
create mode 100644 drivers/clk/clk-kunit.c
create mode 100644 drivers/clk/clk-kunit.h
create mode 100644 drivers/of/kunit/.kunitconfig
create mode 100644 drivers/of/kunit/Makefile
create mode 100644 drivers/of/kunit/clk.dtsi
create mode 100644 drivers/of/kunit/kunit.dtsi
create mode 100644 drivers/of/kunit/kunit.dtso
create mode 100644 drivers/of/kunit/uml_dtb_test.c
create mode 100644 include/kunit/platform_driver.h
create mode 100644 lib/kunit/platform_driver-test.c
create mode 100644 lib/kunit/platform_driver.c
base-commit: c9c3395d5e3dcc6daee66c6908354d47bf98cb0c
--
https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/https://git.kernel.org/pub/scm/linux/kernel/git/sboyd/spmi.git
Dzień dobry,
Jesteśmy firmą z wieloletnim doświadczeniem, która sprawnie przygotuje dla Państwa ofertę i wszelkie formalności. Sam montaż zaplanujemy na wiosnę.
O samych plusach fotowoltaiki czy pompach ciepła na pewno już Państwo słyszeli, dlatego teraz prosimy o zostawienie kontaktu, aby nasz specjalista mógł przedstawić ofertę zgodną z Waszymi potrzebami.
Kiedy moglibyśmy z Państwem umówić się na rozmowę w celu zbadania potrzeb?
Pozdrawiam,
Piotr Werner