From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgAAB-0001LH-D9 for qemu-devel@nongnu.org; Mon, 20 Oct 2014 06:26:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgAA7-0000z5-0U for qemu-devel@nongnu.org; Mon, 20 Oct 2014 06:26:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgAA6-0000yv-O3 for qemu-devel@nongnu.org; Mon, 20 Oct 2014 06:26:02 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9KAQ2qX007460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 20 Oct 2014 06:26:02 -0400 Date: Mon, 20 Oct 2014 11:25:59 +0100 From: Stefan Hajnoczi Message-ID: <20141020102559.GA29278@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline Subject: [Qemu-devel] Patch checking bot List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , John Snow Cc: qemu-devel@nongnu.org --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, At KVM Forum 2014 we discussed a patch checking bot that automates patch format checking and smoke testing: 1. Did the patch submitter include Signed-off-by? 2. Does checkpatch.pl pass? 3. Does the patch apply to qemu.git/master? 4. Does each patch compile? 5. Does the series pass make check and qemu-iotests? Here are some thoughts on the patch checker: If a patch series passes successfully, no email is sent. If a patch series fails, an email with the errors is sent as a reply to the patch series email thread. The patch submitter can then respond in case there are false positive (e.g. from checkpatch.pl) - the bot doesn't care about replies but it tells the human reviewers and maintainers what the patch submitter intends to do. The bot should detect new patches within 15 minutes so humans can rely on it to perform these basic checks before they review the patch series. There should be a web page showing the check status of each patch series on the mailing list. This allows anyone to see which patch series have passed, failed, or are pending check. Ideas on the implementation: The "patches" tool allows querying patch series on the mailing list. It can be used to apply patches to a git tree and display patches in mbox format: https://github.com/stefanha/patches/tree/stefanha-tweaks Patch series contain untrusted code so it is critical that operations are performed inside a sandbox. Otherwise people could send email to qemu-devel@nongnu.org with Makefile or checkpatch.pl changes that get executed with the bot's privileges! Use docker or lxc to run a container for builds. The root file system should be fresh for each build so previous builds cannot affect later ones. The container cannot have external networking connectivity (for security). Include automated deployment scripts so bot instances can be created easily. Here is an example of automated deployment scripts written with Fabric that I use for VM that builds the QEMU "patches" database: https://github.com/stefanha/qemu-patches --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUROM3AAoJEJykq7OBq3PImdoH/06GrTiJtHULToY3wWd/G2b3 tUz6bf3sOgc3Uv7KxlPLB8EVmIPBRqwa+bGObOYDrWyUton605IYYQFGJS317H2Z avqy5yIXp+lTzHN2lIW7kICfA/hyE+A54mBKVZob6w6/IAtdpYdAT0y7YGJvG3zS QRe9Csp+sVqmEXmlE4msGBXA4BlBS2dCw+qwtgL9aQS7vGByInMW7amEndVKHFtZ n7RTPh68TB7DLR5Ss3v+ByTC24V5yaWQ3KG6YPi/NMmJKRiHAm22SOkxjOFaZ3pP U+r3TWw91voUmrt+2ic5Hh4ITZcZdpqSZgaDCha+bECDhhsGs4WuX+ZfNJNYV7E= =SWDG -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--