aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-09-24 00:05:20 +0200
committerStefano Brivio <sbrivio@redhat.com>2022-09-24 00:05:20 +0200
commit6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d (patch)
treeaba744544d23d347cb4b227f96f73ef6130ce434
parent57fa9dd4c9edbbac2c2a7e81c0b2c713795a69f9 (diff)
downloadpasst-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar.gz
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar.bz2
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar.lz
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar.xz
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.tar.zst
passt-6d08bfc3e0b5fa542608f5a7439de7cfdc7e993d.zip
test/demo: Use relative paths to change directories when possible
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@redhat.com>
-rw-r--r--test/demo/passt7
-rw-r--r--test/demo/pasta4
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