yanet-platform / yanet

A high performance framework for forwarding traffic based on DPDK
Other
164 stars 17 forks source link

Add two options to yanet-autotest-run to use gdb with control/dataplane #194

Closed ol-imorozko closed 2 weeks ago

ol-imorozko commented 1 month ago

This way, developers could use gdb without manually copying the command to run it

TheRandomCharacter commented 3 weeks ago

This seems to have limited usefulness. Maybe adding a script to start tmux session with panes containing dataplane, controlplane started under gdb and a test running pane will be more flexible?

I'm currently using

#!/bin/bash
session="yanet-debug"
testid=$1
apt install --yes tmux
tmux new-session -s $session -d
tmux send-keys -t $session "gdb --args build_autotest/dataplane/yanet-dataplane -c autotest/units/001_one_port/dataplane.conf"
tmux split-window -h
tmux send-keys -t $session "gdb --args build_autotest/controlplane/yanet-controlplane -c autotest/units/001_one_port/$testid/controlplane.conf"
tmux split-window -v
tmux send-keys -t $session "build_autotest/autotest/yanet-autotest"
tmux attach -t $session
ol-imorozko commented 2 weeks ago

Maybe adding a script to start tmux session with panes containing dataplane, controlplane started under gdb and a test running pane will be more flexible?

This script is certainly useful; however, I think it would be better to offer an option of starting gdb with yanet-autotest-run, because there will often be situations where you just need to quickly check how something works and not set up a fully-functional debug tmux session.

these changes won't conflict with such script though, we can add it in a separate PR