From nobody Fri May 17 09:01:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608064262; cv=none; d=zohomail.com; s=zohoarc; b=gueaoaT/z02wURt5p1ammyxZkOLSh5HbCNPCp/3SHIfPkssbOYSHCVTkP6rLbt/fav/s2koJOuISwxR3tdS+nqFBD9uQQ512trMqFxJGnBKmmm1Vc688X1ode279wF7fZp3SzmKjcap6oBTo9rko+vHxmMjx80gk1nFnXRYTAPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608064262; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8Qxk0Jry+joxqe+2hLOQF4obtXd78ehX62c8uSoOBrY=; b=nETYv1BreN7h87Ql1Z9w2cEVB6M1GeYdkpaTxs3GvHmIzryD9/+Fn3htnzOSWzHPGF1NMi3rrgXKqOo5ksHtiPDdc6omPSl9S7xuMcwT/LR2i8jmVxdCQkkR/oHflSWMR0P25IQ+2OZuykJM1Q2vC5H3cu1G+ns7zAwDVNvrShY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608064262102774.7012653366714; Tue, 15 Dec 2020 12:31:02 -0800 (PST) Received: from localhost ([::1]:34490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpFF8-00009i-Sg for importer@patchew.org; Tue, 15 Dec 2020 13:40:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43142) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpFBq-0005gM-PK for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50360) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpFBn-0006vL-BI for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:49 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-545-DG3126wwOeiavP2djTup0A-1; Tue, 15 Dec 2020 13:36:44 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9FF661016BFA; Tue, 15 Dec 2020 18:36:29 +0000 (UTC) Received: from thuth.com (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id CB1FC60864; Tue, 15 Dec 2020 18:36:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608057406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8Qxk0Jry+joxqe+2hLOQF4obtXd78ehX62c8uSoOBrY=; b=EB1+fkNZeUnxcf6Sc4R9eSxCZ4KY/g/7Zl3ZGvJcjeb5Wi0YdT6cL/iHQ8veIR4pM4uwgk iyilxumatVOJW0AONaQmKvJ9AY+3r3TSKxLZ/QwoY27xYZknJKIIQyFG8z/UBfLMBkgRZx uFgCNkQXHBrS17LDLOyvuRURhT5U3ZM= X-MC-Unique: DG3126wwOeiavP2djTup0A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH v2 1/3] tests/acceptance: Extract the code to clear dmesg and wait for CRW reports Date: Tue, 15 Dec 2020 19:36:21 +0100 Message-Id: <20201215183623.110128-2-thuth@redhat.com> In-Reply-To: <20201215183623.110128-1-thuth@redhat.com> References: <20201215183623.110128-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" We will use this in more spots soon, so it's easier to put this into a separate function. Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 30 ++++++++++++--------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance= /machine_s390_ccw_virtio.py index 864ef4ee6e..3d146b9ce6 100644 --- a/tests/acceptance/machine_s390_ccw_virtio.py +++ b/tests/acceptance/machine_s390_ccw_virtio.py @@ -17,12 +17,24 @@ from avocado_qemu import wait_for_console_pattern class S390CCWVirtioMachine(Test): KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 + timeout =3D 120 + def wait_for_console_pattern(self, success_message, vm=3DNone): wait_for_console_pattern(self, success_message, failure_message=3D'Kernel panic - not syn= cing', vm=3Dvm) =20 - timeout =3D 120 + def wait_for_crw_reports(self): + exec_command_and_wait_for_pattern(self, + 'while ! (dmesg -c | grep CRW) ; do sleep 1 ; done= ', + 'CRW reports') + + dmesg_clear_count =3D 1 + def clear_guest_dmesg(self): + exec_command_and_wait_for_pattern(self, 'dmesg -c > /dev/null; ' + 'echo dm_clear\ ' + str(self.dmesg_clear_count), + 'dm_clear ' + str(self.dmesg_clear_count)) + self.dmesg_clear_count +=3D 1 =20 def test_s390x_devices(self): =20 @@ -100,26 +112,18 @@ class S390CCWVirtioMachine(Test): 'cat /sys/bus/pci/devices/000a\:00\:00.0/function_= id', '0x0000000c') # add another device - exec_command_and_wait_for_pattern(self, - 'dmesg -c > /dev/null; echo dm_clear\ = 1', - 'dm_clear 1') + self.clear_guest_dmesg() self.vm.command('device_add', driver=3D'virtio-net-ccw', devno=3D'fe.0.4711', id=3D'net_4711') - exec_command_and_wait_for_pattern(self, - 'while ! (dmesg -c | grep CRW) ; do sleep 1 ; done= ', - 'CRW reports') + self.wait_for_crw_reports() exec_command_and_wait_for_pattern(self, 'ls /sys/bus/ccw/devices/', '0.0.4711') # and detach it again - exec_command_and_wait_for_pattern(self, - 'dmesg -c > /dev/null; echo dm_clear\ = 2', - 'dm_clear 2') + self.clear_guest_dmesg() self.vm.command('device_del', id=3D'net_4711') self.vm.event_wait(name=3D'DEVICE_DELETED', match=3D{'data': {'device': 'net_4711'}}) - exec_command_and_wait_for_pattern(self, - 'while ! (dmesg -c | grep CRW) ; do sleep 1 ; done= ', - 'CRW reports') + self.wait_for_crw_reports() exec_command_and_wait_for_pattern(self, 'ls /sys/bus/ccw/devices/0.0.471= 1', 'No such file or directory') --=20 2.27.0 From nobody Fri May 17 09:01:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608071833; cv=none; d=zohomail.com; s=zohoarc; b=RQOKDpIzGfFDW6gWR9c4jp4OWaoBrtsW+OA8YaP+KlbgOB63eCccQXQ8C43iBdBBUM01c76qKf50QBP+RAZ6k3QP5deSRYoeS9NGPpUQyTW1ShSWyzdkFDd2SqoGzWwuIVjsAN4FVCKZAxu3CX7k9dnKH9RJsKtLkgsTIA+FZ/E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608071833; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=I/VtoHp2a1l37k7Zx3Mx6s4dlsCVlSfZ7+BL1mhHkbs=; b=ioxfZbu3M+j+Z9KPnugpz/eh6UCAvrp+6U6ymTb+/hE0jApWkMJPY7UE+Y5fTVxQnhNhCAfSyLyQKgb/56yITHcmcuEa4uOU6CYuqg11NVsTsotvVlxj6/xfyXI2LzkD+hbXEKqwC85hWIZ8minlsH/M1jTE7rLXYhOYvNHbaUY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608071833548452.0032768552185; Tue, 15 Dec 2020 14:37:13 -0800 (PST) Received: from localhost ([::1]:60048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpFDy-0007Hu-GG for importer@patchew.org; Tue, 15 Dec 2020 13:39:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpFBt-0005n8-Pu for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:41317) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpFBq-0006vq-PE for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:53 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-5-zXsTx3-FMO6zib7Pdu-t5A-1; Tue, 15 Dec 2020 13:36:48 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BEF881012E92; Tue, 15 Dec 2020 18:36:31 +0000 (UTC) Received: from thuth.com (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1AE6060864; Tue, 15 Dec 2020 18:36:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608057410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I/VtoHp2a1l37k7Zx3Mx6s4dlsCVlSfZ7+BL1mhHkbs=; b=HEObGNbxnHNvJL6oJsBMQv1lzmF3koWoTWFNJkeJmjXg62SVkzJZH3XbABRvBvyXF7qRG0 YgSQ5F3SUYaxmrs/7Nvk/1pC5BKSvjsYa/D7mSIqIujbn/J+DG7oep5Nq1drmoP5czueEx VqAlW09vYEO4YW1gDt7pcKKvbOs8xWk= X-MC-Unique: zXsTx3-FMO6zib7Pdu-t5A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH v2 2/3] tests/acceptance: Test virtio-rng on s390 via /dev/hwrng Date: Tue, 15 Dec 2020 19:36:22 +0100 Message-Id: <20201215183623.110128-3-thuth@redhat.com> In-Reply-To: <20201215183623.110128-1-thuth@redhat.com> References: <20201215183623.110128-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" /dev/hwrng is only functional if virtio-rng is working right, so let's add a sanity check for this device node. Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo Reviewed-by: Wainer dos Santos Moschetta Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance= /machine_s390_ccw_virtio.py index 3d146b9ce6..e1ad0e29b0 100644 --- a/tests/acceptance/machine_s390_ccw_virtio.py +++ b/tests/acceptance/machine_s390_ccw_virtio.py @@ -64,9 +64,9 @@ class S390CCWVirtioMachine(Test): '-append', kernel_command_line, '-device', 'virtio-net-ccw,devno=3Dfe.1.1111', '-device', - 'virtio-rng-ccw,devno=3Dfe.2.0000,max_revision=3D= 0', + 'virtio-rng-ccw,devno=3Dfe.2.0000,max_revision=3D= 0,id=3Drn1', '-device', - 'virtio-rng-ccw,devno=3Dfe.3.1234,max_revision=3D= 2', + 'virtio-rng-ccw,devno=3Dfe.3.1234,max_revision=3D= 2,id=3Drn2', '-device', 'zpci,uid=3D5,target=3Dzzz', '-device', 'virtio-net-pci,id=3Dzzz', '-device', 'zpci,uid=3D0xa,fid=3D12,target=3Dseri= al', @@ -96,6 +96,19 @@ class S390CCWVirtioMachine(Test): exec_command_and_wait_for_pattern(self, 'cat /sys/bus/ccw/devices/0.3.1234/virtio?/feature= s', virtio_rng_features) + # check that /dev/hwrng works - and that it's gone after ejecting + exec_command_and_wait_for_pattern(self, + 'dd if=3D/dev/hwrng of=3D/dev/null bs=3D1k count= =3D10', + '10+0 records out') + self.clear_guest_dmesg() + self.vm.command('device_del', id=3D'rn1') + self.wait_for_crw_reports() + self.clear_guest_dmesg() + self.vm.command('device_del', id=3D'rn2') + self.wait_for_crw_reports() + exec_command_and_wait_for_pattern(self, + 'dd if=3D/dev/hwrng of=3D/dev/null bs=3D1k count= =3D10', + 'dd: /dev/hwrng: No such device') # verify that we indeed have virtio-net devices (without having the # virtio-net driver handy) exec_command_and_wait_for_pattern(self, --=20 2.27.0 From nobody Fri May 17 09:01:35 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1608071704; cv=none; d=zohomail.com; s=zohoarc; b=SceA0ZyFXU7K5WtQDvZVofj1+xMqrtewHIHwL63+K3R6P3fN65aZu1LNryNGSdtaBtPnH5hy2X/LqaZlO3X6ArMnKJPsOhZ+NzDooX8cBSxpLZivdiSYKdwdzUaLyvsUU90IG2GuljOBXb7JZ/QlTi0ueLGWwr5m5orwuQiz3So= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608071704; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=T4CVS5MpSuf5AEUcOlwJMRau5h1FKO/3iViv56nhLIM=; b=gfvXsuIxHYj++dJ3C/oOu754ioNCWm6RAd3gfEgJEsynF8MZfyN/2j0D1jipMTpCIZijNCx08uWNwdSGmYX1AoBDy1L4O9xM95Mgrm1AQ6cCC+A6uCkjrtNJcFI5LbG7mPRPJgbJgUCWMDlGMgF/OvzGuG8wZfazQL4+rOn2BfA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608071704406198.13621534853814; Tue, 15 Dec 2020 14:35:04 -0800 (PST) Received: from localhost ([::1]:37126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kpFGL-0001N1-8f for importer@patchew.org; Tue, 15 Dec 2020 13:41:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43266) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kpFBw-0005qI-9X for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:38715) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kpFBt-0006wD-J2 for qemu-devel@nongnu.org; Tue, 15 Dec 2020 13:36:55 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-357-FMdg7Kg8NairatJiz6cVJg-1; Tue, 15 Dec 2020 13:36:50 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EED5803F41; Tue, 15 Dec 2020 18:36:34 +0000 (UTC) Received: from thuth.com (ovpn-112-194.ams2.redhat.com [10.36.112.194]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2923760917; Tue, 15 Dec 2020 18:36:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1608057411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=T4CVS5MpSuf5AEUcOlwJMRau5h1FKO/3iViv56nhLIM=; b=K5xtY1h/z/R+PhfCGi3DA0wT4MjmVichq6L0K3RCaogt4wRbF7tkSYp2KfJfhAyNTA17SI oq27ts5WRsCVJe242r3xbmP7PdlukcRapY7ePfcaD6ouj+lf0dw7aDNwUSzm+baPNP7YDI LH2gY/g1ITPgTuKW5nxbOJ1+pF95fiI= X-MC-Unique: FMdg7Kg8NairatJiz6cVJg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH v2 3/3] tests/acceptance: Test the virtio-balloon device on s390x Date: Tue, 15 Dec 2020 19:36:23 +0100 Message-Id: <20201215183623.110128-4-thuth@redhat.com> In-Reply-To: <20201215183623.110128-1-thuth@redhat.com> References: <20201215183623.110128-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable 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=216.205.24.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Inflate the balloon and check whether the size of the memory changes. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo Signed-off-by: Thomas Huth --- tests/acceptance/machine_s390_ccw_virtio.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/machine_s390_ccw_virtio.py b/tests/acceptance= /machine_s390_ccw_virtio.py index e1ad0e29b0..abe25a08f0 100644 --- a/tests/acceptance/machine_s390_ccw_virtio.py +++ b/tests/acceptance/machine_s390_ccw_virtio.py @@ -70,7 +70,8 @@ class S390CCWVirtioMachine(Test): '-device', 'zpci,uid=3D5,target=3Dzzz', '-device', 'virtio-net-pci,id=3Dzzz', '-device', 'zpci,uid=3D0xa,fid=3D12,target=3Dseri= al', - '-device', 'virtio-serial-pci,id=3Dserial') + '-device', 'virtio-serial-pci,id=3Dserial', + '-device', 'virtio-balloon-ccw') self.vm.launch() =20 shell_ready =3D "sh: can't access tty; job control turned off" @@ -140,3 +141,12 @@ class S390CCWVirtioMachine(Test): exec_command_and_wait_for_pattern(self, 'ls /sys/bus/ccw/devices/0.0.471= 1', 'No such file or directory') + # test the virtio-balloon device + exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', + 'MemTotal: 115640 kB') + self.vm.command('human-monitor-command', command_line=3D'balloon 9= 6') + exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', + 'MemTotal: 82872 kB') + self.vm.command('human-monitor-command', command_line=3D'balloon 1= 28') + exec_command_and_wait_for_pattern(self, 'head -n 1 /proc/meminfo', + 'MemTotal: 115640 kB') --=20 2.27.0