From nobody Tue Nov 26 13:29:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1707179090; cv=none; d=zohomail.com; s=zohoarc; b=dPzpks1g+3Q/3WW8y1agLaeTyqJoq0VleUyA+2XQmUu9UvUzl954wvjift4vxNMNmifh9btKixwmyidVqCnFdt2ywSqIWrL67KcSs/Qp4IAQLgE6hAH4ImSFInIyaBl87QoMsw1zAqulF8Yxc1qSq+gi+bJJ6YWGTpzA7MTJTYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707179090; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=On0cXnAM/VIOLau6BhfyMy6ezCUC5MviB/LlM3G3vMg=; b=jG5sgjo8ykMu+qeBjYdkH+3wy7c9wB11G3COXju4RZmJBOMLj+mALOGRQ/zink2Tntao9uWOoVAUWyve8W3tzW6EZr7bPrMKrsMxUjDDXRWL2YSjwUtG9vHub94doHAnQ4qe1mOmHQNUqDprolk3L8kd0Hw6gWP+8DWsAT7FpLc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 170717909005354.53788164713308; Mon, 5 Feb 2024 16:24:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX9Fo-0001kJ-W6; Mon, 05 Feb 2024 19:24:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fm-0001jG-7L for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:23:58 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fk-0003sR-7U for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:23:57 -0500 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4160LX3c023430; Tue, 6 Feb 2024 00:23:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1b04ur-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:51 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4160MREZ027649; Tue, 6 Feb 2024 00:23:51 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1b04uh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:51 +0000 Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 415L9ujq008527; Tue, 6 Feb 2024 00:23:50 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w221judsf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:50 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4160NmMY22217390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 00:23:48 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 739CE2004B; Tue, 6 Feb 2024 00:23:48 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9006520043; Tue, 6 Feb 2024 00:23:47 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.57.170]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 6 Feb 2024 00:23:47 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=On0cXnAM/VIOLau6BhfyMy6ezCUC5MviB/LlM3G3vMg=; b=tgi4/nkVVof0lYAgMu/72WYxHHcUkxGHcdh3w+t13N7hbuAOxoBKmy4csurJwpNIoS0r lpTBvlHslsG2+3XMwIPEtTWfXRhxZ3AvPgZKo+rLgs/xRU4mrN+Yg4Bp0vzUnj8rCJN5 2ji4LhENnaJ3QkHSSQxSavAHVDBaDUye7OOKVXk8gepcgVdrI3nbE2lJoxbmHchJYOBP NaPBWW/lcGsa1ZzihVstpRnZLdkrP+OU31mQucCA0utqNUHHaqzybOBOnK+tvsV5LadT 9ydxMPmhmF9qajUHMplUrBhAjBBZ262kJ0WBXLkl+wEe/Ym9k5xSbQh8QH8Jr72yXBSi DA== From: Ilya Leoshkevich To: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Warner Losh Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Kyle Evans , qemu-devel@nongnu.org, Ilya Leoshkevich Subject: [PATCH v3 1/4] tests/vm: Set UseDNS=no in the sshd configuration Date: Tue, 6 Feb 2024 01:22:00 +0100 Message-ID: <20240206002344.12372-2-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206002344.12372-1-iii@linux.ibm.com> References: <20240206002344.12372-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: WeyJueHIf02_T5wwHJZuz31MOJrrGh3i X-Proofpoint-ORIG-GUID: G4YbgauUn_SGLnoafyLauhsKfJncTkNt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_18,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402060000 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=iii@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1707179092444100007 Content-Type: text/plain; charset="utf-8" make vm-build-freebsd sometimes fails with "Connection timed out during banner exchange". The client strace shows: 13:59:30 write(3, "SSH-2.0-OpenSSH_9.3\r\n", 21) =3D 21 13:59:30 getpid() =3D 252655 13:59:30 poll([{fd=3D3, events=3DPOLLIN}], 1, 5000) =3D 1 ([{fd=3D3, re= vents=3DPOLLIN}]) 13:59:32 read(3, "S", 1) =3D 1 13:59:32 poll([{fd=3D3, events=3DPOLLIN}], 1, 3625) =3D 1 ([{fd=3D3, re= vents=3DPOLLIN}]) 13:59:32 read(3, "S", 1) =3D 1 13:59:32 poll([{fd=3D3, events=3DPOLLIN}], 1, 3625) =3D 1 ([{fd=3D3, re= vents=3DPOLLIN}]) 13:59:32 read(3, "H", 1) =3D 1 There is a 2s delay during connection, and ConnectTimeout is set to 1. Raising it makes the issue go away, but we can do better. The server truss shows: 888: 27.811414714 socket(PF_INET,SOCK_DGRAM|SOCK_CLOEXEC,0) =3D 5 (0x5) 888: 27.811765030 connect(5,{ AF_INET 10.0.2.3:53 },16) =3D 0 (0x0) 888: 27.812166941 sendto(5,"\^Z/\^A\0\0\^A\0\0\0\0\0\0\^A2"...,39,0,NUL= L,0) =3D 39 (0x27) 888: 29.363970743 poll({ 5/POLLRDNORM },1,5000) =3D 1 (0x1) So the delay is due to a DNS query. Disable DNS queries in the server config. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/vm/basevm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 61725b83254..c0d62c08031 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -406,40 +406,42 @@ def console_send(self, command): vm.console_socket.send(char.encode("utf-8")) time.sleep(0.01) =20 def console_wait_send(self, wait, command): self.console_wait(wait) self.console_send(command) =20 def console_ssh_init(self, prompt, user, pw): sshkey_cmd =3D "echo '%s' > .ssh/authorized_keys\n" \ % self._config['ssh_pub_key'].rstrip() self.console_wait_send("login:", "%s\n" % user) self.console_wait_send("Password:", "%s\n" % pw) self.console_wait_send(prompt, "mkdir .ssh\n") self.console_wait_send(prompt, sshkey_cmd) self.console_wait_send(prompt, "chmod 755 .ssh\n") self.console_wait_send(prompt, "chmod 644 .ssh/authorized_key= s\n") =20 def console_sshd_config(self, prompt): self.console_wait(prompt) self.console_send("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_con= fig\n") + self.console_wait(prompt) + self.console_send("echo 'UseDNS no' >> /etc/ssh/sshd_config\n") for var in self.envvars: self.console_wait(prompt) self.console_send("echo 'AcceptEnv %s' >> /etc/ssh/sshd_config= \n" % var) =20 def print_step(self, text): sys.stderr.write("### %s ...\n" % text) =20 def wait_ssh(self, wait_root=3DFalse, seconds=3D300, cmd=3D"exit 0"): # Allow more time for VM to boot under TCG. if not kvm_available(self.arch): seconds *=3D self.tcg_timeout_multiplier starttime =3D datetime.datetime.now() endtime =3D starttime + datetime.timedelta(seconds=3Dseconds) cmd_success =3D False while datetime.datetime.now() < endtime: if wait_root and self.ssh_root(cmd) =3D=3D 0: cmd_success =3D True break elif self.ssh(cmd) =3D=3D 0: cmd_success =3D True --=20 2.43.0 From nobody Tue Nov 26 13:29:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1707179119; cv=none; d=zohomail.com; s=zohoarc; b=LMytpC7vrTdamnNRKrS+LqDQaXSA+2V3tUNOH09iSbEHM/fY7lXREQQDXwlW2a1iDYhrxnDHOPUZ02uDdHiXsMcZOpu1EmFks+Trw+etr+8xzkJi+BrCHMYA7mOieai7HmPmYRcyng9t7V8usA62lGA09fo2VZyU/usEeXiDDxE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707179119; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qf2VHRvW8jBQv8qcGKm0F0B8Bjym/TADYN78FGy0l1s=; b=HbiIHfMYMbb5/tyY0ZvyXSlwbmgjSc90lvQxFxYy4kuu8jiR06MAKiJyrCpaWI72ZS+PvvjLF6QKoiqr9vwvwbDcRIx1n2l0actLrNSQvN9e90OVJMaGqPwv1u+v3kU8cTphYNbH2MP52QfyMF8YBmiZ1PLsoHk3DswK7iu9mIE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707179119788893.2656656845544; Mon, 5 Feb 2024 16:25:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX9Fp-0001kc-OL; Mon, 05 Feb 2024 19:24:01 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fn-0001jT-OT for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:23:59 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fl-0003sZ-Ml for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:23:59 -0500 Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4160LRS8022765; Tue, 6 Feb 2024 00:23:54 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1b04vu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:54 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4160MREb027649; Tue, 6 Feb 2024 00:23:54 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1b04vj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:53 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 415N0STn008823; Tue, 6 Feb 2024 00:23:53 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w206ybxf1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:53 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4160NpKp2228898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 00:23:51 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E88920040; Tue, 6 Feb 2024 00:23:51 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2CA9D20043; Tue, 6 Feb 2024 00:23:50 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.57.170]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 6 Feb 2024 00:23:50 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=qf2VHRvW8jBQv8qcGKm0F0B8Bjym/TADYN78FGy0l1s=; b=Z6aO009G0hwCrnLPBOgyarB/1CnzbTK7DdcSrDgUlZRZyhLCZTcKaKIpDTXr/19xteAW 7FlScpLgyn0eM63FIy7fc0ERFxR5jIIMrk6KSpyv0/mD6G02xk7fe52VJJ9eNjje1IG6 mbRuP2You7caquJbMo0yFws48ejyoNSfja9sgYJlYdeEbX0tFIp+py6ZSo7MxnNzdUgM jzfir/ubAHgw+0n/cog1ErXQ9qML7oubr+On571Kn1YMM529vKrNOPQ2xqZhrBbvHRBA uEwV0VgSX9PpdoOHKw+QGA5oKNxOJUNMpRZlWggoacsR9rUxoPzYqMriewNIrKGsH++J 9A== From: Ilya Leoshkevich To: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Warner Losh Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Kyle Evans , qemu-devel@nongnu.org, Ilya Leoshkevich Subject: [PATCH v3 2/4] tests/vm/freebsd: Reload the sshd configuration Date: Tue, 6 Feb 2024 01:22:01 +0100 Message-ID: <20240206002344.12372-3-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206002344.12372-1-iii@linux.ibm.com> References: <20240206002344.12372-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: hsl6QFJSAAeM5uCaaYyiX1ERZw7lS6D9 X-Proofpoint-ORIG-GUID: mlcBbNRCkQ3X5WMQbgPHZvG4dMXINnTV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_18,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 clxscore=1015 mlxscore=0 mlxlogscore=999 spamscore=0 malwarescore=0 adultscore=0 impostorscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402060000 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=iii@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1707179120161100001 Content-Type: text/plain; charset="utf-8" After console_sshd_config(), the SSH server needs to be nudged to pick up the new configs. The scripts for the other BSD flavors already do this with a reboot, but a simple reload is sufficient. Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich --- tests/vm/freebsd | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b581bd17fb7..1247f40a385 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -91,40 +91,41 @@ class FreeBSDVM(basevm.BaseVM): self.console_wait_send("Use an empty password", "\n") self.console_wait_send("Use a random password", "\n") self.console_wait("Enter password:") self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait("Enter password again:") self.console_send("%s\n" % self._config["guest_pass"]) self.console_wait_send("Lock out", "\n") self.console_wait_send("OK", "yes\n") self.console_wait_send("Add another user", "no\n") self.console_wait_send("~ #", "exit\n") =20 # setup qemu user prompt =3D "$" self.console_ssh_init(prompt, self._config["guest_user"], self._co= nfig["guest_pass"]) self.console_wait_send(prompt, "exit\n") =20 # setup root user prompt =3D "root@freebsd:~ #" self.console_ssh_init(prompt, "root", self._config["root_pass"]) self.console_sshd_config(prompt) + self.console_wait_send(prompt, "service sshd reload\n") =20 # setup virtio-blk #1 (tarfile) self.console_wait(prompt) self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") =20 pkgs =3D self.get_qemu_packages_from_lcitool_json() self.print_step("Installing packages") self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs)) =20 # shutdown self.ssh_root(self.poweroff) self.wait() =20 if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) self.print_step("All done") =20 if __name__ =3D=3D "__main__": sys.exit(basevm.main(FreeBSDVM, config=3DFREEBSD_CONFIG)) --=20 2.43.0 From nobody Tue Nov 26 13:29:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1707179107; cv=none; d=zohomail.com; s=zohoarc; b=RnVEx8VYJ8VWO0AlK5vNVlR8ylMk+cc1eG70ZRTVebixMk6J5ojj6O9Rnhr325X4FnpT69fZiA38e+EKxsL7BS2bL/paHR8ptz161Q2AvxtNfkk6JmgmG4sRUrnCD9zw2rhR+UjfcBTEY0cllf1dY+4FiowRcmbzI82CadK+RRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707179107; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=IdfyLjmjBFjOm41WcYRxyRP1wxtS7n7cjmmGOvVqigk=; b=G4X27Ynot5CJak2gzR6o5nf2lnC11Hc39xAmZxzNhB01lyZ2NTqGNRpfbanz6hqEubj4yR0bbGDyOLpSk9x2KkvJUAMAIsHooe61bmn0NLcCzTiqg68xhI948hGKgy3/F0A7Fwh2g3AoXLA0DWfO/Z/7O/5A2gEOb/eN8Bd0BaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707179107100647.972391570539; Mon, 5 Feb 2024 16:25:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX9Fq-0001ks-Lc; Mon, 05 Feb 2024 19:24:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fo-0001k0-7W for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:24:00 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fm-0003sl-Mu for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:23:59 -0500 Received: from pps.filterd (m0353724.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4160Co8L002620; Tue, 6 Feb 2024 00:23:56 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1ag5va-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:56 +0000 Received: from m0353724.ppops.net (m0353724.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4160L1Fr020602; Tue, 6 Feb 2024 00:23:55 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a1ag5us-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:55 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 41602quY005430; Tue, 6 Feb 2024 00:23:54 GMT Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3w21akbmxc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:54 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4160NqHI38863502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 00:23:52 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0E9820040; Tue, 6 Feb 2024 00:23:52 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF3EA20043; Tue, 6 Feb 2024 00:23:51 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.57.170]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 6 Feb 2024 00:23:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=IdfyLjmjBFjOm41WcYRxyRP1wxtS7n7cjmmGOvVqigk=; b=khTs/WdX5tYEGZGjubSgNyr7L7rDGA014w70msleikSzDMvqFvfQqF1+bNF/rqb/ViSO e/S2QF6nakTGDTTvUtGO15qtYfvSaCi2HAyCwbOLZS2Q+SwYo2VW/KWN0Is43xFr8TNk GcWiEViiY/KaOu0oOZ5zXUY/CV1N02xVTtiifwHTddi+j8GA3FbuYUUYVetFAl/RultI b8Gg7U5TOJ7R/WG545jUEwSbtkqQxI+C9oOWg4p/bb9ExpiIvBdY8rouIL5A9Jc7FNjr eZvquZ1IwE/gxr/ZJ2YXpmdLVQyoo/apV24SLgMzEHfPoTgl+XH2fQYqT/eilqWNFjam mw== From: Ilya Leoshkevich To: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Warner Losh Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Kyle Evans , qemu-devel@nongnu.org, Ilya Leoshkevich Subject: [PATCH v3 3/4] test-util-filemonitor: Adapt to the FreeBSD inotify rename semantics Date: Tue, 6 Feb 2024 01:22:02 +0100 Message-ID: <20240206002344.12372-4-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206002344.12372-1-iii@linux.ibm.com> References: <20240206002344.12372-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 7bfUiLYSx8lUlwmckAH5mJK43CByAek7 X-Proofpoint-ORIG-GUID: eu8e0N1M_bnwh8u6XGCxvUjJ_1i9N4uQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_18,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 spamscore=0 bulkscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402060000 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=iii@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1707179108055100001 Content-Type: text/plain; charset="utf-8" Unlike on Linux, on FreeBSD renaming a file when the destination already exists results in an IN_DELETE event for that existing file: $ FILEMONITOR_DEBUG=3D1 build/tests/unit/test-util-filemonitor Rename /tmp/test-util-filemonitor-K13LI2/fish/one.txt -> /tmp/test-util= -filemonitor-K13LI2/two.txt Event id=3D200000000 event=3D2 file=3Done.txt Queue event id 200000000 event 2 file one.txt Queue event id 100000000 event 2 file two.txt Queue event id 100000002 event 2 file two.txt Queue event id 100000000 event 0 file two.txt Queue event id 100000002 event 0 file two.txt Event id=3D100000000 event=3D0 file=3Dtwo.txt Expected event 0 but got 2 This difference in behavior is not expected to break the real users, so teach the test to accept it. Suggested-by: Daniel P. Berrange Signed-off-by: Ilya Leoshkevich --- tests/unit/test-util-filemonitor.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/test-util-filemonitor.c b/tests/unit/test-util-file= monitor.c index a22de275955..02e67fc96ac 100644 --- a/tests/unit/test-util-filemonitor.c +++ b/tests/unit/test-util-filemonitor.c @@ -343,40 +343,48 @@ test_file_monitor_events(void) .filesrc =3D "fish/", .watchid =3D &watch4 }, { .type =3D QFILE_MONITOR_TEST_OP_ADD_WATCH, .filesrc =3D "fish/one.txt", .watchid =3D &watch5 }, { .type =3D QFILE_MONITOR_TEST_OP_CREATE, .filesrc =3D "fish/one.txt", }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "one.txt", .watchid =3D &watch4, .eventid =3D QFILE_MONITOR_EVENT_CREATED }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "one.txt", .watchid =3D &watch5, .eventid =3D QFILE_MONITOR_EVENT_CREATED }, =20 =20 { .type =3D QFILE_MONITOR_TEST_OP_DEL_WATCH, .filesrc =3D "fish/one.txt", .watchid =3D &watch5 }, { .type =3D QFILE_MONITOR_TEST_OP_RENAME, .filesrc =3D "fish/one.txt", .filedst =3D "two.txt", }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "one.txt", .watchid =3D &watch4, .eventid =3D QFILE_MONITOR_EVENT_DELETED }, +#ifdef __FreeBSD__ + { .type =3D QFILE_MONITOR_TEST_OP_EVENT, + .filesrc =3D "two.txt", .watchid =3D &watch0, + .eventid =3D QFILE_MONITOR_EVENT_DELETED }, + { .type =3D QFILE_MONITOR_TEST_OP_EVENT, + .filesrc =3D "two.txt", .watchid =3D &watch2, + .eventid =3D QFILE_MONITOR_EVENT_DELETED }, +#endif { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "two.txt", .watchid =3D &watch0, .eventid =3D QFILE_MONITOR_EVENT_CREATED }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "two.txt", .watchid =3D &watch2, .eventid =3D QFILE_MONITOR_EVENT_CREATED }, =20 =20 { .type =3D QFILE_MONITOR_TEST_OP_RMDIR, .filesrc =3D "fish", }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "", .watchid =3D &watch4, .eventid =3D QFILE_MONITOR_EVENT_IGNORED, .swapnext =3D true }, { .type =3D QFILE_MONITOR_TEST_OP_EVENT, .filesrc =3D "fish", .watchid =3D &watch0, .eventid =3D QFILE_MONITOR_EVENT_DELETED }, { .type =3D QFILE_MONITOR_TEST_OP_DEL_WATCH, .filesrc =3D "fish", .watchid =3D &watch4 }, =20 --=20 2.43.0 From nobody Tue Nov 26 13:29:39 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1707179090; cv=none; d=zohomail.com; s=zohoarc; b=BPE7wvDuNNNVABPB2JAYUvRh25WkofP3DtMCwECKWildaI5lttUpo2eyzkrjvGaETWUqxsWvF4Pm5h3wv3jp+GMwd8yfTzPVIS35MjQniUEC3is/sgZ7nJlVfpZzYi8UQEmfayehTXvK6GKhRc3RPSJGWZ8JB/qCy2X8oj5Y3zM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1707179090; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=b5DDrymG6y6hoDXvZL54Cgzdaqfq/GvjB69xKDt3uAE=; b=A0YBNH6Cr6tvBad/PwKwNj1wtXxOsfxtSgSDsllyrB5gB4NeCpav98IwzkDSIDd4j4TKG48dQM2UnwszvI5F3yAdFCo5VJzy22Wrngsdm/Dm0C+Z2jzno3BVKtuxIHfrFCJ/rRnMdg6PliJd2fKsISm9EEmX48sFeAGJW6KYNFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1707179090309279.02970090359577; Mon, 5 Feb 2024 16:24:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rX9Fw-0001mz-Q3; Mon, 05 Feb 2024 19:24:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Ft-0001mb-C7 for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:24:05 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rX9Fr-0003t9-Bc for qemu-devel@nongnu.org; Mon, 05 Feb 2024 19:24:05 -0500 Received: from pps.filterd (m0353728.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4160MJ4A025823; Tue, 6 Feb 2024 00:23:58 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a5n00x1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:57 +0000 Received: from m0353728.ppops.net (m0353728.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 4160NvbS029666; Tue, 6 Feb 2024 00:23:57 GMT Received: from ppma11.dal12v.mail.ibm.com (db.9e.1632.ip4.static.sl-reverse.com [50.22.158.219]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3w3a5n00wh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:57 +0000 Received: from pps.filterd (ppma11.dal12v.mail.ibm.com [127.0.0.1]) by ppma11.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 415LSC12016184; Tue, 6 Feb 2024 00:23:56 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma11.dal12v.mail.ibm.com (PPS) with ESMTPS id 3w22h1u9vd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 06 Feb 2024 00:23:56 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 4160NsTH33816902 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 6 Feb 2024 00:23:54 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3D6E720043; Tue, 6 Feb 2024 00:23:54 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5FAB220040; Tue, 6 Feb 2024 00:23:53 +0000 (GMT) Received: from heavy.ibm.com (unknown [9.171.57.170]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 6 Feb 2024 00:23:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=b5DDrymG6y6hoDXvZL54Cgzdaqfq/GvjB69xKDt3uAE=; b=CM1yYIrsx6cdZ3l42L0esYzMQul6Ld/joGIAmZt+yhtFDIX0HCTk9AI5DfpBtAOZOP2h iDs4HbcV1u5ATuJx2D5KwETn5NqhQRLPRVbto1AP9ytFFygffPzoHj/gjVCCs1nx+6Hq CdOKm3kMVYdcLJ2ENGjXfwqd8a8Hj8MgP35mJgxdHSlqvmJsNw91Ck4UHHm45QKTmWEX odo9TDPW8F7lPy8lKpme/SCNsCPfHCUBuB1fRW1U7PxuVGxCbspyNFyNccJ/o37FKj5u zkNFDkS/QQ5CR/QFz5fzEyDL2ylIYzniLkhHzqKY4JwdraRe+Zn7bxMq4khZzdynAPeA FQ== From: Ilya Leoshkevich To: Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Warner Losh Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Beraldo Leal , Kyle Evans , qemu-devel@nongnu.org, Ilya Leoshkevich Subject: [PATCH v3 4/4] meson: Link with libinotify on FreeBSD Date: Tue, 6 Feb 2024 01:22:03 +0100 Message-ID: <20240206002344.12372-5-iii@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240206002344.12372-1-iii@linux.ibm.com> References: <20240206002344.12372-1-iii@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 9xhiHaE8G1hRp09FCRAF30wKWnWA6H0w X-Proofpoint-ORIG-GUID: CCzA9FhmBl0OyGswEa2r1B8G87yz9wnp X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-05_18,2024-01-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 bulkscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 malwarescore=0 phishscore=0 adultscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2402060000 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.156.1; envelope-from=iii@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1707179092289100004 Content-Type: text/plain; charset="utf-8" make vm-build-freebsd fails with: ld: error: undefined symbol: inotify_init1 >>> referenced by filemonitor-inotify.c:183 (../src/util/filemonitor-in= otify.c:183) >>> util_filemonitor-inotify.c.o:(qemu_file_monitor_new) = in archive libqemuutil.a On FreeBSD the inotify functions are defined in libinotify.so. Add it to the dependencies. Signed-off-by: Ilya Leoshkevich Reviewed-by: Thomas Huth --- meson.build | 23 +++++++++++++++++++---- util/meson.build | 6 +++++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/meson.build b/meson.build index b5d6dc94a83..e5d6f2d057e 100644 --- a/meson.build +++ b/meson.build @@ -2367,60 +2367,72 @@ if rbd.found() endif if rdma.found() config_host_data.set('HAVE_IBV_ADVISE_MR', cc.has_function('ibv_advise_mr', dependencies: rdma, prefix: '#include ')) endif =20 have_asan_fiber =3D false if get_option('sanitizers') and \ not cc.has_function('__sanitizer_start_switch_fiber', args: '-fsanitize=3Daddress', prefix: '#include ') warning('Missing ASAN due to missing fiber annotation interface') warning('Without code annotation, the report may be inferior.') else have_asan_fiber =3D true endif config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber) =20 +have_inotify_init =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init') +have_inotify_init1 =3D cc.has_header_symbol('sys/inotify.h', 'inotify_init= 1') +inotify =3D not_found +if (have_inotify_init or have_inotify_init1) and host_os =3D=3D 'freebsd' + # libinotify-kqueue + inotify =3D cc.find_library('inotify') + if have_inotify_init + have_inotify_init =3D inotify.found() + endif + if have_inotify_init1 + have_inotify_init1 =3D inotify.found() + endif +endif +config_host_data.set('CONFIG_INOTIFY', have_inotify_init) +config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1) + # has_header_symbol config_host_data.set('CONFIG_BLKZONED', cc.has_header_symbol('linux/blkzoned.h', 'BLKOPENZONE= ')) config_host_data.set('CONFIG_EPOLL_CREATE1', cc.has_header_symbol('sys/epoll.h', 'epoll_create1')) config_host_data.set('CONFIG_FALLOCATE_PUNCH_HOLE', cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_PUN= CH_HOLE') and cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_KEE= P_SIZE')) config_host_data.set('CONFIG_FALLOCATE_ZERO_RANGE', cc.has_header_symbol('linux/falloc.h', 'FALLOC_FL_ZER= O_RANGE')) config_host_data.set('CONFIG_FIEMAP', cc.has_header('linux/fiemap.h') and cc.has_header_symbol('linux/fs.h', 'FS_IOC_FIEMAP')) config_host_data.set('CONFIG_GETRANDOM', cc.has_function('getrandom') and cc.has_header_symbol('sys/random.h', 'GRND_NONBLOCK')) -config_host_data.set('CONFIG_INOTIFY', - cc.has_header_symbol('sys/inotify.h', 'inotify_init')) -config_host_data.set('CONFIG_INOTIFY1', - cc.has_header_symbol('sys/inotify.h', 'inotify_init1'= )) config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK', cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLAC= K')) config_host_data.set('CONFIG_RTNETLINK', cc.has_header_symbol('linux/rtnetlink.h', 'IFLA_PROTO= _DOWN')) config_host_data.set('CONFIG_SYSMACROS', cc.has_header_symbol('sys/sysmacros.h', 'makedev')) config_host_data.set('HAVE_OPTRESET', cc.has_header_symbol('getopt.h', 'optreset')) config_host_data.set('HAVE_IPPROTO_MPTCP', cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP')) =20 # has_member config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID', cc.has_member('struct sigevent', 'sigev_notify_thread= _id', prefix: '#include ')) config_host_data.set('HAVE_STRUCT_STAT_ST_ATIM', cc.has_member('struct stat', 'st_atim', prefix: '#include ')) config_host_data.set('HAVE_BLK_ZONE_REP_CAPACITY', cc.has_member('struct blk_zone', 'capacity', @@ -4390,40 +4402,43 @@ if host_os =3D=3D 'windows' endif summary_info +=3D {'seccomp support': seccomp} summary_info +=3D {'GlusterFS support': glusterfs} summary_info +=3D {'hv-balloon support': hv_balloon} summary_info +=3D {'TPM support': have_tpm} summary_info +=3D {'libssh support': libssh} summary_info +=3D {'lzo support': lzo} summary_info +=3D {'snappy support': snappy} summary_info +=3D {'bzip2 support': libbzip2} summary_info +=3D {'lzfse support': liblzfse} summary_info +=3D {'zstd support': zstd} summary_info +=3D {'NUMA host support': numa} summary_info +=3D {'capstone': capstone} summary_info +=3D {'libpmem support': libpmem} summary_info +=3D {'libdaxctl support': libdaxctl} summary_info +=3D {'libudev': libudev} # Dummy dependency, keep .found() summary_info +=3D {'FUSE lseek': fuse_lseek.found()} summary_info +=3D {'selinux': selinux} summary_info +=3D {'libdw': libdw} +if host_os =3D=3D 'freebsd' + summary_info +=3D {'libinotify-kqueue': inotify} +endif summary(summary_info, bool_yn: true, section: 'Dependencies') =20 if host_arch =3D=3D 'unknown' message() warning('UNSUPPORTED HOST CPU') message() message('Support for CPU host architecture ' + cpu + ' is not currently') message('maintained. The QEMU project does not guarantee that QEMU will') message('compile or work on this host CPU. You can help by volunteering') message('to maintain it and providing a build host for our continuous') message('integration setup.') if get_option('tcg').allowed() and target_dirs.length() > 0 message() message('configure has succeeded and you can continue to build, but') message('QEMU will use a slow interpreter to emulate the target CPU.') endif endif =20 if not supported_oses.contains(host_os) message() diff --git a/util/meson.build b/util/meson.build index af3bf5692d8..0ef9886be04 100644 --- a/util/meson.build +++ b/util/meson.build @@ -87,40 +87,44 @@ if have_block or have_ga util_ss.add(files('thread-pool.c', 'qemu-timer.c')) util_ss.add(files('qemu-sockets.c')) endif if have_block util_ss.add(files('aio-wait.c')) util_ss.add(files('buffer.c')) util_ss.add(files('bufferiszero.c')) util_ss.add(files('hbitmap.c')) util_ss.add(files('hexdump.c')) util_ss.add(files('iova-tree.c')) util_ss.add(files('iov.c', 'uri.c')) util_ss.add(files('nvdimm-utils.c')) util_ss.add(files('block-helpers.c')) util_ss.add(files('qemu-coroutine-sleep.c')) util_ss.add(files('qemu-co-shared-resource.c')) util_ss.add(files('qemu-co-timeout.c')) util_ss.add(files('readline.c')) util_ss.add(files('throttle.c')) util_ss.add(files('timed-average.c')) if config_host_data.get('CONFIG_INOTIFY1') - util_ss.add(files('filemonitor-inotify.c')) + freebsd_dep =3D [] + if host_os =3D=3D 'freebsd' + freebsd_dep =3D inotify + endif + util_ss.add(files('filemonitor-inotify.c'), freebsd_dep) else util_ss.add(files('filemonitor-stub.c')) endif if host_os =3D=3D 'linux' util_ss.add(files('vhost-user-server.c'), vhost_user) util_ss.add(files('vfio-helpers.c')) util_ss.add(files('chardev_open.c')) endif endif =20 if cpu =3D=3D 'aarch64' util_ss.add(files('cpuinfo-aarch64.c')) elif cpu in ['x86', 'x86_64'] util_ss.add(files('cpuinfo-i386.c')) elif cpu =3D=3D 'loongarch64' util_ss.add(files('cpuinfo-loongarch.c')) elif cpu in ['ppc', 'ppc64'] util_ss.add(files('cpuinfo-ppc.c')) endif --=20 2.43.0