public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: passt-dev@passt.top, Stefano Brivio <sbrivio@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 2/2] debug
Date: Fri,  7 Feb 2025 16:50:45 +1100	[thread overview]
Message-ID: <20250207055045.1753013-3-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20250207055045.1753013-1-david@gibson.dropbear.id.au>

---
 test/lib/setup             |  8 +++++---
 test/migrate/bidirectional | 15 ++++++++++++++-
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/test/lib/setup b/test/lib/setup
index 97b4487a..933b81e3 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -308,7 +308,6 @@ setup_two_guests() {
 # setup_migrate() - Set up two namespace, run qemu, passt/passt-repair in both
 setup_migrate() {
 	context_setup_host host
-	context_setup_host mon
 	context_setup_host pasta_1
 	context_setup_host pasta_2
 
@@ -330,8 +329,11 @@ setup_migrate() {
 	# Option 1: send stuff via spliced path in pasta
 	# context_run_bg pasta_1 "./pasta ${__opts} --trace -l /tmp/pasta1.log -P ${STATESETUP}/pasta_1.pid -t 10001,10002 -T 10003 -u 10001,10002 -U 10003 --config-net ${NSTOOL} hold ${STATESETUP}/ns1.hold"
 	# Option 2: send stuff via tap (--map-guest-addr) instead (useful to see capture of full migration)
-	context_run_bg pasta_1 "./pasta ${__opts} --trace -l /tmp/pasta1.log -P ${STATESETUP}/pasta_1.pid -t 10001,10002,10004 -T 10003 -u 10001,10002,10004 -U 10003 --map-guest-addr 169.254.1.1 --config-net ${NSTOOL} hold ${STATESETUP}/ns1.hold"
-	context_setup_nstool passt_1 ${STATESETUP}/ns1.hold
+	context_run_bg pasta_1 "strace -o ${LOGDIR}/pasta_1.strace ./pasta ${__opts} --trace -l /tmp/pasta1.log -P ${STATESETUP}/pasta_1.pid -t 10001,10002,10004 -T 10003 -u 10001,10002,10004 -U 10003 --map-guest-addr 169.254.1.1 --config-net ${NSTOOL} hold ${STATESETUP}/ns1.hold"
+
+	context_setup_nstool mon ${STATESETUP}/ns1.hold
+
+        context_setup_nstool passt_1 ${STATESETUP}/ns1.hold
 	context_setup_nstool passt_repair_1 ${STATESETUP}/ns1.hold
 
 	context_setup_nstool passt_2 ${STATESETUP}/ns1.hold
diff --git a/test/migrate/bidirectional b/test/migrate/bidirectional
index cd686e0c..47af2dcd 100644
--- a/test/migrate/bidirectional
+++ b/test/migrate/bidirectional
@@ -14,6 +14,9 @@
 g1tools	ip jq dhclient socat cat
 htools	ip jq
 
+mon	echo "Before everything"
+mon	ss --tcp -a -n
+
 test	Interface name
 g1out	IFNAME1 ip -j link show | jq -rM '.[] | select(.link_type == "ether").ifname'
 hout	HOST_IFNAME ip -j -4 route show|jq -rM '[.[] | select(.dst == "default").dev] | .[0]'
@@ -34,6 +37,9 @@ hostb	socat -u TCP4-LISTEN:10006 OPEN:msg,create,trunc
 guest1b	socat -u TCP4-LISTEN:10001 OPEN:msg,create,trunc
 sleep	1
 
+mon	echo "Servers active"
+mon	ss --tcp -a -n
+
 guest1b	socat -u UNIX-RECV:proxy.sock,null-eof TCP4:169.254.1.1:10006
 hostb	socat -u UNIX-RECV:__STATESETUP__/proxy.sock,null-eof TCP4:__ADDR1__:10001
 sleep	1
@@ -41,9 +47,16 @@ guest1	printf "Hello from guest 1" | socat -u STDIN UNIX:proxy.sock
 host	printf "Dear guest 1," | socat -u STDIN UNIX:__STATESETUP__/proxy.sock
 sleep	1
 
+mon	echo "pre-migrate"
+mon	ss --tcp -a -n
+
 mon	echo "migrate tcp:0:20005" | socat -u STDIN UNIX:__STATESETUP__/qemu_1_mon.sock
 
-sleep	1
+sleep	5
+
+mon	echo "post-migrate"
+mon	ss --tcp -a -n
+
 guest2	printf " and from guest 2" | socat -u STDIN UNIX:proxy.sock,shut-null
 host	printf " you are now guest 2" | socat -u STDIN UNIX:__STATESETUP__/proxy.sock,shut-null
 
-- 
@@ -14,6 +14,9 @@
 g1tools	ip jq dhclient socat cat
 htools	ip jq
 
+mon	echo "Before everything"
+mon	ss --tcp -a -n
+
 test	Interface name
 g1out	IFNAME1 ip -j link show | jq -rM '.[] | select(.link_type == "ether").ifname'
 hout	HOST_IFNAME ip -j -4 route show|jq -rM '[.[] | select(.dst == "default").dev] | .[0]'
@@ -34,6 +37,9 @@ hostb	socat -u TCP4-LISTEN:10006 OPEN:msg,create,trunc
 guest1b	socat -u TCP4-LISTEN:10001 OPEN:msg,create,trunc
 sleep	1
 
+mon	echo "Servers active"
+mon	ss --tcp -a -n
+
 guest1b	socat -u UNIX-RECV:proxy.sock,null-eof TCP4:169.254.1.1:10006
 hostb	socat -u UNIX-RECV:__STATESETUP__/proxy.sock,null-eof TCP4:__ADDR1__:10001
 sleep	1
@@ -41,9 +47,16 @@ guest1	printf "Hello from guest 1" | socat -u STDIN UNIX:proxy.sock
 host	printf "Dear guest 1," | socat -u STDIN UNIX:__STATESETUP__/proxy.sock
 sleep	1
 
+mon	echo "pre-migrate"
+mon	ss --tcp -a -n
+
 mon	echo "migrate tcp:0:20005" | socat -u STDIN UNIX:__STATESETUP__/qemu_1_mon.sock
 
-sleep	1
+sleep	5
+
+mon	echo "post-migrate"
+mon	ss --tcp -a -n
+
 guest2	printf " and from guest 2" | socat -u STDIN UNIX:proxy.sock,shut-null
 host	printf " you are now guest 2" | socat -u STDIN UNIX:__STATESETUP__/proxy.sock,shut-null
 
-- 
2.48.1


      parent reply	other threads:[~2025-02-07  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07  5:50 [PATCH 0/2] Migration debugging hacks David Gibson
2025-02-07  5:50 ` [PATCH 1/2] pcap comment hacks David Gibson
2025-02-07  5:50 ` David Gibson [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=20250207055045.1753013-3-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    --cc=sbrivio@redhat.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.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).