From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gUrTB-00057w-VE for qemu-devel@nongnu.org; Thu, 06 Dec 2018 06:05:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gUrT8-0000l1-DO for qemu-devel@nongnu.org; Thu, 06 Dec 2018 06:05:25 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58484 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gUrT8-0000kT-5g for qemu-devel@nongnu.org; Thu, 06 Dec 2018 06:05:22 -0500 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wB6B4ENG071424 for ; Thu, 6 Dec 2018 06:05:21 -0500 Received: from e06smtp07.uk.ibm.com (e06smtp07.uk.ibm.com [195.75.94.103]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p7279h526-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 06 Dec 2018 06:05:20 -0500 Received: from localhost by e06smtp07.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Dec 2018 11:05:18 -0000 References: <20181203165810.14509-1-kwolf@redhat.com> <20181203165810.14509-3-kwolf@redhat.com> <75f7e3cc-bd46-c743-84ab-cd68bcb1dcfb@de.ibm.com> <20181205084614.GA4018@dhcp-200-186.str.redhat.com> <30858ce0-5b4b-c3c4-b846-6a214670f8d2@de.ibm.com> <34e1b572-41b0-ae72-6d12-283516c9218c@de.ibm.com> <7d5d502b-9bba-47ed-648e-65495765c4ca@virtuozzo.com> <61995d89-db9d-ac34-0b32-aacffd49b184@virtuozzo.com> From: Christian Borntraeger Date: Thu, 6 Dec 2018 12:05:13 +0100 MIME-Version: 1.0 In-Reply-To: <61995d89-db9d-ac34-0b32-aacffd49b184@virtuozzo.com> Content-Language: en-US Message-Id: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [qemu-s390x] [PULL 2/2] iotests: simple mirror test with kvm on 1G image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , Kevin Wolf Cc: "peter.maydell@linaro.org" , qemu-s390x , qemu-devel , "qemu-block@nongnu.org" , Max Reitz , Eric Blake On 05.12.2018 17:09, Vladimir Sementsov-Ogievskiy wrote: > 05.12.2018 18:52, Christian Borntraeger wrote: >> >> >> On 05.12.2018 14:39, Vladimir Sementsov-Ogievskiy wrote: >>> 05.12.2018 15:35, Christian Borntraeger wrote: >>>> >>>> >>>> On 05.12.2018 13:00, Vladimir Sementsov-Ogievskiy wrote: >>>>> 05.12.2018 12:01, Christian Borntraeger wrote: >>>>>> >>>>>> >>>>>> On 05.12.2018 09:46, Kevin Wolf wrote: >>>>>>> Am 05.12.2018 um 09:23 hat Christian Borntraeger geschrieben: >>>>>>>>>>> +# prepare source image >>>>>>>>>>> +qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk, >>>>>>>>>>> + str(size)) >>>>>>>>>>> + >>>>>>>>>>> +vm = QEMUMachine(iotests.qemu_prog) >>>>>>>>>>> +vm.add_args('-machine', 'pc,accel=kvm') >>>>>>>> >>>>>>>> This (pc) clearly does not work on other architectures. >>>>>>>> In addition to that, I also need to add -no-shutdown on s390 (see 068 for a similar case) >>>>>>> >>>>>>> Leaving out pc definitely makes sense, and the bug still reproduces for >>>>>>> me without it. >>>>>>> >>>>>>> I don't understand the -no-shutdown, though. Already for 068, neither >>>>>>> the code nor the commit message when it was added explain why this is >>>>>>> needed. >>>>>>> >>>>>>> Can you turn this into a proper patch and add a comment why -no-shutdown >>>>>>> is needed? >>>>>> >>>>>> I already sent this patch. The reason is that there is no BIOS in a classical sense >>>>>> on s390x. If no bootable image (external kernel or from disk) is found, the small boot >>>>>> bios loads a disabled wait PSW. The default action for that is then shutdown. >>>>>> >>>>> >>>>> Is it an option for you just drop the whole line "vm.add_args('-machine', 'pc,accel=kvm')"? >>>>> The problem without it for me was that gdb failed to produce full and nice backtrace, but >>>>> test worked anyway >>>> >>>> In the commid message Vladimir said that kvm is necessary to trigger the problem. >>>> >>> >>> No, I didn't) >>> >>> and it's in the comment: >>> # 3. drop kvm and use iotests.VM() (maybe, because of qtest) (however, it still >>> # reproduces, if just drop kvm, but gdb failed to produce full backtraces >>> # for me) >> >> Ok, so I would be fine with completely dropping that line. >> >> the patch would then be >> >> >> >> "-machine pc" will not work all architectures. Lets fall back to the >> default machine by not specifying anything for the machine. >> >> In addition we also need to specify -no-shutdown on s390 as qemu will >> exit on guest shutdown. This happens when there is no kernel or bootable >> disk on s390. >> >> Signed-off-by: Christian Borntraeger >> --- >> tests/qemu-iotests/235 | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235 >> index da044ed34e..329da8f0c2 100755 >> --- a/tests/qemu-iotests/235 >> +++ b/tests/qemu-iotests/235 >> @@ -49,7 +49,8 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk, >> str(size)) >> >> vm = QEMUMachine(iotests.qemu_prog) >> -vm.add_args('-machine', 'pc,accel=kvm') >> +if iotests.qemu_default_machine == 's390-ccw-virtio': >> + vm.add_args('-no-shutdown') >> vm.add_args('-drive', 'id=src,file=' + disk) >> vm.launch() >> >> >> >> Shall I resend a v2? >> > > so, we need -no-shutdown even if we drop kvm? I hoped that not.. Hmm. grep points only to one iotest doing the same about no-shutdown - 068.. Kevin, shall I send the above patch as v2?