From nobody Fri May 17 11:05:39 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=1607710697; cv=none; d=zohomail.com; s=zohoarc; b=gh39YFtztckMO25lxXd52L+tRo9+H2ebjMF4CNpc6oxdT81Fa95WK2Ew1pj75eQsatiqxMrxzrAh/i/zcTHNUjHVlMnhwuVueFdhS02NS+w4/SGHZZCCAZSU7Ca/VxDG22l42gEVFnFswMFLZeqVNeCqIpp46sQKtrUx5R2p1Ws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607710697; 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=jlFufWuEYVtZBETOqZhIpjgb28mKtTVN2Ex9gfe3ryg=; b=j07dpy1ja/Xe8QTxELETz9M6s62q/Rvvd6kqgYCUjuS3U/tt5ypeN19hmAbpGqIRa3oAVKeLLS1MzcFw6laJB1n/bmyz5znTmlkeYv2ug3+VhyKLiIfXcL1ztdPM/F5HnHpavRjFwRkUEoP5CxO5Chu70iu1kRnI8PwLMmdQBpQ= 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 1607710697670955.0133932347635; Fri, 11 Dec 2020 10:18:17 -0800 (PST) Received: from localhost ([::1]:46962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knmzg-0002w3-GD for importer@patchew.org; Fri, 11 Dec 2020 13:18:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knmGt-0000lN-2r for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:31:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:31092) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1knmGo-0002AQ-WD for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:31:58 -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-36-835UYgU_NE6SghIepEwy4A-1; Fri, 11 Dec 2020 12:31:51 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 94A621005D52; Fri, 11 Dec 2020 17:31:50 +0000 (UTC) Received: from thuth.com (ovpn-113-76.ams2.redhat.com [10.36.113.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25C8610013C0; Fri, 11 Dec 2020 17:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607707913; 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=jlFufWuEYVtZBETOqZhIpjgb28mKtTVN2Ex9gfe3ryg=; b=LjRfdQfoaEwjR0rZ8mDmjbRfIpoZfVKGKi4rNj1wKUfGut0l2XXrUJcnuOvz7catJqhaCx xFKzM6N8L3MpHKNl3b/sAvS/8KaSZho7k0/lPMvAwakRbME7sbANmgKkzcxRtnMgdGwwpI UnhAc8KlCI2tTnptwOjHBA0pDiOXGSw= X-MC-Unique: 835UYgU_NE6SghIepEwy4A-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH 1/3] tests/acceptance: Extract the code to clear dmesg and wait for CRW reports Date: Fri, 11 Dec 2020 18:31:32 +0100 Message-Id: <20201211173134.376078-2-thuth@redhat.com> In-Reply-To: <20201211173134.376078-1-thuth@redhat.com> References: <20201211173134.376078-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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=63.128.21.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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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. Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo --- 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..733a7ca24a 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_guests_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_guests_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_guests_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 11:05:39 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=1607712805; cv=none; d=zohomail.com; s=zohoarc; b=DZdt8DHDgioRJmPpfcK/N68s7JqFUoosMVr/FlGiGhO/C1eNbJTEEXl20POWWvlKUt64gTJJtlc0nj32PZekP5tBW5dquQmQwWzrbyrh/+RfUhvhQe7tG8KNAYuLy7QbR8qbLRcF1zMgt4rYWLBPjD209OuVJhthYNpYW4UxaXs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607712805; 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=ExZEnqnLtRfidHz6vp7Fxwa1y6p9HS9qzKLtPhybcgk=; b=oFTw85misdZxmz7M9KvwFRczXrUaLbeuhGCp5se8MjhuxriwVPpNJHZLMWTJEeMMxp7JOKXT852z4N5plKk+j3c6gred5hAdSvjW8IbSjEf+Kl9seQKZ9OSJusCP1hW9R4/GaOtuUvJtLEWSJk7QQtKcVyK5bbKypYNgmYFtgtY= 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 1607712805791686.1423138073527; Fri, 11 Dec 2020 10:53:25 -0800 (PST) Received: from localhost ([::1]:34148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knmvQ-0005yC-SW for importer@patchew.org; Fri, 11 Dec 2020 13:13:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56334) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knmGu-0000ou-IR for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:32:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1knmGs-0002CC-Lo for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:32:00 -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-315-KG4rp5wiPbisKXfdfCM1Ow-1; Fri, 11 Dec 2020 12:31:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B6FB107ACE3; Fri, 11 Dec 2020 17:31:55 +0000 (UTC) Received: from thuth.com (ovpn-113-76.ams2.redhat.com [10.36.113.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id C753E100238C; Fri, 11 Dec 2020 17:31:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607707918; 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=ExZEnqnLtRfidHz6vp7Fxwa1y6p9HS9qzKLtPhybcgk=; b=KikzvhT3CYRBpN3eF1v3Q8pc6c+Z/DK+kq+g++mii7WdUqFWYx6wcplCsbnsUCz4koMS+7 OD7RnyhBJKr8qbUvjx/O+KJFxFgPOi5IIkF3ETKvkHl1cYMjxfOWkCcMIlpS9R+SmOszx7 rVeurMzFz1DovlLvEAWyrKONQdRuPMc= X-MC-Unique: KG4rp5wiPbisKXfdfCM1Ow-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH 2/3] tests/acceptance/machine_s390_ccw_virtio: Test virtio-rng via /dev/hwrng Date: Fri, 11 Dec 2020 18:31:33 +0100 Message-Id: <20201211173134.376078-3-thuth@redhat.com> In-Reply-To: <20201211173134.376078-1-thuth@redhat.com> References: <20201211173134.376078-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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. Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo --- 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 733a7ca24a..7d0a78139b 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/tmp/out.dat bs=3D1k coun= t=3D10', + '10+0 records out') + self.clear_guests_dmesg() + self.vm.command('device_del', id=3D'rn1') + self.wait_for_crw_reports() + self.clear_guests_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/tmp/out.dat bs=3D1k coun= t=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 11:05:39 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=1607710578; cv=none; d=zohomail.com; s=zohoarc; b=h9QXvDj2pChCMBiPP6DwLAQmvxwP0p34B/WiM4KACiN4nx1UagLQG6+jIWdKps9ex0+s1Zrmbl80iqR4z40jNEXUbcnWQeIiGW6uKmPC7tr9dROH4lViYiAWE5CGrb7ngOGghc+hNmkNgTga5zz9SDCgcDk2/1yEAXI+1sL/Pm0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607710578; 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=cyLrsia+oS/cwPtJ6eBY9EomaVIVvbq6TnZJmQSdBbY=; b=T7kJu6aGiZCmIxm7aoVQ+Ae9GxhzRLGfDIcm2ohCPzHZSfOfKU7EDYfcgliiG+661nFAUffu6D8DKktDJNQWnGq43mLRYyca2WtkcHyzegZ5/gBzaGnecEpQFC0/hhARHS/nQOWD803YBnOprcYdnT58Lp4ga8H+z5kOtBm6Img= 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 1607710578371825.8239250199398; Fri, 11 Dec 2020 10:16:18 -0800 (PST) Received: from localhost ([::1]:41002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1knmxk-0000S9-W6 for importer@patchew.org; Fri, 11 Dec 2020 13:16:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56464) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1knmHG-00019m-77 for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:32:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:34556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1knmHD-0002HX-4e for qemu-devel@nongnu.org; Fri, 11 Dec 2020 12:32:22 -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-63-pCI6GmNVMtKXFXfKYXtvRg-1; Fri, 11 Dec 2020 12:32:13 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CFC8780F043; Fri, 11 Dec 2020 17:32:12 +0000 (UTC) Received: from thuth.com (ovpn-113-76.ams2.redhat.com [10.36.113.76]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10331100AE2C; Fri, 11 Dec 2020 17:31:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1607707938; 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=cyLrsia+oS/cwPtJ6eBY9EomaVIVvbq6TnZJmQSdBbY=; b=Zq0bZJ7F+A47++S0jWA2lPxnmjwjS8+JDsBleIeMXv0j58lsoigyUqEXn7viJLviVrhKZf 33SaMe0aVZZpMr3/vVA93RXjjaH7gYc4mlZWm4QdeKb1KkHKkVx6McTCe4CZPgAYxjq76k Xs84FaZ9vPEGYT6urXjcVo6Pe6WCZek= X-MC-Unique: pCI6GmNVMtKXFXfKYXtvRg-1 From: Thomas Huth To: qemu-devel@nongnu.org, Cornelia Huck Subject: [PATCH 3/3] tests/acceptance/machine_s390_ccw_virtio: Test the virtio-balloon device Date: Fri, 11 Dec 2020 18:31:34 +0100 Message-Id: <20201211173134.376078-4-thuth@redhat.com> In-Reply-To: <20201211173134.376078-1-thuth@redhat.com> References: <20201211173134.376078-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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=unavailable 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. Signed-off-by: Thomas Huth Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Willian Rampazzo Tested-by: Willian Rampazzo --- 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 7d0a78139b..81f6c066c7 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