dist/tools/ethos: deduplicate setup_network.sh, start_network.sh#11840
dist/tools/ethos: deduplicate setup_network.sh, start_network.sh#11840kaspar030 wants to merge 5 commits intoRIOT-OS:masterfrom
Conversation
There was a problem hiding this comment.
I tested start_network.sh by running the test in #11818 using wireless nodes. The BR was an iotlab-m3.
I also tested gnrc_networking on a samr21-xpro with the same BR and I was able to ping the samr21-xpro from my local host.
If you agree with my changes then squash directly.
| remove_tap | ||
| ip a d fd00:dead:beef::1/128 dev lo | ||
| kill ${UHCPD_PID} | ||
| [ -n "${SETUP_NETWORK_PID}" ] && kill -TERM ${SETUP_NETWORK_PID} |
There was a problem hiding this comment.
This fails to kill all the decedent processes, I would suggest this change:
diff --git a/dist/tools/ethos/start_network.sh b/dist/tools/ethos/start_network.sh
index 4f832a258..a457735e0 100755
--- a/dist/tools/ethos/start_network.sh
+++ b/dist/tools/ethos/start_network.sh
@@ -3,13 +3,13 @@
ETHOS_DIR="$(dirname $(readlink -f $0))"
cleanup() {
- [ -n "${SETUP_NETWORK_PID}" ] && kill -TERM ${SETUP_NETWORK_PID}
trap "" INT QUIT TERM EXIT
+ [ -n "${SETUP_NETWORK_GPID}" ] && kill -TERM -$SETUP_NETWORK_GPID
}
setup_network() {
${ETHOS_DIR}/setup_network.sh $1 $2 &
- SETUP_NETWORK_PID=$!
+ SETUP_NETWORK_GPID=$(ps -o pgid= $! | grep -o '[0-9]*')
}
PORT=$1
|
ping @kaspar030 |
1 similar comment
|
ping @kaspar030 |
|
ping @kaspar030! |
|
this should be a low hanging fruit.. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
|
Ping @kaspar030 |
Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
honestly I'm lost on this one, rebasing is messy due to the DHCPv6 additions. Does one of you want to take over (or re-do it)? |
Was planning on that anyway (also to integrate with |
Contribution description
#11816 introduced setup_network.sh, introducing some duplication with start_network.sh.
This PR aims to remove the duplications.
Testing procedure
Issues/PRs references