aboutgitcodebugslistschat
path: root/test/passt.mbuto
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-07-15 15:21:26 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-07-22 19:41:42 +0200
commit1fb2bd675495ece3bb58fe8003dc67eaca7ace34 (patch)
tree29e05dfa16d5f3816343824963048413a5e19277 /test/passt.mbuto
parente6e2e30c343ccad60b873b20d2342fd823648baf (diff)
downloadpasst-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar.gz
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar.bz2
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar.lz
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar.xz
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.tar.zst
passt-1fb2bd675495ece3bb58fe8003dc67eaca7ace34.zip
tests: Add rudimentary debugging to dhclient-script
We now supply a minimal dhclient-script of our own in the mbuto boot image. There are some problems with it, so add some basic logging to help debug it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'test/passt.mbuto')
-rwxr-xr-xtest/passt.mbuto6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/passt.mbuto b/test/passt.mbuto
index 500c34f..fb59cec 100755
--- a/test/passt.mbuto
+++ b/test/passt.mbuto
@@ -21,11 +21,15 @@ LINKS="${LINKS:-
ash,dash,bash /init
ash,dash,bash /bin/sh}"
-DIRS="${DIRS} /tmp /sbin"
+DIRS="${DIRS} /tmp /sbin /var/log"
FIXUP="${FIXUP}"'
cat > /sbin/dhclient-script << EOF
#!/bin/sh
+LOG=/var/log/dhclient-script.log
+echo \${reason} \${interface} >> \$LOG
+set >> \$LOG
+
[ -n "\${new_interface_mtu}" ] && ip link set dev \${interface} mtu \${new_interface_mtu}
[ -n "\${new_ip_address}" ] && ip addr add \${new_ip_address}/\${new_subnet_mask} dev \${interface}