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
parent d71a00e9f5
commit f427703f16

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()