carp tests: ensure exactly one jail is master

Verify that we only have one master, not two.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Kristof Provost 2023-03-06 13:33:50 +01:00 committed by Oscar Zhao
parent c6582381a7
commit 609c94016f

View File

@ -46,6 +46,11 @@ wait_for_carp()
[ -z "$(is_master ${jail2} ${itf2})" ]; do
sleep 1
done
if [ -n "$(is_master ${jail1} ${itf1})" ] &&
[ -n "$(is_master ${jail2} ${itf2})" ]; then
atf_fail "Both jails are master"
fi
}
carp_init()