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
Hi,
This is the 7th version of the fetch-arg improvement series.
This includes variable changes on fetcharg framework like,
- Add fetcharg testcases (syntax, argN, symbol, string and array)
and probepoint testcase.
- Rewrite fetcharg framework with fetch_insn, switch-case based
instead of function pointer.
- Add "symbol" type support, which shows symbol+offset instead of
address value.
- Add "$argN" fetcharg, which fetches function parameters.
(currently only for x86-64)
- Add array type support (including string arrary :) ) ,
which enables to get fixed length array from probe-events.
- Add array type support for perf-probe, so that user can
dump partial array entries.
V6 is here:
https://lkml.org/lkml/2018/3/17/75
Changes from the v6 are here:
[6/16] - Fix to return an error if failed to fetch string and
fill zero-length data_loc in error case.
[11/16] - Update document for restructured text.
[15/16] - Fix README test.
[16/16] - Add type-casting description (and note) to documentation.
And rebased on the latest Steve's ftrace/core branch.
Thank you,
---
Masami Hiramatsu (16):
tracing: probeevent: Cleanup print argument functions
tracing: probeevent: Cleanup argument field definition
tracing: probeevent: Remove NOKPROBE_SYMBOL from print functions
tracing: probeevent: Introduce new argument fetching code
tracing: probeevent: Unify fetch type tables
tracing: probeevent: Return consumed bytes of dynamic area
tracing: probeevent: Append traceprobe_ for exported function
tracing: probeevent: Unify fetch_insn processing common part
tracing: probeevent: Add symbol type
x86: ptrace: Add function argument access API
tracing: probeevent: Add $argN for accessing function args
tracing: probeevent: Add array type support
selftests: ftrace: Add a testcase for symbol type
selftests: ftrace: Add a testcase for $argN with kprobe_event
selftests: ftrace: Add a testcase for array type with kprobe_event
perf-probe: Add array argument support
Documentation/trace/kprobetrace.rst | 23 +
arch/Kconfig | 7
arch/x86/Kconfig | 1
arch/x86/include/asm/ptrace.h | 38 +
kernel/trace/trace.c | 9
kernel/trace/trace_kprobe.c | 358 ++++--------
kernel/trace/trace_probe.c | 620 +++++++++-----------
kernel/trace/trace_probe.h | 282 +++------
kernel/trace/trace_probe_tmpl.h | 216 +++++++
kernel/trace/trace_uprobe.c | 176 ++----
tools/perf/Documentation/perf-probe.txt | 12
tools/perf/util/probe-event.c | 20 +
tools/perf/util/probe-event.h | 2
tools/perf/util/probe-file.c | 5
tools/perf/util/probe-file.h | 1
tools/perf/util/probe-finder.c | 95 ++-
.../ftrace/test.d/kprobe/kprobe_args_argN.tc | 25 +
.../ftrace/test.d/kprobe/kprobe_args_array.tc | 92 +++
.../ftrace/test.d/kprobe/kprobe_args_symbol.tc | 77 ++
19 files changed, 1127 insertions(+), 932 deletions(-)
create mode 100644 kernel/trace/trace_probe_tmpl.h
create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_argN.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_array.tc
create mode 100644 tools/testing/selftests/ftrace/test.d/kprobe/kprobe_args_symbol.tc
--
Masami Hiramatsu (Linaro) <mhiramat(a)kernel.org>
--
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
ADI is a feature supported on SPARC M7 and newer processors to allow
hardware to catch rogue accesses to memory. ADI is supported for data
fetches only and not instruction fetches. An app can enable ADI on its
data pages, set version tags on them and use versioned addresses to
access the data pages. Upper bits of the address contain the version
tag. On M7 processors, upper four bits (bits 63-60) contain the version
tag. If a rogue app attempts to access ADI enabled data pages, its
access is blocked and processor generates an exception. Please see
Documentation/sparc/adi.txt for further details.
This patchset implements a char driver to read/write ADI versions from
privileged user space processes. Intended consumers are makedumpfile
and crash.
v6:
* Addressed a few action items from greg k-h
* Added Reviewed-by Greg Kroah-Hartman and Shuah Khan
v5:
* Fixed MODULE_LICENSE() for adi.c
v4:
* Fixed messed up subject lines.
v3:
* Really fixed the copyright headers to use SPDX GPL v2. Really.
v2:
* Simplified copyright headers
* Completely reworked sparc64 selftests Makefiles. Used the
android selftests Makefiles as an example
* Added run.sh and drivers_test.sh to the sparc64 selftest
directory. Used bpf/test_kmod.sh and the android selftests
as examples
* Minor cleanups in the selftest adi-test.c
* Added calls to ksft_test_*() in the adi-test.c
Tom Hromatka (2):
char: sparc64: Add privileged ADI driver
selftests: sparc64: char: Selftest for privileged ADI driver
drivers/char/Kconfig | 12 +
drivers/char/Makefile | 1 +
drivers/char/adi.c | 239 +++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/sparc64/Makefile | 46 ++
tools/testing/selftests/sparc64/drivers/.gitignore | 1 +
tools/testing/selftests/sparc64/drivers/Makefile | 15 +
tools/testing/selftests/sparc64/drivers/adi-test.c | 721 +++++++++++++++++++++
.../selftests/sparc64/drivers/drivers_test.sh | 30 +
tools/testing/selftests/sparc64/run.sh | 3 +
10 files changed, 1069 insertions(+)
create mode 100644 drivers/char/adi.c
create mode 100644 tools/testing/selftests/sparc64/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/.gitignore
create mode 100644 tools/testing/selftests/sparc64/drivers/Makefile
create mode 100644 tools/testing/selftests/sparc64/drivers/adi-test.c
create mode 100755 tools/testing/selftests/sparc64/drivers/drivers_test.sh
create mode 100755 tools/testing/selftests/sparc64/run.sh
--
2.15.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
The reuseport_bpf_numa test case fails there's no numa support. The
test shouldn't fail if there's no support it should be skipped with a
pass.
Fixes: 3c2c3c16aaf6 ("reuseport, bpf: add test case for bpf_get_numa_node_id")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/net/reuseport_bpf_numa.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/net/reuseport_bpf_numa.c b/tools/testing/selftests/net/reuseport_bpf_numa.c
index 365c32e84189..9245c14165b7 100644
--- a/tools/testing/selftests/net/reuseport_bpf_numa.c
+++ b/tools/testing/selftests/net/reuseport_bpf_numa.c
@@ -228,8 +228,10 @@ int main(void)
{
int *rcv_fd, nodes;
- if (numa_available() < 0)
- error(1, errno, "no numa api support");
+ if (numa_available() < 0) {
+ fprintf(stderr, "no numa api support");
+ return 0;
+ }
nodes = numa_max_node() + 1;
--
2.11.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
This round incorporates feedback from SUSE folks, Miroslav, Petr and
Libor. Thanks for the reviews and feedback!
Like the previous version, this applies on top of Petr's shadow variable
changes and the atomic replace patchset.
-- Joe
changes from v3:
- add MAINTAINERS entry for tools/testing/selftests/livepatch/
- make more test_klp_shadow_vars.c functions static (Miroslav)
- use git format-patch --base to generate base-commit and prerequisite
patch info (kbuild test robot)
- tweak TEST_LIVEPATCH help text (Petr)
- add note in callbacks.txt pointing to sample/test examples (Petr)
- add a kmsg log() function (Libor)
- various whitespace and comment cleanups (Libor)
- add "$(dirname $0)/" directory prefix to functions.sh sourcing (Libor)
- add loop_until() function instead of redundant inline retry/loops (Libor)
- wait_for_transition() looks for any transition (Libor)
changes from v2:
- fix module_exit(test_klp_shadow_vars_exit) in test_klp_shadow_vars.c
- silence kbuild test robot's "XXX can be static" and "Using plain
integer as NULL pointer" complaints
- re-run tests with CONFIG_LOCKDEP=y and CONFIG_PROVE_LOCKING=y
- use GFP_ATOMIC in test_klp_shadow_vars.c constructor code
changes from v1:
- Only add $(CC_FLAGS_FTRACE) for target modules
- Remove between test delay
- Reduce RETRY_INTERVAL to .1 sec
- Reduce test_callback_mod's busymod_work_func delay from 60 to 10 sec
- s/PASS/ok and s/FAIL/not ok for test output
- Move test descriptions from Documentation/livepatch/callbacks.txt
into tools/testing/selftests/livepatch/test-callbacks.sh
- Add a shadow variable test script and module
- Add a short tools/testing/selftests/livepatch/README
- to += linux-kselftest(a)vger.kernel.org
- cc += Libor, Nicolai, Artem
changes from rfc:
- SPDX-License-Identifiers
- Moved livepatch test modules into lib/livepatch
- Renamed livepatch.sh (filename suffix)
- Reduced between-test delay time
- Split off common functions.sh file
- Split into separate livepatch, callbacks, and shadow-vars scrips
- Gave the tests short descriptions instead of TEST1, TEST2, etc.
Joe Lawrence (1):
selftests/livepatch: introduce tests
Documentation/livepatch/callbacks.txt | 489 +-------------
MAINTAINERS | 1 +
lib/Kconfig.debug | 21 +
lib/Makefile | 2 +
lib/livepatch/Makefile | 15 +
lib/livepatch/test_klp_atomic_replace.c | 69 ++
lib/livepatch/test_klp_callbacks_busy.c | 43 ++
lib/livepatch/test_klp_callbacks_demo.c | 132 ++++
lib/livepatch/test_klp_callbacks_demo2.c | 104 +++
lib/livepatch/test_klp_callbacks_mod.c | 24 +
lib/livepatch/test_klp_livepatch.c | 62 ++
lib/livepatch/test_klp_shadow_vars.c | 236 +++++++
tools/testing/selftests/Makefile | 1 +
tools/testing/selftests/livepatch/Makefile | 8 +
tools/testing/selftests/livepatch/README | 43 ++
tools/testing/selftests/livepatch/config | 1 +
.../testing/selftests/livepatch/functions.sh | 164 +++++
.../selftests/livepatch/test-callbacks.sh | 607 ++++++++++++++++++
.../selftests/livepatch/test-livepatch.sh | 173 +++++
.../selftests/livepatch/test-shadow-vars.sh | 60 ++
20 files changed, 1771 insertions(+), 484 deletions(-)
create mode 100644 lib/livepatch/Makefile
create mode 100644 lib/livepatch/test_klp_atomic_replace.c
create mode 100644 lib/livepatch/test_klp_callbacks_busy.c
create mode 100644 lib/livepatch/test_klp_callbacks_demo.c
create mode 100644 lib/livepatch/test_klp_callbacks_demo2.c
create mode 100644 lib/livepatch/test_klp_callbacks_mod.c
create mode 100644 lib/livepatch/test_klp_livepatch.c
create mode 100644 lib/livepatch/test_klp_shadow_vars.c
create mode 100644 tools/testing/selftests/livepatch/Makefile
create mode 100644 tools/testing/selftests/livepatch/README
create mode 100644 tools/testing/selftests/livepatch/config
create mode 100644 tools/testing/selftests/livepatch/functions.sh
create mode 100755 tools/testing/selftests/livepatch/test-callbacks.sh
create mode 100755 tools/testing/selftests/livepatch/test-livepatch.sh
create mode 100755 tools/testing/selftests/livepatch/test-shadow-vars.sh
base-commit: 0adb32858b0bddf4ada5f364a84ed60b196dbcda
prerequisite-patch-id: 5ed747c1a89a5dc4bba08186e21f927d7f3bf049
prerequisite-patch-id: e9800288b71a9f339ea066e58d9ef70dece67083
prerequisite-patch-id: 415f2e190b1b50142c78f2940c7b8dd39b5321a0
prerequisite-patch-id: d229d9cf08af087e0a758d9df1da467103c2c200
prerequisite-patch-id: b8c7ef99b13c6b321cba5e8919ed0b3e29f213e9
prerequisite-patch-id: 4e10c0d08f151b18310fe0b1e5013d62db94cfeb
prerequisite-patch-id: 33046b190c114d202f3a52e0e274dbb2b1907a4c
prerequisite-patch-id: 6978944a725756317dd4e005d479b6101784aaf0
prerequisite-patch-id: cce9d3c7e1ae8887f387ca9e072552dc63479749
prerequisite-patch-id: c44ccc5dd7b1be6fe2b1f32ca6abde1da73fae79
--
2.17.0.252.gfe0a9eaf31dd
--
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: Colin Ian King <colin.king(a)canonical.com>
Trivial fix to spelling mistake in message text
Signed-off-by: Colin Ian King <colin.king(a)canonical.com>
---
tools/testing/selftests/filesystems/devpts_pts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/filesystems/devpts_pts.c b/tools/testing/selftests/filesystems/devpts_pts.c
index b9055e974289..ea5de8271521 100644
--- a/tools/testing/selftests/filesystems/devpts_pts.c
+++ b/tools/testing/selftests/filesystems/devpts_pts.c
@@ -279,7 +279,7 @@ int main(int argc, char *argv[])
int ret;
if (!isatty(STDIN_FILENO)) {
- fprintf(stderr, "Standard input file desciptor is not attached "
+ fprintf(stderr, "Standard input file descriptor is not attached "
"to a terminal. Skipping test\n");
exit(EXIT_FAILURE);
}
--
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
Fixes: d5edb7f8e7ab ("kvm: selftests: add vmx_tsc_adjust_test")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/kvm/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/kvm/.gitignore b/tools/testing/selftests/kvm/.gitignore
index a546e052d19a..63fc1ab9248f 100644
--- a/tools/testing/selftests/kvm/.gitignore
+++ b/tools/testing/selftests/kvm/.gitignore
@@ -1,2 +1,3 @@
set_sregs_test
sync_regs_test
+vmx_tsc_adjust_test
--
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
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/kvm/.gitignore | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 tools/testing/selftests/kvm/.gitignore
diff --git a/tools/testing/selftests/kvm/.gitignore b/tools/testing/selftests/kvm/.gitignore
new file mode 100644
index 000000000000..a546e052d19a
--- /dev/null
+++ b/tools/testing/selftests/kvm/.gitignore
@@ -0,0 +1,2 @@
+set_sregs_test
+sync_regs_test
--
2.16.3
--
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