1
0
Fork 0
mirror of https://passt.top/passt synced 2025-05-29 04:35:33 +02:00

test: Extend context system to run commands in namespace for pasta tests

Extend the context system to allow commands to be run in a namespace
created with unshare, and use it for the namespace used in the pasta tests.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-09-12 20:56:21 +10:00 committed by Stefano Brivio
parent a8c32c85d5
commit a8a437abd6
3 changed files with 29 additions and 13 deletions
test/lib

View file

@ -61,15 +61,13 @@ layout_pasta() {
get_info_cols
tmux pipe-pane -O -t ${PANE_NS} "cat >> ${LOGDIR}/pane_ns.log"
tmux select-pane -t ${PANE_NS} -T "namespace"
tmux send-keys -l -t ${PANE_INFO} 'while cat /tmp/.passt_test_log_pipe; do :; done'
tmux send-keys -t ${PANE_INFO} -N 100 C-m
tmux select-pane -t ${PANE_INFO} -T "test log"
pane_watch_contexts ${PANE_HOST} host host
pane_watch_contexts ${PANE_PASST} pasta passt
pane_watch_contexts ${PANE_NS} "namespace" unshare ns
info_layout "single pasta instance with namespace"