From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4AB82C433DB for ; Tue, 9 Feb 2021 12:04:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B06464E16 for ; Tue, 9 Feb 2021 12:04:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B06464E16 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9RlH-0005ZO-7l for qemu-devel@archiver.kernel.org; Tue, 09 Feb 2021 07:04:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9RkC-0005AH-2X for qemu-devel@nongnu.org; Tue, 09 Feb 2021 07:03:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l9Rk8-0001Df-T8 for qemu-devel@nongnu.org; Tue, 09 Feb 2021 07:03:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612872223; 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=E9XFYU0Coai33xg41OEHsabC79W5unfp59IZUMACZrA=; b=E2+60IXTTqrLLuwwFey29Ga29R2bHjyWHU2wE69zF5lrKDmBplcwDwYvg/k6YQf7Mq6j5z DMG0qhqNBHh+TMPWROFHXQ66TbVPLI4SsODvwPGhdwmsl1rly+93jFUplNR4Z16eTNzmBU ep/h0nB6PjbqepjyjTzQV37z6ueGAxk= 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-276-8IqpA1ayNRaQbffFl5mszg-1; Tue, 09 Feb 2021 07:03:41 -0500 X-MC-Unique: 8IqpA1ayNRaQbffFl5mszg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 25EB28030B7; Tue, 9 Feb 2021 12:03:40 +0000 (UTC) Received: from dresden.str.redhat.com (ovpn-113-208.ams2.redhat.com [10.36.113.208]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 263DB19C59; Tue, 9 Feb 2021 12:03:29 +0000 (UTC) Subject: Re: [PATCH 07/22] tests/acceptance/virtiofs_submounts.py: evaluate string not length To: =?UTF-8?Q?Alex_Benn=c3=a9e?= References: <20210203172357.1422425-1-crosa@redhat.com> <20210203172357.1422425-8-crosa@redhat.com> <8735ycq80u.fsf@linaro.org> <2c1a58b2-e023-4aca-16c7-c850f6069657@redhat.com> <87k0rha2mu.fsf@linaro.org> From: Max Reitz Message-ID: <2bacef90-7533-d439-cf7d-8fba51e64c1a@redhat.com> Date: Tue, 9 Feb 2021 13:03:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <87k0rha2mu.fsf@linaro.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mreitz@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=63.128.21.124; envelope-from=mreitz@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -35 X-Spam_score: -3.6 X-Spam_bar: --- X-Spam_report: (-3.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.57, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.265, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=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: Fam Zheng , Aleksandar Rikalo , Beraldo Leal , Wainer dos Santos Moschetta , John Snow , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , qemu-devel@nongnu.org, Eric Auger , Willian Rampazzo , Cleber Rosa , Thomas Huth , =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Aurelien Jarno , Eduardo Habkost Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 09.02.21 12:24, Alex Bennée wrote: > > Max Reitz writes: > >> On 04.02.21 14:23, Alex Bennée wrote: >>> >>> Cleber Rosa writes: >>> >>>> If the vmlinuz variable is set to anything that evaluates to True, >>>> then the respective arguments should be set. If the variable contains >>>> an empty string, than it will evaluate to False, and the extra >>>> arguments will not be set. >>>> >>>> This keeps the same logic, but improves readability a bit. >>>> >>>> Signed-off-by: Cleber Rosa >>>> --- >>>> tests/acceptance/virtiofs_submounts.py | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py >>>> index f1b49f03bb..f25a386a19 100644 >>>> --- a/tests/acceptance/virtiofs_submounts.py >>>> +++ b/tests/acceptance/virtiofs_submounts.py >>>> @@ -241,7 +241,7 @@ class VirtiofsSubmountsTest(BootLinux): >>>> >>>> super(VirtiofsSubmountsTest, self).setUp(pubkey) >>>> >>>> - if len(vmlinuz) > 0: >>>> + if vmlinuz: >>>> self.vm.add_args('-kernel', vmlinuz, >>>> '-append', 'console=ttyS0 root=/dev/sda1') >>> >>> And this is were I gave up because I can't see how to run the test: >>> >>> ./tests/venv/bin/avocado run ./tests/acceptance/virtiofs_submounts.py >>> JOB ID : b3d9bfcfcd603189a471bec7d770fca3b50a81ee >>> JOB LOG : /home/alex/avocado/job-results/job-2021-02-04T13.21-b3d9bfc/job.log >>> (1/5) ./tests/acceptance/virtiofs_submounts.py:VirtiofsSubmountsTest.test_pre_virtiofsd_set_up: CANCEL: vmlinuz parameter not set; you must point it to a Linux kernel binary to test (to run this test with the on-image kernel, set it to an empty string) (0.00 s) >>> (2/5) ./tests/acceptance/virtiofs_submounts.py:VirtiofsSubmountsTest.test_pre_launch_set_up: CANCEL: vmlinuz parameter not set; you must point it to a Linux kernel binary to test (to run this test with the on-image kernel, set it to an empty string) (0.00 s) >>> (3/5) ./tests/acceptance/virtiofs_submounts.py:VirtiofsSubmountsTest.test_post_launch_set_up: CANCEL: vmlinuz parameter not set; you must point it to a Linux kernel binary >>> to test (to run this test with the on-image kernel, set it to an empty string) (0.00 s) >>> (4/5) ./tests/acceptance/virtiofs_submounts.py:VirtiofsSubmountsTest.test_post_mount_set_up: CANCEL: vmlinuz parameter not set; you must point it to a Linux kernel binary to test (to run this test with the on-image kernel, set it to an empty string) (0.00 s) >>> (5/5) ./tests/acceptance/virtiofs_submounts.py:VirtiofsSubmountsTest.test_two_runs: CANCEL: vmlinuz parameter not set; you must point it to a Linux kernel binary to test (to run this test with the on-image kernel, set it to an empty string) (0.00 s) >>> RESULTS : PASS 0 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 5 >>> JOB TIME : 0.56 s >>> >>> Given the test seems to make assumptions about an environment being >>> setup for it I think we need some documentation somewhere about what >>> those pre-requisites are. >> >> I find the cancel message pretty clear, but then again it was me who >> wrote it... >> >> Either you point the vmlinuz parameter to some Linux kernel you built >> yourself, or you set it to the empty string to just use the kernel >> that’s part of the image. Setting Avocado parameters is done via -p, >> i.e. “-p key=value”. So in this case >> “-p vmlinuz=/path/to/linux/build/arch/x86/boot/bzImage”, or >> “-p vmlinuz=''”. >> >> Ideally, vmlinuz='' would be the default, but there’s a problem with >> that: I submitted this test along with the patches that added the >> required feature to the Linux kernel, so at that point that feature was >> not part of Linux. That’s why you generally have to point it to a Linux >> kernel binary you built yourself that has this feature (5.10 does). > > This is where it deviates from the rest of the check-acceptance tests. > Generally I don't have to worry about finding the right image myself. Yes, but there’s nothing I can do apart from just not having the test as part of qemu, which I don’t find better than to just cancel it when not run with the necessary parameters. Or, well, I could let the test download and compile the Linux sources, but I don’t think that’s a viable alternative. > At the least it would be worth pointing to a part of our docs on how > to build such an image. Well, I could perhaps come up with a comprehensive kernel configuration that works, but I really don’t think that’s valuable for people who just want to run the acceptance tests and don’t care about this test in particular. I just don’t think they’re actually going to build a Linux kernel just for it. (Alternatively, I could just build a Linux kernel here on my machine, upload the binary and point to it somewhere, e.g. in the cancel message. That would be OK for me, and perhaps something I could imagine someone might actually use.) I’d rather just wait until the test image contains a kernel that’s sufficiently new (should be the case once Fedora 34 is out), so we can make -p vmlinuz='' the default. Until then I personally find it completely reasonable to have this test just be cancelled. Max