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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C5B25C433F5 for ; Tue, 1 Feb 2022 09:27:58 +0000 (UTC) Received: from localhost ([::1]:34058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nEpS9-0002x1-Hn for qemu-devel@archiver.kernel.org; Tue, 01 Feb 2022 04:27:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEp7b-0001pP-Rb for qemu-devel@nongnu.org; Tue, 01 Feb 2022 04:06:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47640) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nEp7Z-0001Ya-2O for qemu-devel@nongnu.org; Tue, 01 Feb 2022 04:06:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643706399; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=ofVww+5k+nS3XHXqDMFykO9WPKdaV+IvSSWXJkdBCeg=; b=bl43jJU6LZoPLVhBUq8sI2JgJoeatgcN8Hm4zx1re9zckXWnIhcm31mhqU/o7BzzHwtUBG vzumY9HACCvwVt7fpbpbEndM7vfp6fVQRl5xyap7P+hkROUWG7+OvqMzP/Faeb0ImEv+s/ 9PcN2rAdcwUxsGW/vz+AKn/OEIhHGyQ= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-572-FD6ZruvvPjq3E1k-T0ES_A-1; Tue, 01 Feb 2022 04:06:32 -0500 X-MC-Unique: FD6ZruvvPjq3E1k-T0ES_A-1 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 3BB691091DB2; Tue, 1 Feb 2022 09:06:31 +0000 (UTC) Received: from redhat.com (unknown [10.39.195.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 992695E4B6; Tue, 1 Feb 2022 09:06:28 +0000 (UTC) Date: Tue, 1 Feb 2022 09:06:25 +0000 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= To: Stefano Brivio Subject: Re: "make check-acceptance" takes way too long Message-ID: References: <6c90ca3d-eaec-d7e8-5941-4deb83b58fd0@redhat.com> <87zgnp4b32.fsf@dusky.pond.sub.org> <875yqd6zib.fsf@linaro.org> <20220125092011.dq2t4ryl632vrvsf@sirius.home.kraxel.org> <20220201073139.7896e10b@elisabeth> MIME-Version: 1.0 In-Reply-To: <20220201073139.7896e10b@elisabeth> User-Agent: Mutt/2.1.5 (2021-12-30) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=berrange@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.081, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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: , Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Markus Armbruster , Wainer dos Santos Moschetta , QEMU Developers , Gerd Hoffmann , Cleber Rosa , Alex =?utf-8?Q?Benn=C3=A9e?= , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Tue, Feb 01, 2022 at 07:31:39AM +0100, Stefano Brivio wrote: > Hi, > > On Tue, 25 Jan 2022 10:20:11 +0100 > Gerd Hoffmann wrote: > > > Hi, > > > > > IMHO the ideal scenario would be for us to have a kernel, initrd > > > containing just busybox tools for the key arch targets we care > > > about. Those could be used with direct kernel boot or stuffed > > > into a disk iamge. Either way, they would boot in ~1 second, > > > even with TCG, and would be able to execute simple shell scripts > > > to test a decent amount of QEMU functionality. > > > > I have some test images based on buildroot which are essentially that. > > https://gitlab.com/kraxel/br-kraxel/ > > > > Still a significant download, but much smaller than a full fedora or > > ubuntu cloud image and it boots much faster too. Not down to only one > > second though. > > I'm not sure you can recycle something from it, but my (ugly) approach > to make this fast (for a different purpose -- I'm using qemu to run > tests in guests, not testing qemu) is to build an initramfs by copying > the host binaries I need (a shell, ip, jq) and recursively sourcing > libraries using ldd (I guess I mentioned it's ugly). > > No downloads, systemd, dracut, etc., guest boots in half a second > (x86_64 on x86_64, KVM -- no idea with TCG). Host kernel with a few > modules packed and loaded by a custom init script. That is such a good idea, that it is exactly what I do too :-) https://gitlab.com/berrange/tiny-vm-tools/-/blob/master/make-tiny-image.py it works incredibly well for the simple case of host-arch==guest-arch. It could be made to work for foreign arch easily enough - just need to have a foreign chroot lieing around somewhere you can point it to. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|