From patchwork Tue Feb 6 00:22:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Leoshkevich X-Patchwork-Id: 1895463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Z6aO009G; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TTPCh4k3Jz23g7 for ; Tue, 6 Feb 2024 11:25:20 +1100 (AEDT) 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 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== 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) From: Ilya Leoshkevich To: Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Ed Maste , Li-Wen Hsu , Warner Losh Cc: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-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 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 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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") # setup qemu user prompt = "$" self.console_ssh_init(prompt, self._config["guest_user"], self._config["guest_pass"]) self.console_wait_send(prompt, "exit\n") # setup root user prompt = "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") # setup virtio-blk #1 (tarfile) self.console_wait(prompt) self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") pkgs = self.get_qemu_packages_from_lcitool_json() self.print_step("Installing packages") self.ssh_root_check("pkg install -y %s\n" % " ".join(pkgs)) # shutdown self.ssh_root(self.poweroff) self.wait() if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) self.print_step("All done") if __name__ == "__main__": sys.exit(basevm.main(FreeBSDVM, config=FREEBSD_CONFIG))