git: f427703f16db - main - carp tests: ensure exactly one jail is master
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 07 Mar 2023 10:38:07 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f427703f16db6c33205307d8cc2d9d526bc1c6fd commit f427703f16db6c33205307d8cc2d9d526bc1c6fd Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2023-03-06 12:33:50 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-03-07 09:51:44 +0000 carp tests: ensure exactly one jail is master Verify that we only have one master, not two. Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netinet/carp.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/sys/netinet/carp.sh b/tests/sys/netinet/carp.sh index 95cb7847ae28..d31a17ed6beb 100755 --- a/tests/sys/netinet/carp.sh +++ b/tests/sys/netinet/carp.sh @@ -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()