public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Subject: [PATCH 03/11] test/demo: Use relative paths to change directories when possible
Date: Sat, 24 Sep 2022 00:42:29 +0200	[thread overview]
Message-ID: <20220923224237.437279-4-sbrivio@redhat.com> (raw)
In-Reply-To: <20220923224237.437279-1-sbrivio@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2226 bytes --]

A cd to __STATEDIR__ results in a rather long command, that's not
very readable. Jump between directories using .. and relative paths,
once we're there.

Signed-off-by: Stefano Brivio <sbrivio(a)redhat.com>
---
 test/demo/passt | 7 +++----
 test/demo/pasta | 4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/test/demo/passt b/test/demo/passt
index eb9b856..36796f7 100644
--- a/test/demo/passt
+++ b/test/demo/passt
@@ -53,8 +53,7 @@ nl
 say	Let's create a small initramfs image for the guest.
 guest	cd __STATEDIR__
 guest	git clone git://mbuto.sh/mbuto
-guest	cd mbuto
-guest	./mbuto -f passt.img -p __STATEDIR__/passt/test/passt.mbuto -c lz4
+guest	./mbuto/mbuto -f passt.img -p passt/test/passt.mbuto -c lz4
 sleep	2
 
 nl
@@ -82,7 +81,7 @@ say	Now let's run 'passt' in the new namespace, and
 nl
 say	  enter this namespace from the guest terminal too.
 sleep	3
-guest	cd __STATEDIR__/passt
+guest	cd passt
 gout	TARGET_PID pgrep -P $(cat pasta.pid)
 sleep	1
 
@@ -101,7 +100,7 @@ nl
 say	  back-end to passt's UNIX domain socket.
 sleep	2
 hout	VMLINUZ echo "/boot/vmlinuz-$(uname -r)"
-guest	../passt/qrap 5 qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0 virtio-net.napi_tx=1" -device virtio-net-pci,netdev=hostnet0,x-txburst=16384 -netdev socket,fd=5,id=hostnet0
+guest	./qrap 5 qemu-system-x86_64 -enable-kvm -m 4096 -cpu host -smp 4 -kernel __VMLINUZ__ -initrd ../passt.img -nographic -serial stdio -nodefaults -append "console=ttyS0 virtio-net.napi_tx=1" -device virtio-net-pci,netdev=hostnet0,x-txburst=16384 -netdev socket,fd=5,id=hostnet0
 sleep	10
 
 nl
diff --git a/test/demo/pasta b/test/demo/pasta
index 02a2ba2..11e4d3c 100644
--- a/test/demo/pasta
+++ b/test/demo/pasta
@@ -140,12 +140,12 @@ say	 can also take packet captures.
 sleep	3
 passt	exit
 sleep	2
-passtb	./pasta -p __STATEDIR__/demo_pasta.pcap
+passtb	./pasta -p ../demo_pasta.pcap
 sleep	2
 passt	
 passt	/sbin/dhclient -4 --no-pid
 sleep	2
-hostb	tshark -r __STATEDIR__/demo_pasta.pcap
+hostb	tshark -r ../demo_pasta.pcap
 sleep	5
 
 nl
-- 
@@ -140,12 +140,12 @@ say	 can also take packet captures.
 sleep	3
 passt	exit
 sleep	2
-passtb	./pasta -p __STATEDIR__/demo_pasta.pcap
+passtb	./pasta -p ../demo_pasta.pcap
 sleep	2
 passt	
 passt	/sbin/dhclient -4 --no-pid
 sleep	2
-hostb	tshark -r __STATEDIR__/demo_pasta.pcap
+hostb	tshark -r ../demo_pasta.pcap
 sleep	5
 
 nl
-- 
2.35.1


  parent reply	other threads:[~2022-09-23 22:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-23 22:42 [PATCH 00/11] Fixes for demos, pre-push hook, README Stefano Brivio
2022-09-23 22:42 ` [PATCH 01/11] contrib/podman: Rebase to latest upstream Stefano Brivio
2022-09-23 22:42 ` [PATCH 02/11] hooks/pre_push: Fix upload of CI's logs and terminal capture file Stefano Brivio
2022-09-23 22:42 ` Stefano Brivio [this message]
2022-09-23 22:42 ` [PATCH 04/11] test/demo: Avoid using port 5201 on the host Stefano Brivio
2022-09-23 22:42 ` [PATCH 05/11] test/lib: Drop perf_report_append() from perf_report Stefano Brivio
2022-09-23 22:42 ` [PATCH 06/11] test/lib: Don't try to write to perf.js when running demos Stefano Brivio
2022-09-23 22:42 ` [PATCH 07/11] README: Fix misspellings of openSUSE Stefano Brivio
2022-09-23 22:42 ` [PATCH 08/11] README: Point openSUSE links to Dario's OBS repository Stefano Brivio
2022-09-23 22:42 ` [PATCH 09/11] README: Fix indentation in "Try It" section Stefano Brivio
2022-09-23 22:42 ` [PATCH 10/11] README: Fix paragraph in Try It section of passt Stefano Brivio
2022-09-23 22:42 ` [PATCH 11/11] README: Add legend for Features section Stefano Brivio

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=20220923224237.437279-4-sbrivio@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=passt-dev@passt.top \
    /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).