Fix up the existing ipsec selftest and add tests for
the ipsec offload driver API.
Shannon Nelson (4):
selftests: rtnetlink: clear the return code at start of ipsec test
selftests: rtnetlink: use dummydev as a test device
netdevsim: add ipsec offload testing
selftests: rtnetlink: add ipsec offload API test
drivers/net/netdevsim/Makefile | 4 +
drivers/net/netdevsim/ipsec.c | 345 +++++++++++++++++++++++++++++++
drivers/net/netdevsim/netdev.c | 7 +
drivers/net/netdevsim/netdevsim.h | 37 ++++
tools/testing/selftests/net/rtnetlink.sh | 132 +++++++++++-
5 files changed, 518 insertions(+), 7 deletions(-)
create mode 100644 drivers/net/netdevsim/ipsec.c
--
2.7.4
--
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
Intel 0Day noticed that test_syscall_vdso_32 failed since 8bb2610bc4967f19672444a7b0407367f1540028(x86/entry/64/compat: Preserve r8-r11 in int $0x80)
2018-06-25 14:23:00 make run_tests -C x86
make: Entering directory '/usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86'
gcc -m32 -o /usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86/test_syscall_vdso_32 -O2 -g -std=gnu99 -pthread -Wall -no-pie -DCAN_BUILD_32 -DCAN_BUILD_64 test_syscall_vdso.c thunks_32.S -lrt -ldl -lm
TAP version 13
selftests: test_syscall_vdso_32
========================================
[RUN] Executing 6-argument 32-bit syscall via VDSO
[WARN] Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
[WARN] Flags after=0000000000200606 id 0 00 d i 0 0 p 1
[WARN] Flags change=00000000000008d1 0 00 o s z 0 a 0 0 c
[OK] Arguments are preserved across syscall
[NOTE] R11 has changed:0000000000200606 - assuming clobbered by SYSRET insn
[OK] R8..R15 did not leak kernel data
[RUN] Executing 6-argument 32-bit syscall via INT 80
[OK] Arguments are preserved across syscall
[FAIL] R8 has changed:0000000000000000
[FAIL] R9 has changed:0000000000000000
[FAIL] R10 has changed:0000000000000000
[FAIL] R11 has changed:0000000000000000
[RUN] Executing 6-argument 32-bit syscall via VDSO
[WARN] Flags before=0000000000200ed7 id 0 00 o d i s z 0 a 0 p 1 c
[WARN] Flags after=0000000000200606 id 0 00 d i 0 0 p 1
[WARN] Flags change=00000000000008d1 0 00 o s z 0 a 0 0 c
[OK] Arguments are preserved across syscall
[NOTE] R11 has changed:0000000000200606 - assuming clobbered by SYSRET insn
[OK] R8..R15 did not leak kernel data
[RUN] Executing 6-argument 32-bit syscall via INT 80
[OK] Arguments are preserved across syscall
[FAIL] R8 has changed:0000000000000000
[FAIL] R9 has changed:0000000000000000
[FAIL] R10 has changed:0000000000000000
[FAIL] R11 has changed:0000000000000000
[RUN] Running tests under ptrace
not ok 1..1 selftests: test_syscall_vdso_32 [FAIL]
make: Leaving directory '/usr/src/linux-selftests-x86_64-rhel-7.2-8bb2610bc4967f19672444a7b0407367f1540028/tools/testing/selftests/x86'
This commit changed the testcase expected behavior, but looks it doesn't work as expected.
so want to consult whether 0Day missed something(special configurations) to this case ?
if more details are needed, please let me know.
Thanks
--
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 test_lwt_seg6local.sh will execute with root privilege.
This patch is atleast used to notify the user about the privilege
required related to smooth execution of the script.
Signed-off-by: Jeffrin Jose T (Rajagiri SET) <ahiliation(a)gmail.com>
---
tools/testing/selftests/bpf/test_lwt_seg6local.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_lwt_seg6local.sh b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
index 1c77994b5e71..30575577a8b2 100755
--- a/tools/testing/selftests/bpf/test_lwt_seg6local.sh
+++ b/tools/testing/selftests/bpf/test_lwt_seg6local.sh
@@ -21,6 +21,15 @@
# An UDP datagram is sent from fb00::1 to fb00::6. The test succeeds if this
# datagram can be read on NS6 when binding to fb00::6.
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+msg="skip all tests:"
+if [ $UID != 0 ]; then
+ echo $msg please run this as root >&2
+ exit $ksft_skip
+fi
+
TMP_FILE="/tmp/selftest_lwt_seg6local.txt"
cleanup()
--
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
Fix to exclude vdso_standalone_test_x86 test from building on non-x86
platforms. In addition, fix it to use TEST_GEN_PROGS which is the right
variable to use for generated programs. TEST_PROGS is for shell scripts.
Signed-off-by: Shuah Khan (Samsung OSG) <shuah(a)kernel.org>
---
tools/testing/selftests/vDSO/Makefile | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index f5d7a7851e21..9e03d61f52fd 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -1,6 +1,14 @@
# SPDX-License-Identifier: GPL-2.0
include ../lib.mk
+uname_M := $(shell uname -m 2>/dev/null || echo not)
+ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/)
+
+TEST_GEN_PROGS := $(OUTPUT)/vdso_test
+ifeq ($(ARCH),x86)
+TEST_GEN_PROGS += $(OUTPUT)/vdso_standalone_test_x86
+endif
+
ifndef CROSS_COMPILE
CFLAGS := -std=gnu99
CFLAGS_vdso_standalone_test_x86 := -nostdlib -fno-asynchronous-unwind-tables -fno-stack-protector
@@ -8,14 +16,11 @@ ifeq ($(CONFIG_X86_32),y)
LDLIBS += -lgcc_s
endif
-TEST_PROGS := $(OUTPUT)/vdso_test $(OUTPUT)/vdso_standalone_test_x86
-
-all: $(TEST_PROGS)
+all: $(TEST_GEN_PROGS)
$(OUTPUT)/vdso_test: parse_vdso.c vdso_test.c
$(OUTPUT)/vdso_standalone_test_x86: vdso_standalone_test_x86.c parse_vdso.c
$(CC) $(CFLAGS) $(CFLAGS_vdso_standalone_test_x86) \
vdso_standalone_test_x86.c parse_vdso.c \
-o $@
-EXTRA_CLEAN := $(TEST_PROGS)
endif
--
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
Hi Linus,
Please pull the following kselftest fixes update for Linux 4.18-rc2
This Kselftest fixes update for Linux 4.18-rc2:
- Fixes new sparc64 adi driver test compile errors on non-sparc systems.
- Fixes config fragment for sync framework for improved test coverage.
- Fixes several tests to return correct Kselftest skip code.
I included a patch that adds missing SPDX license text in the Makefile for
the new Sparc64 test that went into 4.18-rc1. It should have been added in
the final version of the patches that went into 4.18-rc1.
diff is attached.
thanks,
-- Shuah
-----------------------------------------------------------------------------
The following changes since commit ce397d215ccd07b8ae3f71db689aedb85d56ab40:
Linux 4.18-rc1 (2018-06-17 08:04:49 +0900)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-4.18-rc2
for you to fetch changes up to eb83d5f7d07ed913d62ca4ad1e14fb6ca4937bab:
selftests: sparc64: Add missing SPDX License Identifiers (2018-06-18 09:29:20 -0600)
----------------------------------------------------------------
linux-kselftest-4.18-rc2
This Kselftest fixes update for Linux 4.18-rc2:
- Fixes new sparc64 adi driver test compile errors on non-sparc systems.
- Fixes config fragment for sync framework for improved test coverage.
- Fixes several tests to return correct Kselftest skip code.
----------------------------------------------------------------
Fathi Boudra (1):
selftests: sync: add config fragment for testing sync framework
Shuah Khan (Samsung OSG) (9):
selftests: pstore: return Kselftest Skip code for skipped tests
selftests: static_keys: return Kselftest Skip code for skipped tests
selftests: sysctl: return Kselftest Skip code for skipped tests
selftests: user: return Kselftest Skip code for skipped tests
selftests: zram: return Kselftest Skip code for skipped tests
selftests: vm: return Kselftest Skip code for skipped tests
selftests: sparc64: Fix to do nothing on non-sparc64
selftests: sparc64: delete RUN_TESTS and EMIT_TESTS overrides
selftests: sparc64: Add missing SPDX License Identifiers
.../selftests/pstore/pstore_post_reboot_tests | 5 ++++-
tools/testing/selftests/sparc64/Makefile | 20 ++++++++++++--------
tools/testing/selftests/sparc64/drivers/Makefile | 2 +-
.../selftests/static_keys/test_static_keys.sh | 13 +++++++++++++
tools/testing/selftests/sync/config | 4 ++++
tools/testing/selftests/sysctl/sysctl.sh | 20 +++++++++++++-------
tools/testing/selftests/user/test_user_copy.sh | 7 +++++++
tools/testing/selftests/vm/compaction_test.c | 4 +++-
tools/testing/selftests/vm/mlock2-tests.c | 12 +++++++-----
tools/testing/selftests/vm/run_vmtests | 5 ++++-
tools/testing/selftests/vm/userfaultfd.c | 4 +++-
tools/testing/selftests/zram/zram.sh | 5 ++++-
tools/testing/selftests/zram/zram_lib.sh | 5 ++++-
13 files changed, 79 insertions(+), 27 deletions(-)
create mode 100644 tools/testing/selftests/sync/config
-----------------------------------------------------------------------------
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
The test_kmod.sh script require root privilege for the successful
execution of the test.
This patch is to notify the user about the privilege the script
demands for the successful execution of the test.
Signed-off-by: Jeffrin Jose T (Rajagiri SET) <ahiliation(a)gmail.com>
---
tools/testing/selftests/bpf/test_kmod.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_kmod.sh b/tools/testing/selftests/bpf/test_kmod.sh
index 35669ccd4d23..378ccc512ad3 100755
--- a/tools/testing/selftests/bpf/test_kmod.sh
+++ b/tools/testing/selftests/bpf/test_kmod.sh
@@ -1,6 +1,15 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
+# Kselftest framework requirement - SKIP code is 4.
+ksft_skip=4
+
+msg="skip all tests:"
+if [ "$(id -u)" != "0" ]; then
+ echo $msg please run this as root >&2
+ exit $ksft_skip
+fi
+
SRC_TREE=../../../../
test_run()
--
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
sha: 702353b538f5 ("selftest: add test for TCP_INQ") forgot to add
tcp_inq to .gitignore.
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
tools/testing/selftests/net/.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/.gitignore b/tools/testing/selftests/net/.gitignore
index 128e548aa377..1a0ac3a29ec5 100644
--- a/tools/testing/selftests/net/.gitignore
+++ b/tools/testing/selftests/net/.gitignore
@@ -12,3 +12,4 @@ tcp_mmap
udpgso
udpgso_bench_rx
udpgso_bench_tx
+tcp_inq
--
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
Add fragments to pass bridge and vlan tests.
Fixes: 33b01b7b4f19 ("selftests: add rtnetlink test script")
Signed-off-by: Anders Roxell <anders.roxell(a)linaro.org>
---
Hi,
net/rtnetlink.sh still fails on tc hbt hierarchy, addrlabel and ipsec:
Error: Specified qdisc not found.
RTNETLINK answers: No such file or directory
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Parent Qdisc doesn't exists.
We have an error talking to the kernel, -1
Error: Invalid handle.
FAIL: tc htb hierarchy
FAIL: ipv6 addrlabel
FAIL: can't add fou port 7777, skipping test
RTNETLINK answers: Operation not supported
FAIL: can't add macsec interface, skipping test
RTNETLINK answers: Protocol not supported
RTNETLINK answers: No such process
RTNETLINK answers: No such process
./rtnetlink.sh: line 527: 5356 Terminated ip x m >
$tmpfile
FAIL: ipsec
I'm using iproute2 tag: 4.17 and tried the qdisc command from the
function kci_test_tc in net/rtnetlink.sh:
$ tc qdisc add dev lo root handle 1: htb
Error: Specified qdisc not found.
For kci_test_addrlabel it fails on this row:
ip addrlabel list |grep -q "prefix dead::/64 dev lo label 1"
Any idea why these three fails?
Cheers,
Anders
tools/testing/selftests/net/config | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/net/config b/tools/testing/selftests/net/config
index 7ba089b33e8b..cd3a2f1545b5 100644
--- a/tools/testing/selftests/net/config
+++ b/tools/testing/selftests/net/config
@@ -12,3 +12,5 @@ CONFIG_NET_IPVTI=y
CONFIG_INET6_XFRM_MODE_TUNNEL=y
CONFIG_IPV6_VTI=y
CONFIG_DUMMY=y
+CONFIG_BRIDGE=y
+CONFIG_VLAN_8021Q=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