From nobody Tue Oct 14 23:44:52 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cmW6D5BVPz6CHYx; Tue, 14 Oct 2025 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cmW6D4b7lz3crB; Tue, 14 Oct 2025 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760485492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0TV0POI3v5W0xLh+uv/nu0hrJKiV0kxG2E53htzrqwg=; b=RsPAr/WkgN32sDs8pXINpO473T8LIn65/DQN+2g2b/Emh4sTSVi7LMdC0MzVZs7zB5+3uI yDp1+C+PgKye0euVL0KquP21Nr2FOwloh3SdvwYz4OiV4EtnDE8U8mB2m9g3284JErLL8R b1vGjLgt6f3Sox+kJEB6hjhH65Mrez1Z2vvDMvAeqMmz/4zlyYj2+d0CKOnwFw/OAuCmVY 7B6myC+sMKKPjFC2oLaKd3zlsd82P80JDZk/vUyYwPrsuM9gsYfzhi5Mtop6aXU55MbdtN YC6odqmcK6VGwKcjUcqRhWlWzIfQYzksIO5AhxrbAuElBg8O6xnHMsGk2unl3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1760485492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0TV0POI3v5W0xLh+uv/nu0hrJKiV0kxG2E53htzrqwg=; b=Af0l4Rx55ttiXz0MaNM3bvZIdGmXtpF+z50PbOv/wJGFFGhmZtDbhZJA5bqYdRdoe6y7G6 BRIqnp5sQqa7wLeAOI/kBCf+beZys4HOJox5Z5kcHCqa2VwpBCNEay7sAabnfI+W3At5RM IIbemgX8zY6UkN8oeFFCxHQk0zICHO02ex2iXU5Go/SFPBnFMKQ+Mz3OQCd99/0m9HxGcT uHvIamFpKxpXQvfdmU/N8KlcyJ5UH6TS8KKcd6z20nWGjGBAL3jwaQ63ke6VjvFLpx1b6I MhD91bhNeLBlmq+UgnXQx0PuHJ2Dc+fsubwjfRvxKTB7hHTAPNeW+WRFwqGeiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1760485492; a=rsa-sha256; cv=none; b=JNkuhAB5p2vOoas7He9NPgXC9FZMJkdbUiNRU8PNcr9pReEzCo+3iaoBwwxXtN1xLHMjW5 MWBHcqNRmx1LoUglQWpDyETmkt/+5oKweby14bRx7xSma6KLhlKB+WzknIFUg78eJShjLG NO2hRN+ehI3j+4D2bdJDIA+VqyuZ1OQKfbSoodqgvq1Qtdz+4pTX9vj8CpwZIKDPdmE2Bi pGBndvUvnNV5DTrJI4rIVw2X2ERx8lDYetHRTNPb5qOGBDSqBbep8W19+DtnLy5kTaFEMD BpXUdxGSuYYZpaK53/P3TuwbMEFc89irJte0j5xAEiJQ3Nq+aCaAlvtKOdatVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cmW6D3dj0zDl; Tue, 14 Oct 2025 23:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 59ENiqTl003942; Tue, 14 Oct 2025 23:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59ENiqVc003939; Tue, 14 Oct 2025 23:44:52 GMT (envelope-from git) Date: Tue, 14 Oct 2025 23:44:52 GMT Message-Id: <202510142344.59ENiqVc003939@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c8359b327104 - main - tests/multicast: fix test flakyness List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8359b327104325af6dc97202e21d6131acb0573 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c8359b327104325af6dc97202e21d6131acb0573 commit c8359b327104325af6dc97202e21d6131acb0573 Author: Gleb Smirnoff AuthorDate: 2025-10-14 23:43:15 +0000 Commit: Gleb Smirnoff CommitDate: 2025-10-14 23:43:15 +0000 tests/multicast: fix test flakyness The receiver is run as a background job, so we need a wait loop to make sure it has been fully functional before launching sender. Reported by: Siva Mahadevan PR: 290210 --- tests/sys/netinet/multicast.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/sys/netinet/multicast.sh b/tests/sys/netinet/multicast.sh index a3854fd2fd20..273970d0f7ea 100755 --- a/tests/sys/netinet/multicast.sh +++ b/tests/sys/netinet/multicast.sh @@ -45,6 +45,15 @@ multicast_vnet_init() jexec mjail2 ifconfig ${epair2}b 192.0.3.2/24 } +multicast_join() +{ + jexec mjail2 $(atf_get_srcdir)/multicast-receive \ + $1 233.252.0.1 6676 $2 > out & pid=$! + while ! jexec mjail2 ifmcstat | grep -q 233\.252\.0\.1; do + sleep 0.01 + done +} + atf_test_case "IP_ADD_MEMBERSHIP_ip_mreq" "cleanup" IP_ADD_MEMBERSHIP_ip_mreq_head() { @@ -56,8 +65,7 @@ IP_ADD_MEMBERSHIP_ip_mreq_body() multicast_vnet_init # join group on interface with IP address 192.0.2.2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreq 233.252.0.1 6676 192.0.2.2 > out & pid=$! + multicast_join ip_mreq 192.0.2.2 atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 192.0.2.1 hello @@ -65,8 +73,7 @@ IP_ADD_MEMBERSHIP_ip_mreq_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface with IP address 192.0.3.2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreq 233.252.0.1 6676 192.0.3.2 > out & pid=$! + multicast_join ip_mreq 192.0.3.2 atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 192.0.3.1 hello @@ -90,8 +97,7 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() multicast_vnet_init # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreqn 233.252.0.1 6676 ${epair1}b > out & pid=$! + multicast_join ip_mreqn ${epair1}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello @@ -99,8 +105,7 @@ IP_ADD_MEMBERSHIP_ip_mreqn_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - ip_mreqn 233.252.0.1 6676 ${epair2}b > out & pid=$! + multicast_join ip_mreqn ${epair2}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello @@ -123,9 +128,8 @@ MCAST_JOIN_GROUP_body() { multicast_vnet_init - # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - group_req 233.252.0.1 6676 ${epair1}b > out & pid=$! + # join group on interface epair1 + multicast_join group_req ${epair1}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair1}a hello @@ -133,8 +137,7 @@ MCAST_JOIN_GROUP_body() atf_check -s exit:0 -o inline:"192.0.2.1:6676 hello\n" cat out # join group on interface epair2 - jexec mjail2 $(atf_get_srcdir)/multicast-receive \ - group_req 233.252.0.1 6676 ${epair2}b > out & pid=$! + multicast_join group_req ${epair2}b atf_check -s exit:0 -o empty \ jexec mjail1 $(atf_get_srcdir)/multicast-send \ 0.0.0.0 6676 233.252.0.1 6676 ${epair2}a hello