All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
To: khorenko@virtuozzo.com
Cc: devel@openvz.org
Subject: [Devel] [PATCH vz10 2/3] selftests: bonding: run the LACPDU test in its own netns
Date: Tue,  1 Sep 2026 02:39:51 +0300	[thread overview]
Message-ID: <20260831234036.1649006-2-eva.kurchatova@virtuozzo.com> (raw)
In-Reply-To: <20260831234036.1649006-1-eva.kurchatova@virtuozzo.com>

The test builds its bond in whatever namespace it is started in. Where
NetworkManager runs, it brings the fresh veths up before the test gets
to enslave them, and bonding refuses:

  Error: Device can not be enslaved while up.

Commit be809424659c ("selftests: bonding: do not set port down before
adding to bond") took the explicit link down out, as a veth is down when
it is created, so nothing sets it down again.

Run the test in a namespace of its own instead, the way nft_audit.sh and
nft_concat_range.sh already do, where nothing else manages the devices.

https://virtuozzo.atlassian.net/browse/VSTOR-139651
Feature: fix selftests
Signed-off-by: Eva Kurchatova <eva.kurchatova@virtuozzo.com>
---
 .../selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh b/tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh
index 1ec7f59db7f4..7310eeccc3f8 100755
--- a/tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh
+++ b/tools/testing/selftests/drivers/net/bonding/bond-break-lacpdu-tx.sh
@@ -19,6 +19,12 @@
 #    |veth1 | |veth2 |
 #    +------+ +------+
 #
+# The test builds its devices in whatever namespace it is started in,
+# where NetworkManager brings them up before they can be enslaved:
+#   Error: Device can not be enslaved while up.
+# Run in a fresh network namespace, like the netfilter tests do.
+[ "${1}" != "run" ] && { unshare -n "${0}" run; exit $?; }
+
 # We use veths instead of physical interfaces
 REQUIRE_MZ=no
 NUM_NETIFS=0
@@ -26,6 +32,7 @@ lib_dir=$(dirname "$0")
 source "$lib_dir"/../../../net/forwarding/lib.sh
 
 set -e
+
 cleanup() {
 	ip link del fab-br0 >/dev/null 2>&1 || :
 	ip link del fbond  >/dev/null 2>&1 || :
-- 
2.55.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-08-31 23:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 23:39 [Devel] [PATCH vz10 1/3] ms/bonding: fix xfrm offload feature setup on active-backup mode Eva Kurchatova
2026-08-31 23:39 ` Eva Kurchatova [this message]
2026-08-31 23:39 ` [Devel] [PATCH vz10 3/3] selftests: bonding: do not build on the namespaces of a killed run Eva Kurchatova

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=20260831234036.1649006-2-eva.kurchatova@virtuozzo.com \
    --to=eva.kurchatova@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.