Netdev List
 help / color / mirror / Atom feed
From: Vincent Jardin via B4 Relay <devnull+vjardin.free.fr@kernel.org>
To: David Ahern <dsahern@kernel.org>,
	 Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Matthieu Baerts <matttbe@kernel.org>,
	 Vincent Jardin <vjardin@free.fr>
Subject: [PATCH iproute2-next 3/3] testsuite: add test for lisp
Date: Fri, 27 Nov 2026 23:37:41 +0100	[thread overview]
Message-ID: <20261127-iproute2-lisp-v1-3-df8ea175bc06@free.fr> (raw)
In-Reply-To: <20261127-iproute2-lisp-v1-0-df8ea175bc06@free.fr>

From: Vincent Jardin <vjardin@free.fr>

LISP checks

Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
 testsuite/tests/ip/link/add_type_lisp.t | 59 +++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/testsuite/tests/ip/link/add_type_lisp.t b/testsuite/tests/ip/link/add_type_lisp.t
new file mode 100755
index 00000000..d42f6dd3
--- /dev/null
+++ b/testsuite/tests/ip/link/add_type_lisp.t
@@ -0,0 +1,59 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# Copyright (c) 2026 Vincent Jardin <vjardin@free.fr>, Free Mobile
+
+. lib/generic.sh
+
+# Skip test on a kernel without LISP
+NEW_DEV="$(rand_dev)"
+$IP link add dev "$NEW_DEV" type lisp id 1 2> /dev/null || ts_skip
+$IP link del dev "$NEW_DEV"
+
+ts_log "[Testing Add LISP interface (instance ID)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV LISP interface (instance ID)" link add dev "$NEW_DEV" type lisp id 101
+
+ts_ip "$0" "Show $NEW_DEV LISP interface (instance ID)" -d link show dev "$NEW_DEV"
+test_on "$NEW_DEV"
+test_on "lisp id 101"
+test_on_not "external"
+test_on_not "local"
+
+ts_ip "$0" "Del $NEW_DEV LISP interface (instance ID)" link del dev "$NEW_DEV"
+
+
+ts_log "[Testing Add LISP interface (local RLOCs)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV LISP interface (local RLOCs)" link add dev "$NEW_DEV" type lisp id 16777215 local 192.0.2.1 local 2001:db8::1
+
+ts_ip "$0" "Show $NEW_DEV LISP interface (local RLOCs)" -d link show dev "$NEW_DEV"
+test_on "$NEW_DEV"
+test_on "lisp id 16777215"
+test_on "local 192.0.2.1"
+test_on "local 2001:db8::1"
+
+ts_ip "$0" "Show $NEW_DEV LISP interface (local RLOCs, JSON)" -d -j link show dev "$NEW_DEV"
+test_on '"id":16777215'
+test_on '"local":"192.0.2.1"'
+test_on '"local6":"2001:db8::1"'
+
+ts_ip "$0" "Del $NEW_DEV LISP interface (local RLOCs)" link del dev "$NEW_DEV"
+
+
+ts_log "[Testing Add LISP interface (metadata)]"
+NEW_DEV="$(rand_dev)"
+
+ts_ip "$0" "Add $NEW_DEV LISP interface (metadata)" link add dev "$NEW_DEV" type lisp external
+
+ts_ip "$0" "Show $NEW_DEV LISP interface (metadata)" -d link show dev "$NEW_DEV"
+test_on "$NEW_DEV"
+test_on "lisp external"
+test_on_not "lisp id"
+
+ts_ip "$0" "Show $NEW_DEV LISP interface (metadata, JSON)" -d -j link show dev "$NEW_DEV"
+test_on '"external":true'
+
+ts_ip "$0" "Del $NEW_DEV LISP interface (metadata)" link del dev "$NEW_DEV"
+

-- 
2.43.0



      parent reply	other threads:[~2026-11-27 22:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27 22:37 [PATCH iproute2-next 0/3] ip: support LISP (RFC 9300) tunnel devices Vincent Jardin via B4 Relay
2026-11-27 22:37 ` [PATCH iproute2-next 1/3] uapi: add the attributes of the lisp devices Vincent Jardin via B4 Relay
2026-11-27 22:37 ` [PATCH iproute2-next 2/3] ip: add the lisp link type Vincent Jardin via B4 Relay
2026-11-27 22:37 ` Vincent Jardin via B4 Relay [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261127-iproute2-lisp-v1-3-df8ea175bc06@free.fr \
    --to=devnull+vjardin.free.fr@kernel.org \
    --cc=dsahern@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=vjardin@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox