]> git.ipfire.org Git - network.git/commitdiff
test: Run "ip -d link" to show the status of the environment
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Jun 2023 07:49:54 +0000 (07:49 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Jun 2023 07:49:54 +0000 (07:49 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
test/networkd/test.sh

index 2af7479f6c1083b9663182ee7b3baeb41b1465a8..a22aeb372d248155b141d0ca82d5e1537a0e80b4 100644 (file)
@@ -42,6 +42,19 @@ run_script() {
        return 0
 }
 
+dump_command() {
+       echo "Output of $@"
+
+       # Run the command
+       $@ 2>&1
+
+       echo "EOF"
+}
+
+dump_status() {
+       dump_command "ip -d link"
+}
+
 # Launches networkd in the background
 launch_networkd() {
        echo "Launching networkd..."
@@ -54,6 +67,9 @@ launch_networkd() {
 
 terminate_networkd() {
        if [ -n "${networkd_PID}" ]; then
+               # Collect some status information
+               dump_status
+
                # Send SIGTERM
                kill -TERM "${networkd_PID}"