Hi,
This series separates tests using the RTC devices between the one
testing driver agnostic kernel facilities (timers) and the others that
are testing device drivers and hardware.
Then, rtctest is reworked to use the test harness and be much more
robust. Skipping tests is now easier and tests will not block
indefinitively.
I'm planning to send more improvements later this cycle.
Alexandre Belloni (4):
selftests: timers: move PIE tests out of rtctest
selftests: timers: rtcpie: restore previous PIE rate
selftests: move RTC tests to rtc subfolder
selftests: rtc: rework rtctest
MAINTAINERS | 2 +-
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/rtc/.gitignore | 2 +
tools/testing/selftests/rtc/Makefile | 9 +
tools/testing/selftests/rtc/rtctest.c | 238 +++++++++++
.../rtctest_setdate.c => rtc/setdate.c} | 0
tools/testing/selftests/timers/.gitignore | 3 +-
tools/testing/selftests/timers/Makefile | 4 +-
tools/testing/selftests/timers/rtcpie.c | 134 ++++++
tools/testing/selftests/timers/rtctest.c | 403 ------------------
10 files changed, 388 insertions(+), 408 deletions(-)
create mode 100644 tools/testing/selftests/rtc/.gitignore
create mode 100644 tools/testing/selftests/rtc/Makefile
create mode 100644 tools/testing/selftests/rtc/rtctest.c
rename tools/testing/selftests/{timers/rtctest_setdate.c => rtc/setdate.c} (100%)
create mode 100644 tools/testing/selftests/timers/rtcpie.c
delete mode 100644 tools/testing/selftests/timers/rtctest.c
--
2.17.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
arm64 has a feature called Top Byte Ignore, which allows to embed pointer
tags into the top byte of each pointer. Userspace programs (such as
HWASan, a memory debugging tool [1]) might use this feature and pass
tagged user pointers to the kernel through syscalls or other interfaces.
This patch makes a few of the kernel interfaces accept tagged user
pointers. The kernel is already able to handle user faults with tagged
pointers and has the untagged_addr macro, which this patchset reuses.
We're not trying to cover all possible ways the kernel accepts user
pointers in one patchset, so this one should be considered as a start.
Thanks!
[1] http://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
Changes in v4:
- Added a selftest for checking that passing tagged pointers to the
kernel succeeds.
- Rebased onto 81e97f013 (4.18-rc1+).
Changes in v3:
- Rebased onto e5c51f30 (4.17-rc6+).
- Added linux-arch@ to the list of recipients.
Changes in v2:
- Rebased onto 2d618bdf (4.17-rc3+).
- Removed excessive untagging in gup.c.
- Removed untagging pointers returned from __uaccess_mask_ptr.
Changes in v1:
- Rebased onto 4.17-rc1.
Changes in RFC v2:
- Added "#ifndef untagged_addr..." fallback in linux/uaccess.h instead of
defining it for each arch individually.
- Updated Documentation/arm64/tagged-pointers.txt.
- Dropped “mm, arm64: untag user addresses in memory syscalls”.
- Rebased onto 3eb2ce82 (4.16-rc7).
Andrey Konovalov (7):
arm64: add type casts to untagged_addr macro
uaccess: add untagged_addr definition for other arches
arm64: untag user addresses in access_ok and __uaccess_mask_ptr
mm, arm64: untag user addresses in mm/gup.c
lib, arm64: untag addrs passed to strncpy_from_user and strnlen_user
arm64: update Documentation/arm64/tagged-pointers.txt
selftests, arm64: add a selftest for passing tagged pointers to kernel
Documentation/arm64/tagged-pointers.txt | 5 +++--
arch/arm64/include/asm/uaccess.h | 14 +++++++++-----
include/linux/uaccess.h | 4 ++++
lib/strncpy_from_user.c | 2 ++
lib/strnlen_user.c | 2 ++
mm/gup.c | 4 ++++
tools/testing/selftests/arm64/.gitignore | 1 +
tools/testing/selftests/arm64/Makefile | 11 +++++++++++
.../testing/selftests/arm64/run_tags_test.sh | 12 ++++++++++++
tools/testing/selftests/arm64/tags_test.c | 19 +++++++++++++++++++
10 files changed, 67 insertions(+), 7 deletions(-)
create mode 100644 tools/testing/selftests/arm64/.gitignore
create mode 100644 tools/testing/selftests/arm64/Makefile
create mode 100755 tools/testing/selftests/arm64/run_tags_test.sh
create mode 100644 tools/testing/selftests/arm64/tags_test.c
--
2.18.0.rc1.244.gcf134e6275-goog
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Since commit eedf265aa003 ("devpts: Make each mount of devpts an
independent filesystem.") CONFIG_DEVPTS_MULTIPLE_INSTANCES isn't needed
in the defconfig anymore.
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/mount/config | 1 -
1 file changed, 1 deletion(-)
diff --git a/tools/testing/selftests/mount/config b/tools/testing/selftests/mount/config
index b5d881e48548..416bd53ce982 100644
--- a/tools/testing/selftests/mount/config
+++ b/tools/testing/selftests/mount/config
@@ -1,2 +1 @@
CONFIG_USER_NS=y
-CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
--
2.18.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Add the executable 'test_memcontrol' to a .gitignore file.
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/cgroup/.gitignore | 1 +
1 file changed, 1 insertion(+)
create mode 100644 tools/testing/selftests/cgroup/.gitignore
diff --git a/tools/testing/selftests/cgroup/.gitignore b/tools/testing/selftests/cgroup/.gitignore
new file mode 100644
index 000000000000..95eb3a53c381
--- /dev/null
+++ b/tools/testing/selftests/cgroup/.gitignore
@@ -0,0 +1 @@
+test_memcontrol
--
2.17.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Memory protection keys enables an application to protect its address space from
inadvertent access by its own code.
This feature is now enabled on powerpc architecture and integrated in
4.16-rc1. The patches move the selftests to arch neutral directory
and enhance their test coverage.
Test
----
Verified for correctness on powerpc. Need help verifying on x86.
Compiles on x86.
History:
-------
version 13:
(1) Incorporated comments for Dave Hansen.
(2) Added one more test for correct pkey-0 behavior.
version 12:
(1) fixed the offset of pkey field in the siginfo structure for
x86_64 and powerpc. And tries to use the actual field
if the headers have it defined.
version 11:
(1) fixed a deadlock in the ptrace testcase.
version 10 and prior:
(1) moved the testcase to arch neutral directory
(2) split the changes into incremental patches.
Ram Pai (22):
selftests/x86: Move protecton key selftest to arch neutral directory
selftests/vm: rename all references to pkru to a generic name
selftests/vm: move generic definitions to header file
selftests/vm: typecast the pkey register
selftests/vm: generic function to handle shadow key register
selftests/vm: fix the wrong assert in pkey_disable_set()
selftests/vm: fixed bugs in pkey_disable_clear()
selftests/vm: clear the bits in shadow reg when a pkey is freed.
selftests/vm: fix alloc_random_pkey() to make it really random
selftests/vm: introduce two arch independent abstraction
selftests/vm: pkey register should match shadow pkey
selftests/vm: generic cleanup
selftests/vm: powerpc implementation for generic abstraction
selftests/vm: clear the bits in shadow reg when a pkey is freed.
selftests/vm: powerpc implementation to check support for pkey
selftests/vm: fix an assertion in test_pkey_alloc_exhaust()
selftests/vm: associate key on a mapped page and detect access
violation
selftests/vm: associate key on a mapped page and detect write
violation
selftests/vm: detect write violation on a mapped access-denied-key
page
selftests/vm: testcases must restore pkey-permissions
selftests/vm: sub-page allocator
selftests/vm: test correct behavior of pkey-0
Thiago Jung Bauermann (2):
selftests/vm: move arch-specific definitions to arch-specific header
selftests/vm: Make gcc check arguments of sigsafe_printf()
tools/testing/selftests/vm/.gitignore | 1 +
tools/testing/selftests/vm/Makefile | 1 +
tools/testing/selftests/vm/pkey-helpers.h | 214 ++++
tools/testing/selftests/vm/pkey-powerpc.h | 126 ++
tools/testing/selftests/vm/pkey-x86.h | 184 +++
tools/testing/selftests/vm/protection_keys.c | 1598 +++++++++++++++++++++++++
tools/testing/selftests/x86/.gitignore | 1 -
tools/testing/selftests/x86/pkey-helpers.h | 219 ----
tools/testing/selftests/x86/protection_keys.c | 1485 -----------------------
9 files changed, 2124 insertions(+), 1705 deletions(-)
create mode 100644 tools/testing/selftests/vm/pkey-helpers.h
create mode 100644 tools/testing/selftests/vm/pkey-powerpc.h
create mode 100644 tools/testing/selftests/vm/pkey-x86.h
create mode 100644 tools/testing/selftests/vm/protection_keys.c
delete mode 100644 tools/testing/selftests/x86/pkey-helpers.h
delete mode 100644 tools/testing/selftests/x86/protection_keys.c
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Joel Fernandes (Google)" <joel(a)joelfernandes.org>
This is a posting of v9 preempt/irq tracepoint clean up series rebased
onto v4.18-rc2. No changes in the series, just a rebase + repost.
All patches have a Reviewed-by tags now from reviewers. This series has
been well tested and is a simplification/refactoring of existing code,
along with giving a speed-up for tracepoints using the rcu-idle API.
With this our users will find it easier to use tools depending on
existing preempt tracepoints since it simplifies the configuration for
them.
Future enhancements/fixes I am developing for preempt-off tracer will
depend on these patches, so I suggest prioritizing these well reviewed
and tested patches for that reason as well.
Introduction to the series:
The preempt/irq tracepoints exist but not everything in the kernel is using it
whenever they need to be notified that a preempt disable/enable or an irq
disable/enable has occurred. This makes things not work simultaneously (for
example, only either lockdep or irqsoff trace-events can be used at a time).
This is particularly painful to deal with, since turning on lockdep breaks
tracers that install probes on IRQ events, such as the BCC atomic critical
section tracer [1]. This constraint also makes it impossible to use synthetic
events to trace irqsoff sections with lockdep simulataneously turned on.
This series solves that, and also results in a nice clean up of relevant parts
of the kernel. Several ifdefs are simpler, and the design is more unified and
better. Also as a result of this, we also speeded performance all rcuidle
tracepoints since their handling is simpler.
[1] https://github.com/iovisor/bcc/blob/master/tools/criticalstat_example.txt
v8->v9:
- Small style changes to tracepoint code (Mathieu)
- Minor style fix to use PTR_ERR_OR_ZERO (0-day bot)
- Minor fix to test_atomic_sections to use unsigned long.
- Added Namhyung's, Mathieu's Reviewed-by to some patches.
- Added Acks from Matsami
v7->v8:
- Refactored irqsoff tracer probe defines (Namhyung)
v6->v7:
- Added a module to simulate an atomic section, a kselftest to load and
and trigger it which verifies the preempt-tracer and this series.
- Fixed a new warning after I rebased in early boot, this is because
early_boot_irqs_disabled was set too early, I moved it after the lockdep
initialization.
- added back the softirq fix since it appears it wasn't picked up.
- Ran Ingo's locking API selftest suite which are passing with this
series.
- Mathieu suggested ifdef'ing the tracepoint_synchronize_unregister
function incase tracepoints aren't enabled, did that.
Joel Fernandes (Google) (6):
srcu: Add notrace variant of srcu_dereference
trace/irqsoff: Split reset into separate functions
tracepoint: Make rcuidle tracepoint callers use SRCU
tracing: Centralize preemptirq tracepoints and unify their usage
lib: Add module to simulate atomic sections for testing preemptoff
tracers
kselftests: Add tests for the preemptoff and irqsoff tracers
Paul McKenney (1):
srcu: Add notrace variants of srcu_read_{lock,unlock}
include/linux/ftrace.h | 11 +-
include/linux/irqflags.h | 11 +-
include/linux/lockdep.h | 8 +-
include/linux/preempt.h | 2 +-
include/linux/srcu.h | 22 ++
include/linux/tracepoint.h | 49 +++-
include/trace/events/preemptirq.h | 23 +-
init/main.c | 5 +-
kernel/locking/lockdep.c | 35 +--
kernel/sched/core.c | 2 +-
kernel/trace/Kconfig | 22 +-
kernel/trace/Makefile | 2 +-
kernel/trace/trace_irqsoff.c | 253 ++++++------------
kernel/trace/trace_preemptirq.c | 71 +++++
kernel/tracepoint.c | 16 +-
lib/Kconfig.debug | 8 +
lib/Makefile | 1 +
lib/test_atomic_sections.c | 77 ++++++
tools/testing/selftests/ftrace/config | 3 +
.../test.d/preemptirq/irqsoff_tracer.tc | 73 +++++
20 files changed, 453 insertions(+), 241 deletions(-)
create mode 100644 kernel/trace/trace_preemptirq.c
create mode 100644 lib/test_atomic_sections.c
create mode 100644 tools/testing/selftests/ftrace/test.d/preemptirq/irqsoff_tracer.tc
--
2.18.0.rc2.346.g013aa6912e-goog
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Following logic from commit: 22f6592b23, GPIOHANDLE_REQUEST_OUTPUT
should handle errors same way as GPIOHANDLE_REQUEST_INPUT does, or else
the following error occurs:
gpio-mockup-chardev: gpio<gpiochip1> line<0> test flag<0x2> value<0>: No
such file or directory
despite the real result of gpio_pin_test(), gpio_debugfs_get() and
gpiotools_request_linehandle() functions.
Signed-off-by: Rafael David Tinoco <rafael.tinoco(a)linaro.org>
---
tools/testing/selftests/gpio/gpio-mockup-chardev.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/gpio/gpio-mockup-chardev.c b/tools/testing/selftests/gpio/gpio-mockup-chardev.c
index 667e916fa7cc..f8d468f54e98 100644
--- a/tools/testing/selftests/gpio/gpio-mockup-chardev.c
+++ b/tools/testing/selftests/gpio/gpio-mockup-chardev.c
@@ -225,10 +225,10 @@ int gpio_pin_test(struct gpiochip_info *cinfo, int line, int flag, int value)
if (flag & GPIOHANDLE_REQUEST_ACTIVE_LOW)
debugfs_value = !debugfs_value;
- if (!(debugfs_dir == OUT && value == debugfs_value))
+ if (!(debugfs_dir == OUT && value == debugfs_value)) {
errno = -EINVAL;
- ret = -errno;
-
+ ret = -errno;
+ }
}
gpiotools_release_linehandle(fd);
--
2.17.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Tests test_tunnel.sh fails due to config fragments ins't enabled.
Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
All tests passes except ip6gretap that still fails. I'm unsure why.
Ideas?
Cheers,
Anders
tools/testing/selftests/bpf/config | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 1eefe211a4a8..7eb613ffef55 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -7,3 +7,13 @@ CONFIG_CGROUP_BPF=y
CONFIG_NETDEVSIM=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_SCH_INGRESS=y
+CONFIG_NET_IPIP=y
+CONFIG_IPV6=y
+CONFIG_NET_IPGRE_DEMUX=y
+CONFIG_NET_IPGRE=y
+CONFIG_IPV6_GRE=y
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_HMAC=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_VXLAN=y
+CONFIG_GENEVE=y
--
2.17.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
There are a number of tests that check features of the Linux networking
stack. By running them on suitable interfaces, one can exercise the
mlxsw offloading code. However none of these tests attempts to push
mlxsw to the limits supported by the ASIC.
As an additional wrinkle, the "limits supported by the ASIC" themselves
may not be a set of fixed numbers, but rather depend on a profile that
determines how the ASIC resources are allocated for different purposes.
This patchset introduces several tests that verify capability of mlxsw
to offload amounts of routes, flower rules, and mirroring sessions that
match predicted ASIC capacity, at different configuration profiles.
Additionally they verify that amounts exceeding the predicted capacity
can *not* be offloaded.
These are not generic tests, but ones that are tailored for mlxsw
specifically. For that reason they are not added to net/forwarding
selftests subdirectory, but rather to a newly-added drivers/net/mlxsw.
Patches #1, #2 and #3 tweak the generic forwarding/lib.sh to support the
new additions.
In patches #4 and #5, new libraries for interfacing with devlink are
introduced, first a generic one, then a Spectrum-specific one.
In patch #6, a devlink resource test is introduced.
Patches #7 and #8, #9 and #10, and #11 and #12 introduce three scale
tests: router, flower and mirror-to-gretap. The first of each pair of
patches introduces a generic portion of the test (mlxsw-specific), the
second introduces a Spectrum-specific wrapper.
Patch #13 then introduces a scale test driver that runs (possibly a
subset of) the tests introduced by patches from previous paragraph.
Arkadi Sharshevsky (1):
selftests: mlxsw: Add router test
Petr Machata (8):
selftests: forwarding: lib: Add check_err_fail()
selftests: forwarding: lib: Parameterize NUM_NETIFS in two functions
selftests: forwarding: Add devlink_lib.sh
selftests: mlxsw: Add devlink_lib_spectrum.sh
selftests: mlxsw: Add tc flower scale test
selftests: mlxsw: Add target for tc flower test on spectrum
selftests: mlxsw: Add scale test for mirror-to-gretap
selftests: mlxsw: Add target for mirror-to-gretap test on spectrum
Yuval Mintz (4):
selftests: forwarding: Allow lib.sh sourcing from other directories
selftests: mlxsw: Add devlink KVD resource test
selftests: mlxsw: Add target for router test on spectrum
selftests: mlxsw: Add scale test for resources
MAINTAINERS | 1 +
.../drivers/net/mlxsw/mirror_gre_scale.sh | 197 +++++++++++++++++++++
.../selftests/drivers/net/mlxsw/router_scale.sh | 167 +++++++++++++++++
.../net/mlxsw/spectrum/devlink_lib_spectrum.sh | 119 +++++++++++++
.../net/mlxsw/spectrum/devlink_resources.sh | 117 ++++++++++++
.../drivers/net/mlxsw/spectrum/mirror_gre_scale.sh | 13 ++
.../drivers/net/mlxsw/spectrum/resource_scale.sh | 55 ++++++
.../drivers/net/mlxsw/spectrum/router_scale.sh | 18 ++
.../drivers/net/mlxsw/spectrum/tc_flower_scale.sh | 19 ++
.../selftests/drivers/net/mlxsw/tc_flower_scale.sh | 134 ++++++++++++++
.../selftests/net/forwarding/devlink_lib.sh | 108 +++++++++++
tools/testing/selftests/net/forwarding/lib.sh | 30 +++-
12 files changed, 974 insertions(+), 4 deletions(-)
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/router_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/devlink_lib_spectrum.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum/devlink_resources.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/mirror_gre_scale.sh
create mode 100755 tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/router_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/spectrum/tc_flower_scale.sh
create mode 100644 tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh
create mode 100644 tools/testing/selftests/net/forwarding/devlink_lib.sh
--
2.4.11
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html