From nobody Tue Jul 8 11:38:37 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 4bbzdT6hMYz60sYk; Tue, 08 Jul 2025 11:38:37 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bbzdT5XPdz3thm; Tue, 08 Jul 2025 11:38:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751974717; 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=HLv+WJV9CKrjtLIss+V5OV4UgfYMVtT3NDh4hWxIpqY=; b=RoGKKm3OveVlUFQ7pGzakSnKn671NiV+zWzXRDtJFVYovVX2/9tFm/E5+yoZhzMjO6M+vg zMTE7F9oFxL9Q1iWdary25ARH9uTAi/209eHZFZJ011mgTs9gJakN7uqDTuZ+nmIBYkKUA iNCLj2+zXypoGgB/nrUYlQ6GkypBgiWJCtkRCVPcMnEoqLpR9aTS6LFr8o2ZM4ICXulyTo mL66KVUe0or0Uzvqoj6raINDGckgwjSY/e+zBHJXb9hykgpW9CmZRdQ3urOFIZifFBNptT A7MijT5g4m4WDrNjKpXz4rzJQ+po7q/83fcMFzoaK1uTr9AT/Y52K/jQIGKLQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1751974717; 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=HLv+WJV9CKrjtLIss+V5OV4UgfYMVtT3NDh4hWxIpqY=; b=RbPZhe4VB1jW75/1DEmK0HXsNjRkqcovl335SxNaCp07hyF7012lYlWT+S+3ox0Sa3SBR9 4SRdhy9yEP/Ju3JaCiz7iS27wSZ2IOZxlg7nNjfI3pBD/feHozkv77XPKjrtPUGeyKzpi3 CeWeu7ldCHg1+NJH67AqGUAsQySJRAab663l7BSzd1XUAzlP0tYQAvSD1zDDrqwZNFfXXh 1JsWyK2MFWByA5llzOBuEsivwFWwnr6hGrR9XjotYJJYOIOeMnhH02Cr8EVCxiLIjGaeAF eo3ZhpciNHrd+atrI8z4v4H6sn8o3+XlA1a1d3XqmwmyIoNIITTjbruh/gci4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1751974717; a=rsa-sha256; cv=none; b=Ihn7I4V1YDK2usNFYdmwZoTI19NXdA+iyMg1zPjhi+sbLs4MFOKL6vxVmpecSl0M7bh3/h agj6Hef7N00HRnGBc5czBoNmY/Y/yeM6hfPoZWzZvbutq92pNc0aS/O5ixJvMrkrhsBnjg uRXAp0Oyl36haNzgk/JxeQ1QprEMvmbocwUcT+dIrP8vDkhb1cf48paAM8DgL00gfwh4pu j4bDZHqxKzhM+ihIaw4IexrzV9PiczH/1OLjKTMm3co2JqLEA6G3PKAQBF7D1P071Kq5Am 5h+Z8AqW7IQFkl6BlCkhLRrWk4pLKSwGm1t18w/6OLOfbfJmlkFIVCpmBCwIzA== 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 4bbzdT4pHmzbp7; Tue, 08 Jul 2025 11:38:37 +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 568BcbB9036621; Tue, 8 Jul 2025 11:38:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 568BcbgG036618; Tue, 8 Jul 2025 11:38:37 GMT (envelope-from git) Date: Tue, 8 Jul 2025 11:38:37 GMT Message-Id: <202507081138.568BcbgG036618@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 2f50ea54c6e3 - main - tests/ci: fix race condition in bhyveload boot 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: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f50ea54c6e3b15f655e800eb680ddcb80e30b4f Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=2f50ea54c6e3b15f655e800eb680ddcb80e30b4f commit 2f50ea54c6e3b15f655e800eb680ddcb80e30b4f Author: Siva Mahadevan AuthorDate: 2025-07-07 17:16:13 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-08 11:32:17 +0000 tests/ci: fix race condition in bhyveload boot Currently, there is a race condition where the Makefile sh invocation of 'bhyveload -c stdio' exits before receiving any user input in the bootloader (e.g. in the form of a user typically pressing ), causing the 'expect' script to wrongly spawn the 'bhyve' invocation while still in the bootloader. This patch wraps bhyveload in expect(1) to ensure that stdio is correctly consumed before the process exits. Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1757 --- tests/ci/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 271fc377619b..44b19663fc49 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -210,7 +210,11 @@ ci-extract-meta: .PHONY ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY .if ${MACHINE} == "amd64" && ( ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" ) && ( !defined(USE_QEMU) || empty(USE_QEMU) ) /usr/sbin/bhyvectl --vm=${TEST_VM_NAME} --destroy || true - /usr/sbin/bhyveload -c stdio -m ${VM_MEM_SIZE} -d ${CIDISK} ${TEST_VM_NAME} + expect -c "set timeout ${TIMEOUT_EXPECT}; \ + spawn /usr/bin/timeout -k 5s 30s /usr/sbin/bhyveload \ + -c stdio -m ${VM_MEM_SIZE} -d ${CIDISK} ${TEST_VM_NAME}; \ + expect { eof }; \ + exit [lindex [wait] 3]" expect -c "set timeout ${TIMEOUT_EXPECT}; \ spawn /usr/bin/timeout -k 60 ${TIMEOUT_VM} /usr/sbin/bhyve \ -c ${PARALLEL_JOBS} -m ${VM_MEM_SIZE} -A -H -P \