1
0
mirror of https://passt.top/passt synced 2024-07-01 23:42:41 +00:00

tests: Use dhclient --no-pid for namespaces in two_guests tests

Before starting the guests, these tests configure addresses in a pasta
namespace using dhclient.  However, because it's a user namespace, it's
not running as "real" root and can't write to the dhclient pid file.
This doesn't stop it working, but causes an ugly error message which we
can avoid by using the --no-pid option.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-07-15 15:21:37 +10:00 committed by Stefano Brivio
parent ada08d4735
commit 2d289ec711

View File

@ -233,13 +233,13 @@ setup_two_guests() {
pane_wait PASST_1
__ifname="$(pane_parse PASST_1)"
pane_run GUEST_1 "/sbin/dhclient -4 ${__ifname}"
pane_run GUEST_2 "/sbin/dhclient -4 ${__ifname}"
pane_run GUEST_1 "/sbin/dhclient -4 --no-pid ${__ifname}"
pane_run GUEST_2 "/sbin/dhclient -4 --no-pid ${__ifname}"
pane_status GUEST_1
pane_status GUEST_2
sleep 2
pane_run GUEST_1 "/sbin/dhclient -6 ${__ifname}"
pane_run GUEST_2 "/sbin/dhclient -6 ${__ifname}"
pane_run GUEST_1 "/sbin/dhclient -6 --no-pid ${__ifname}"
pane_run GUEST_2 "/sbin/dhclient -6 --no-pid ${__ifname}"
pane_status GUEST_1
pane_status GUEST_2