This patchset tests mirror-to-gretap with various underlay
configurations involving VLAN netdevice in particular. Some of the tests
involve bridges as well, but tests aimed specifically at testing bridges
(i.e. FDB, STP) are not part of this patchset.
In patches #1-#6, the codebase is adapted to support the new tests.
In patch #7, a test for mirroring to VLAN is introduced.
Patches #8-#10 add three tests where VLAN is part of underlay path after
gretap encapsulation.
Petr Machata (10):
selftests: forwarding: Split mirror_gre_topo_lib.sh
selftests: forwarding: mirror_gre_lib: Extract generic functions
selftests: forwarding: Add $h3's clsact to mirror_topo_lib.sh
selftests: forwarding: lib: Support VLAN devices
selftests: forwarding: mirror_gre_lib: Support VLAN
selftests: forwarding: lib: Extract trap_{,un}install()
selftests: forwarding: Test mirror-to-vlan
selftests: forwarding: Test mirror-to-gre w/ UL VLAN+802.1q
selftests: forwarding: Test mirror-to-gre w/ UL VLAN
selftests: forwarding: Test mirror-to-gre w/ UL 802.1d+VLAN
tools/testing/selftests/net/forwarding/lib.sh | 52 +++++--
.../testing/selftests/net/forwarding/mirror_gre.sh | 2 -
.../net/forwarding/mirror_gre_bridge_1d_vlan.sh | 109 +++++++++++++
.../selftests/net/forwarding/mirror_gre_changes.sh | 2 -
.../selftests/net/forwarding/mirror_gre_lib.sh | 61 +++++---
.../net/forwarding/mirror_gre_topo_lib.sh | 53 ++-----
.../selftests/net/forwarding/mirror_gre_vlan.sh | 92 +++++++++++
.../net/forwarding/mirror_gre_vlan_bridge_1q.sh | 140 +++++++++++++++++
.../testing/selftests/net/forwarding/mirror_lib.sh | 54 +++++++
.../selftests/net/forwarding/mirror_topo_lib.sh | 101 ++++++++++++
.../selftests/net/forwarding/mirror_vlan.sh | 169 +++++++++++++++++++++
11 files changed, 754 insertions(+), 81 deletions(-)
create mode 100755 tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh
create mode 100755 tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh
create mode 100755 tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh
create mode 100644 tools/testing/selftests/net/forwarding/mirror_topo_lib.sh
create mode 100755 tools/testing/selftests/net/forwarding/mirror_vlan.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
This patchset is for a handful of edge cases in mirror-to-gretap
scenarios: removal of mirrored-to netdevice (#1), removal of underlay
route for tunnel remote endpoint (#2) and cessation of mirroring upon
removal of flower mirroring rule (#3).
Petr Machata (3):
selftests: forwarding: Test mirroring to deleted device
selftests: forwarding: Test removal of underlay route
selftests: forwarding: Test removal of mirroring
.../selftests/net/forwarding/mirror_gre_changes.sh | 68 ++++++++++++++++++++++
.../selftests/net/forwarding/mirror_gre_flower.sh | 8 +++
2 files changed, 76 insertions(+)
--
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
Hi Jeffrin,
On 05/22/2018 11:05 AM, Jeffrin Jose T wrote:
> fix for notification of permission requirement to run test.
> fix for exit status value for test skipped.
>
> Signed-off-by: Jeffrin Jose T <jeffrin(a)rajagiritech.edu.in>
The commit log doesn't match the commit summary. Please rephrase both the
commit summary and log to indicate why this fix is necessary.
Odd. I don't see your patch posted on the linux-kselftest patchwork and not
even on lkml archive.
You signed off doesn't match your from. Are you using git send-email to send
patches?
thanks,
-- Shuah
--
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
Test 6fb4 creates one mirred and one pipe action, but only flushes mirred
on teardown. Leaking pipe action causes failures in other tests.
Add additional teardown command to also flush gact actions.
Signed-off-by: Vlad Buslov <vladbu(a)mellanox.com>
---
tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json b/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json
index 443c9b3..acb24f7 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/actions/mirred.json
@@ -44,7 +44,8 @@
"matchPattern": "action order [0-9]*: mirred \\(Egress Redirect to device lo\\).*index 2 ref",
"matchCount": "1",
"teardown": [
- "$TC actions flush action mirred"
+ "$TC actions flush action mirred",
+ "$TC actions flush action gact"
]
},
{
--
2.7.5
--
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 expected ip address to actually match configured ip address.
Fix test to expect single matched filter.
Signed-off-by: Vlad Buslov <vladbu(a)mellanox.com>
---
tools/testing/selftests/tc-testing/tc-tests/filters/tests.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
index 5fa02d8..99a5ffc 100644
--- a/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
+++ b/tools/testing/selftests/tc-testing/tc-tests/filters/tests.json
@@ -12,8 +12,8 @@
"cmdUnderTest": "$TC filter add dev $DEV1 parent ffff: protocol ip prio 1 u32 match ip src 127.0.0.1/32 flowid 1:1 action ok",
"expExitCode": "0",
"verifyCmd": "$TC filter show dev $DEV1 parent ffff:",
- "matchPattern": "match 7f000002/ffffffff at 12",
- "matchCount": "0",
+ "matchPattern": "match 7f000001/ffffffff at 12",
+ "matchCount": "1",
"teardown": [
"$TC qdisc del dev $DEV1 ingress"
]
--
2.7.5
--
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
cg_name(const char *root, const char *name) is always called with
non-empty root and name arguments, so there is no sense in checking
it in the function body (after using in strlen()).
Signed-off-by: Roman Gushchin <guro(a)fb.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
Cc: linux-kselftest(a)vger.kernel.org
---
tools/testing/selftests/cgroup/cgroup_util.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/cgroup/cgroup_util.c b/tools/testing/selftests/cgroup/cgroup_util.c
index 41cc3b5e5be1..b69bdeb4b9fe 100644
--- a/tools/testing/selftests/cgroup/cgroup_util.c
+++ b/tools/testing/selftests/cgroup/cgroup_util.c
@@ -59,8 +59,7 @@ char *cg_name(const char *root, const char *name)
size_t len = strlen(root) + strlen(name) + 2;
char *ret = malloc(len);
- if (name)
- snprintf(ret, len, "%s/%s", root, name);
+ snprintf(ret, len, "%s/%s", root, name);
return ret;
}
@@ -70,8 +69,7 @@ char *cg_name_indexed(const char *root, const char *name, int index)
size_t len = strlen(root) + strlen(name) + 10;
char *ret = malloc(len);
- if (name)
- snprintf(ret, len, "%s/%s_%d", root, name, index);
+ snprintf(ret, len, "%s/%s_%d", root, name, index);
return ret;
}
--
2.14.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
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