From patchwork Thu May 30 10:15:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165409 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp764797ili; Thu, 30 May 2019 03:16:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAULlfNC71ICdEyozBaSJSQVYvRJApYstE6s2ROm7q6/sLrFXKPG6M6yy6I9rfuKfUyc+f X-Received: by 2002:a05:620a:14a1:: with SMTP id x1mr2397429qkj.164.1559211407184; Thu, 30 May 2019 03:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211407; cv=none; d=google.com; s=arc-20160816; b=TaGCxsW7B0GZ6vz/p7t8neerwidz6GlOv9x6nSndZTxIj3UxwNE4fqBRemLMVLEf0t hDKPzvB5yWPAkQDSuTunacSOxdYLKzXjny0bqYurvOAHNpDEMwU6i7/JfRsSLk/6w3N6 mt8SVFPnoG9jIpgpz6/bjywmywushZPy8Z3LTDKijPb0ZBYm9lymbAO5daCFq0/ashVK ohrzStPI2UnNYeU/jPZu4rC1YcAskVwAivIYubWbwdvNRYZJcYdesi7Fz6QVyfSQhg7i maegeUo/BmjScrRMNxe0VjyfhLuNE80tWOfDxt6R4AtPuUAsH+JyHCTSmBSbVOIfIycT IUYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=jLczjKqy5I61WYJJtUxpOpS4jWdp7XC8w4aaEJBgg5s=; b=N5xZxUlGvo7I9KQvhK9I+y/i/SmO0E7UvxeE4Um5oHuDLwtDcYVgSM+mACU+md/BYb MBM2W4GlgRme/WzSAcid0+g2cGbTlh3MeCcnKa5Q/WKCItCuoVkB3+j+UosyXwUGxhRt qirs9adjZqi3zfqi5RwnPYbzci0SYXCWOuhxj99xjXdUR59h1HTSAdCYDQcY0ytUFkpc agznr3ZjkLnLx9xJGlJivzPKnJhq1v/LL6d45NfICrDER1wodZr14kzGDOH9Yfb1M7+g nszsH06hCfo1nLfKKLamhsTV5SG0bjJc7EfvEXYC4XKZAE+BHcQrlOtGCF5Z3HULZXdO ixWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LoiCikYZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 14si1370072qtv.353.2019.05.30.03.16.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=LoiCikYZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI74-0002aK-L9 for patch@linaro.org; Thu, 30 May 2019 06:16:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54226) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6S-0002W0-Jn for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6R-0006RC-SQ for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:08 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:45068) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6R-0006QH-M8 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:07 -0400 Received: by mail-wr1-x436.google.com with SMTP id b18so3779619wrq.12 for ; Thu, 30 May 2019 03:16:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jLczjKqy5I61WYJJtUxpOpS4jWdp7XC8w4aaEJBgg5s=; b=LoiCikYZy/xPUoBQXG0IZN1Ku+TWb6jvMovUQCSE8D3TqFc4PRUbExeruxaBRPyXbF OeHb5reDz8sqEDEe6dBzgDy6p/TG+2yi9JgXPM18khAwG4OY3VLHXSnlfwI8gT+QDK83 lriewhXh9638Lqxz51P6r+XJH2KRDcLUzZ60XNLCUwlh+TER0j25IKp8tAq/174Rd4GC yi0dmq+HqoH7WrpH/ZIYDF5hhl1PlhxJn6Qb5+3I8M5Wm3GT15SpblgR9dGtBzn7wmHE vFJibnyH1G1l78ZprB7MqQyS4ZQ1/ljTsM1zxGlXZhoMqp0IPxFY0s5+AizWPLq8WakG CrVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jLczjKqy5I61WYJJtUxpOpS4jWdp7XC8w4aaEJBgg5s=; b=KJ9sY7hs04WbL39+3eVLV4HzXR4c8Ej2kOfNhj5BHtS2BVZr1f4RJaC+7vYRB3+xvQ aDGbPb+N9kb4Hdcvqq6RWC9VFnjglTzjO7BwdlbOMjFABBixKWhu+Ez31CfmZ/dSqNIs S8pEWnatYced2iAEX9jAIdual1jlBdexQ4SpznLmDSH+Zr+HpdiWQlxyCPAeNG+o+64R MJJeTKyDjmmwiiSXuwSK6KG4OjVrOpYdTcamt8Hf6tiUToXkBby1goy8dnZ3dFMRgHLk osduN8UChnlYkpMkZOOPlN8XXAouPqJIZBJkcIWVV83BlKWtStQQjYjx1AHS/RKttvBB YmPw== X-Gm-Message-State: APjAAAXI9wVAG/ynF+dPWMyFUWnV1Rex570k8gC8X0wG2mc/RiAIxL38 S2xe4KICie/mJqDulONROEOLgA== X-Received: by 2002:adf:ea4c:: with SMTP id j12mr2116981wrn.230.1559211366399; Thu, 30 May 2019 03:16:06 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o1sm74569wre.76.2019.05.30.03.16.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:04 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1CE381FF8C; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:38 +0100 Message-Id: <20190530101603.22254-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::436 Subject: [Qemu-devel] [PATCH v1 01/26] editorconfig: add setting for shell scripts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/.editorconfig b/.editorconfig index df6db65531d..a001f340bd8 100644 --- a/.editorconfig +++ b/.editorconfig @@ -26,6 +26,10 @@ file_type_emacs = makefile indent_style = space indent_size = 4 +[*.sh] +indent_style = space +indent_size = 4 + [*.{s,S}] indent_style = tab indent_size = 8 From patchwork Thu May 30 10:15:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165410 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp764806ili; Thu, 30 May 2019 03:16:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRQe1wHdLlVaeZO3NpThohkqGDy2YfTO+f8gsAV5Zii82dIY3wl7Bawc9jNWlAV1JinPaS X-Received: by 2002:a0c:9802:: with SMTP id c2mr2509076qvd.96.1559211407882; Thu, 30 May 2019 03:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211407; cv=none; d=google.com; s=arc-20160816; b=h6ME/ttExZfVfO5nQjAJ7UxHBI3UdGRF0+s205N+kWAsx1hMenq6SPAZNfRYlS11+T 72GAcb8E2G1qpGlQoX5fddgP6BwoCO2GjoGxM4poMfb3GkDkJNjEzQonpotUNCOrmBup UfxPTVKPjnexPplwFEPaZGUZ9RHLbof5/jn2M+WOmh2cGqp7+0BPxk/Ea3oy8cKhqnSX GFG5Q7ju/x9X9899sGBvWhFUCDpo35XUQ/JFKpJCznL3a7cfBYlI2yIrtA3lMYxWVkWg gQSe0akKcQOWdwBYDvXDGH6kigcDgMOr+lIw/fXdeZbSdnxzzPVpKJfFx5TWAcVNg0/T KdXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=BFjisebq0hiOO8nTLU3fa+Dkmd/UUHwPkWgZnwgthE0=; b=M2BEM4whqahYEBjViCva7bRu+AW/GzxKYLjJRPs56Jp6oPyO8HeLAkPR/QLntcY3be baYn4UwoG4wIkKaHeCaTWvy0WtFS+mDrzZ+irFtcqjud+3iVWy3Si+oDZ3fDHxVVVHmW t4H+YNLxn6NDpZU7bxyh5isjUPoq4aqdxgjQ6Lagowzp8X9LjqeWLiEkUpFz6fioMPTP Gi/JiNrcjSwBlMUo3hlZ05VZPUvN1S/i4+vSq8fkfPz7sFrNBW/X6bLQIZQumKELfvK8 nhOyG8HoHKo4tYVFbuuK+OCi+rcV9mGlquYyeRNq8bYrvm9hjMbkZnbgLKIyKkwFuxel NFGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oWYG3OsZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c14si1305813qvd.189.2019.05.30.03.16.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:16:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oWYG3OsZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50543 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI75-0002aq-9y for patch@linaro.org; Thu, 30 May 2019 06:16:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6U-0002ZH-7F for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6S-0006Rx-Ml for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:10 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:54260) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6S-0006R7-FR for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:08 -0400 Received: by mail-wm1-x342.google.com with SMTP id d17so3593610wmb.3 for ; Thu, 30 May 2019 03:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BFjisebq0hiOO8nTLU3fa+Dkmd/UUHwPkWgZnwgthE0=; b=oWYG3OsZHSvMDtOSOcqGd358S7FY6Qy7aFfdfAXFGpkWzeTJyPHN5EcqeLWu/2995E eYL9nAaDcAfdl3Zp50yUa4ArvHxS8zek5XoB6fS7RyeXmByX8HBwBGbWhVyttf5+ks99 jueFlGH8XasYjgJN3WSMP5oWG0IxHzBGZWgHFXTjbjGzOnjiWkTqfGKDPZMj8A5kBNz0 k/RwgaL8UiU77pkiM7lW3TDHYVq9s50x22sn+DGwV2GUEZgBFOlDm93nIWrp8Sj919Ou N+gTklJvg7OTyiqni61wauYxGklPccK1AU9Q2xYbgGa8FY8ourmuZv9l4NnUQU7W/GPt Bbrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BFjisebq0hiOO8nTLU3fa+Dkmd/UUHwPkWgZnwgthE0=; b=BT1KFrD5qkHPhInFCF+Y6bsJBpTN0/gTlhByyRIE3h2Cd80IBNNE+GQ5C6TPnD5Ckp Kgt3sqY5swSr/8sPXOqACZkn5J0l2rtWTR2IBGzIc8BDvnOXUFWFzQvO4S8KONwHofiz WzqW/BT67zgE5Y2b2dfaiq8+tWM2FNgxNZ1nFskSe4PVFaa+VYe0xl9zBPu9ogoWXMpl yNv6tD8tUdCzbvn++v4XP/gLIWN7XZQgyw3qm1/PJb9IS+SsuT/5BrhQ1AxeYlVtzp87 yJY0Gjvt4ePXMgV3mvRhQy7cCau1BxxfLGdLNV776urOsgYm5tasQQF4dnmZSEt0Virp 0ZXg== X-Gm-Message-State: APjAAAUAV869yoWjBa6LCc5V0TMliL+pVhgXNrP3R0EQSeQafuzaOC5r wVy464BRpKuMdJn6zQM0akw0rQ== X-Received: by 2002:a1c:407:: with SMTP id 7mr1852691wme.113.1559211367301; Thu, 30 May 2019 03:16:07 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h12sm1917464wre.14.2019.05.30.03.16.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:04 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 31D7F1FF8F; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:39 +0100 Message-Id: <20190530101603.22254-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v1 02/26] qemu-io-cmds: use clock_gettime for benchmarking X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?utf-8?q?Alex_Benn=C3=A9e?= , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The previous use of gettimeofday() ran into undefined behaviour when we ended up doing a div 0 for a very short operation. This is because gettimeofday only works at the microsecond level as well as being prone to discontinuous jumps in system time. Using clock_gettime with CLOCK_MONOTONIC gives greater precision and alleviates some of the potential problems with time jumping around. We could use CLOCK_MONOTONIC_RAW to avoid being tripped up by NTP and adjtime but that is Linux specific so I decided it would do for now. Signed-off-by: Alex Bennée --- qemu-io-cmds.c | 69 +++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 34 deletions(-) -- 2.20.1 diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 30a7d9a13bf..f6701e3b8a8 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -248,20 +248,21 @@ static void cvtstr(double value, char *str, size_t size) -static struct timeval tsub(struct timeval t1, struct timeval t2) +static struct timespec tsub(struct timespec t1, struct timespec t2) { - t1.tv_usec -= t2.tv_usec; - if (t1.tv_usec < 0) { - t1.tv_usec += 1000000; + t1.tv_nsec -= t2.tv_nsec; + if (t1.tv_nsec < 0) { + t1.tv_nsec += 1000000000; t1.tv_sec--; } t1.tv_sec -= t2.tv_sec; return t1; } -static double tdiv(double value, struct timeval tv) +static double tdiv(double value, struct timespec tv) { - return value / ((double)tv.tv_sec + ((double)tv.tv_usec / 1000000.0)); + double time = (double)tv.tv_sec + ((double)tv.tv_nsec / 1000000000.0); + return value / time; } #define HOURS(sec) ((sec) / (60 * 60)) @@ -274,16 +275,16 @@ enum { VERBOSE_FIXED_TIME = 0x2, }; -static void timestr(struct timeval *tv, char *ts, size_t size, int format) +static void timestr(struct timespec *tv, char *ts, size_t size, int format) { - double usec = (double)tv->tv_usec / 1000000.0; + double nsec = (double)tv->tv_nsec / 1000000000.0; if (format & TERSE_FIXED_TIME) { if (!HOURS(tv->tv_sec)) { snprintf(ts, size, "%u:%02u.%02u", (unsigned int) MINUTES(tv->tv_sec), (unsigned int) SECONDS(tv->tv_sec), - (unsigned int) (usec * 100)); + (unsigned int) (nsec * 100000)); return; } format |= VERBOSE_FIXED_TIME; /* fallback if hours needed */ @@ -294,9 +295,9 @@ static void timestr(struct timeval *tv, char *ts, size_t size, int format) (unsigned int) HOURS(tv->tv_sec), (unsigned int) MINUTES(tv->tv_sec), (unsigned int) SECONDS(tv->tv_sec), - (unsigned int) (usec * 100)); + (unsigned int) (nsec * 100000)); } else { - snprintf(ts, size, "0.%04u sec", (unsigned int) (usec * 10000)); + snprintf(ts, size, "0.%04u sec", (unsigned int) (nsec * 10000000)); } } @@ -376,7 +377,7 @@ static void dump_buffer(const void *buffer, int64_t offset, int64_t len) } } -static void print_report(const char *op, struct timeval *t, int64_t offset, +static void print_report(const char *op, struct timespec *t, int64_t offset, int64_t count, int64_t total, int cnt, bool Cflag) { char s1[64], s2[64], ts[64]; @@ -649,7 +650,7 @@ static const cmdinfo_t read_cmd = { static int read_f(BlockBackend *blk, int argc, char **argv) { - struct timeval t1, t2; + struct timespec t1, t2; bool Cflag = false, qflag = false, vflag = false; bool Pflag = false, sflag = false, lflag = false, bflag = false; int c, cnt, ret; @@ -758,13 +759,13 @@ static int read_f(BlockBackend *blk, int argc, char **argv) buf = qemu_io_alloc(blk, count, 0xab); - gettimeofday(&t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &t1); if (bflag) { ret = do_load_vmstate(blk, buf, offset, count, &total); } else { ret = do_pread(blk, buf, offset, count, &total); } - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("read failed: %s\n", strerror(-ret)); @@ -836,7 +837,7 @@ static const cmdinfo_t readv_cmd = { static int readv_f(BlockBackend *blk, int argc, char **argv) { - struct timeval t1, t2; + struct timespec t1, t2; bool Cflag = false, qflag = false, vflag = false; int c, cnt, ret; char *buf; @@ -891,9 +892,9 @@ static int readv_f(BlockBackend *blk, int argc, char **argv) return -EINVAL; } - gettimeofday(&t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &t1); ret = do_aio_readv(blk, &qiov, offset, &total); - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("readv failed: %s\n", strerror(-ret)); @@ -972,7 +973,7 @@ static const cmdinfo_t write_cmd = { static int write_f(BlockBackend *blk, int argc, char **argv) { - struct timeval t1, t2; + struct timespec t1, t2; bool Cflag = false, qflag = false, bflag = false; bool Pflag = false, zflag = false, cflag = false; int flags = 0; @@ -1091,7 +1092,7 @@ static int write_f(BlockBackend *blk, int argc, char **argv) buf = qemu_io_alloc(blk, count, pattern); } - gettimeofday(&t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &t1); if (bflag) { ret = do_save_vmstate(blk, buf, offset, count, &total); } else if (zflag) { @@ -1101,7 +1102,7 @@ static int write_f(BlockBackend *blk, int argc, char **argv) } else { ret = do_pwrite(blk, buf, offset, count, flags, &total); } - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("write failed: %s\n", strerror(-ret)); @@ -1160,7 +1161,7 @@ static const cmdinfo_t writev_cmd = { static int writev_f(BlockBackend *blk, int argc, char **argv) { - struct timeval t1, t2; + struct timespec t1, t2; bool Cflag = false, qflag = false; int flags = 0; int c, cnt, ret; @@ -1213,9 +1214,9 @@ static int writev_f(BlockBackend *blk, int argc, char **argv) return -EINVAL; } - gettimeofday(&t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &t1); ret = do_aio_writev(blk, &qiov, offset, flags, &total); - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("writev failed: %s\n", strerror(-ret)); @@ -1250,15 +1251,15 @@ struct aio_ctx { bool zflag; BlockAcctCookie acct; int pattern; - struct timeval t1; + struct timespec t1; }; static void aio_write_done(void *opaque, int ret) { struct aio_ctx *ctx = opaque; - struct timeval t2; + struct timespec t2; - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { @@ -1288,9 +1289,9 @@ out: static void aio_read_done(void *opaque, int ret) { struct aio_ctx *ctx = opaque; - struct timeval t2; + struct timespec t2; - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("readv failed: %s\n", strerror(-ret)); @@ -1425,7 +1426,7 @@ static int aio_read_f(BlockBackend *blk, int argc, char **argv) return -EINVAL; } - gettimeofday(&ctx->t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &ctx->t1); block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size, BLOCK_ACCT_READ); blk_aio_preadv(blk, ctx->offset, &ctx->qiov, 0, aio_read_done, ctx); @@ -1570,7 +1571,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv) return -EINVAL; } - gettimeofday(&ctx->t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &ctx->t1); block_acct_start(blk_get_stats(blk), &ctx->acct, ctx->qiov.size, BLOCK_ACCT_WRITE); @@ -1746,7 +1747,7 @@ static const cmdinfo_t discard_cmd = { static int discard_f(BlockBackend *blk, int argc, char **argv) { - struct timeval t1, t2; + struct timespec t1, t2; bool Cflag = false, qflag = false; int c, ret; int64_t offset, bytes; @@ -1787,9 +1788,9 @@ static int discard_f(BlockBackend *blk, int argc, char **argv) return -EINVAL; } - gettimeofday(&t1, NULL); + clock_gettime(CLOCK_MONOTONIC, &t1); ret = blk_pdiscard(blk, offset, bytes); - gettimeofday(&t2, NULL); + clock_gettime(CLOCK_MONOTONIC, &t2); if (ret < 0) { printf("discard failed: %s\n", strerror(-ret)); From patchwork Thu May 30 10:15:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165412 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp767588ili; Thu, 30 May 2019 03:19:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqycy21iLvA/NPY8On9b23zuA288PGwMGtIbLID0o9u+hIgXGZxw3jlFL+i70ZA6O5Dd9irD X-Received: by 2002:ae9:ea05:: with SMTP id f5mr2279483qkg.275.1559211593318; Thu, 30 May 2019 03:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211593; cv=none; d=google.com; s=arc-20160816; b=ZEuopwwAfKNR0IQ+Vau5m4mXFQtr9KB1rFg3g3NdBx5pyioJJRL/8vVjg4YY9NNiIW zjgyGeYltX6KngFTmi7I3rTbRzgPx623SAI9x8O1ByTFG0jJBr72J3rNypZAWLItGzt+ rKZCTUrkam0bpRu4c1jcqMmfmNIkPZkGc8Q2eHnwHXsl752axs8MAO3yKS5VcMtUCUPk 354ASdeV3685NeiDV2qDzWU+6wFnqBkbsyUL6UZVVYdJsOjZgeDF8Zrcvg6UFIzYEOJ8 RpjCrDV2rHCKjlX6SPSM8qzrenDU5G7nH5IpLARewmNZqJ+fCH7+llRxduvvMe5zmJM7 3ZdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=PPLFa9NHnZbGHQDGEn1CiaHDLKyObQdBVLbTqFMD65I=; b=0CHi4Oh7QCrHzVl0TwcPRSDu+ImmY/o0j0uC2Dndkbwyo9nA6i0iqp2VmAYFb/A9IQ kjFdG9RGabLIsw9f5DrA5v/SUF1bwjFRzFToDS9/LJut9nZ3SrN0541lsXrt4OjvlLDQ /AjeAHkpLtHYKDyA/ziRAJlpRk7DQhgntx76HasTApw0psiSVenMiGc82HwL2w4BF2OU atEdpUjZIVmgZIdvQA4PhmoT3LYC/3cCF69M5x6PcRnLsmmWx+v41g3eUqEOcP6Qyv7R jj+WwlV0GQ4RpfEl4lw/mekQglUWhyyNnBnQJuy/W14F/MrXQfxD/YyrKZcDDnh670IB 4/sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XZupICCA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g132si1443767qkb.111.2019.05.30.03.19.53 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:19:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=XZupICCA; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIA4-0005Bt-Nj for patch@linaro.org; Thu, 30 May 2019 06:19:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6U-0002ZK-Np for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6T-0006Sm-BU for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:10 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:43743) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6T-0006RX-2u for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:09 -0400 Received: by mail-wr1-x442.google.com with SMTP id l17so3799857wrm.10 for ; Thu, 30 May 2019 03:16:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PPLFa9NHnZbGHQDGEn1CiaHDLKyObQdBVLbTqFMD65I=; b=XZupICCADA9sZPbFCDZJlSNr9kqu2xsEr+tj1nHOnTeTYPzkB480cWgVdleix5zmas JvIk5yWG41IWcMH/K5H+Z5c45S6byrH4FHF+8CSnq1b8AzO0VQ9e2W31i7qOwNxc2NnS wCPDuXtIU1X33cUaXT5ZTkUZrrHBptHCx3fmSeCLhpP6GTgaVctqMczHqSxiE/U3zEqD j/Y//Qb2mpJAO1zaOh1odCA3T8c+4GR9tWv5OOYdLt4qeEpZOiT8d2L9gdmOnZlTnSFK MiwnQWNOP97g9OTG8idvD3rAs1A7sthtVktWQZjPBU0OYX2FRI1hOnkL8Hvn1wv3SG0K AfjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PPLFa9NHnZbGHQDGEn1CiaHDLKyObQdBVLbTqFMD65I=; b=oDpgCtsQ0jeiMswVddCeIWdAlBD0tXQmy9a8eSzNSu4pFp/9eiifqvBUi/8AM0PJ84 wb/Oz3KL7wtq72Wte4KC7ctxn/rdP/vZ59Ksc/kp/39eKBrjhOIQSn0NsE3eL62+Mt9e A5u7YRDPDjEOfE47I/58xw0Px9bktICP4E27gwy396/5qZ7OQqd8mRpQ4Xj1SKXnZT6+ /K9/XfsFrFIbdG0KhbFZ/yCS9KviIgj6+Qdtw+zIt0YtTRlFnQSMSkTFzd53t6twkR53 zMjs3z/uugbj/e9ZVl+cGOrGBww3xQHMLBH7Cpp/fRMHBLT5iVZu8m0nZ9DRkrHTjw1w g1Ig== X-Gm-Message-State: APjAAAXVdy7SNx48mEhE5jOg4jzKG1W0s/NtQ5I23h+ypJxbnHw3YL3f jL8LKJn3UrOvfBQW2YmAzU6SMA== X-Received: by 2002:adf:e7c5:: with SMTP id e5mr2018623wrn.107.1559211367918; Thu, 30 May 2019 03:16:07 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y17sm4609255wrg.18.2019.05.30.03.16.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:04 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 49ADE1FF90; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:40 +0100 Message-Id: <20190530101603.22254-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 03/26] tests: Run the iotests during "make check" again X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth People often forget to run the iotests before submitting patches or pull requests - this is likely due to the fact that we do not run the tests during our mandatory "make check" tests yet. Now that we've got a proper "auto" group of iotests that should be fine to run in every environment, we can enable the iotests during "make check" again by running the "auto" tests by default from the check-block.sh script. Some cases still need to be checked first, though: iotests need bash and GNU sed (otherwise they fail), and if gprof is enabled, it spoils the output of some test cases causing them to fail. So if we detect that one of the required programs is missing or that gprof is enabled, we still have to skip the iotests to avoid failures. And finally, since we are using check-block.sh now again, this patch also removes the qemu-iotests-quick.sh script since we do not need that anymore (and having two shell wrapper scripts around the block tests seem rather confusing than helpful). Signed-off-by: Thomas Huth Message-Id: <20190502084506.8009-8-thuth@redhat.com> [AJB: -makecheck to check-block.sh, move check-block to start&gate it] Signed-off-by: Alex Bennée --- tests/Makefile.include | 8 +++---- tests/check-block.sh | 44 ++++++++++++++++++++++++++++--------- tests/qemu-iotests-quick.sh | 8 ------- 3 files changed, 38 insertions(+), 22 deletions(-) delete mode 100755 tests/qemu-iotests-quick.sh -- 2.20.1 diff --git a/tests/Makefile.include b/tests/Makefile.include index 1865f6b3222..0c6d8c75941 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -140,7 +140,7 @@ check-unit-y += tests/test-uuid$(EXESUF) check-unit-y += tests/ptimer-test$(EXESUF) check-unit-y += tests/test-qapi-util$(EXESUF) -check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh +check-block-$(call land,$(CONFIG_POSIX),$(CONFIG_SOFTMMU)) += tests/check-block.sh # All QTests for now are POSIX-only, but the dependencies are # really in libqtest, not in the testcases themselves. @@ -1077,8 +1077,8 @@ clean-tcg: $(CLEAN_TCG_TARGET_RULES) QEMU_IOTESTS_HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) = tests/qemu-iotests/socket_scm_helper$(EXESUF) -.PHONY: check-tests/qemu-iotests-quick.sh -check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) +.PHONY: check-tests/check-block.sh +check-tests/check-block.sh: tests/check-block.sh qemu-img$(EXESUF) qemu-io$(EXESUF) qemu-nbd$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) $< .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y)) @@ -1152,7 +1152,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) check-tests/qapi-schema/doc-good.texi check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) check-block: $(patsubst %,check-%, $(check-block-y)) -check: check-qapi-schema check-unit check-softfloat check-qtest check-decodetree +check: check-block check-qapi-schema check-unit check-softfloat check-qtest check-decodetree check-clean: rm -rf $(check-unit-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), $(check-qtest-$(target)-y)) $(check-qtest-generic-y)) diff --git a/tests/check-block.sh b/tests/check-block.sh index f3d12fd602d..c8b6cec3f68 100755 --- a/tests/check-block.sh +++ b/tests/check-block.sh @@ -1,24 +1,48 @@ #!/bin/sh -FORMAT_LIST="raw qcow2 qed vmdk vpc" +# Honor the SPEED environment variable, just like we do it for the qtests. +if [ "$SPEED" = "slow" ]; then + format_list="raw qcow2" + group= +elif [ "$SPEED" = "thorough" ]; then + format_list="raw qcow2 qed vmdk vpc" + group= +else + format_list=qcow2 + group="-g auto" +fi + if [ "$#" -ne 0 ]; then - FORMAT_LIST="$@" + format_list="$@" +fi + +if grep -q "TARGET_GPROF=y" *-softmmu/config-target.mak 2>/dev/null ; then + echo "GPROF is enabled ==> Not running the qemu-iotests." + exit 0 fi -export QEMU_PROG="$PWD/x86_64-softmmu/qemu-system-x86_64" -export QEMU_IMG_PROG="$PWD/qemu-img" -export QEMU_IO_PROG="$PWD/qemu-io" +if [ -z "$(find . -name 'qemu-system-*' -print)" ]; then + echo "No qemu-system binary available ==> Not running the qemu-iotests." + exit 0 +fi + +if ! command -v bash >/dev/null 2>&1 ; then + echo "bash not available ==> Not running the qemu-iotests." + exit 0 +fi -if [ ! -x $QEMU_PROG ]; then - echo "'make check-block' requires qemu-system-x86_64" - exit 1 +if ! (sed --version | grep 'GNU sed') > /dev/null 2>&1 ; then + if ! command -v gsed >/dev/null 2>&1; then + echo "GNU sed not available ==> Not running the qemu-iotests." + exit 0 + fi fi cd tests/qemu-iotests ret=0 -for FMT in $FORMAT_LIST ; do - ./check -T -nocache -$FMT || ret=1 +for fmt in $format_list ; do + ./check -makecheck -$fmt $group || ret=1 done exit $ret diff --git a/tests/qemu-iotests-quick.sh b/tests/qemu-iotests-quick.sh deleted file mode 100755 index 0e554bb9724..00000000000 --- a/tests/qemu-iotests-quick.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -cd tests/qemu-iotests - -ret=0 -TEST_DIR=${TEST_DIR:-/tmp/qemu-iotests-quick-$$} ./check -T -qcow2 -g quick || ret=1 - -exit $ret From patchwork Thu May 30 10:15:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165416 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp770390ili; Thu, 30 May 2019 03:22:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqiQDJguogFdbQCo68QTnN5ycjo/m4QbPMra41QCynsfRLsrUdJWzhrwcloKO6Yfy/CMlV X-Received: by 2002:ac8:2a01:: with SMTP id k1mr2584349qtk.257.1559211770253; Thu, 30 May 2019 03:22:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211770; cv=none; d=google.com; s=arc-20160816; b=PathUFaXM672ENeiqLoqyoK3ApFgLmaryDVwt/yHPIHUSdGoxXAn3DNZvr9q5VjCg7 t8QXjzauAqHS3qZYKJdqv34wSQ49PM0TJiUMSVQGcFxyKsQQbbo/bIJD1qZzZb+qq54u 8abvPVZH3qNj4RLI+EwsHwZGIDqbwQCfrDtD1x8Dd6N1NPLQlXayQnjY3Z9rjgoBtdmd msQ5elaR0lbvlbF+nsL+eZGKbFmINWtpPAQbxgzYqoHVJpYGiroYVg8e7gOiCRu0OAmZ smFPX2sHgTEtjY3aoBt0YCG0E17ogQkB/uqJ0Qf7zdMfzK+stDPodM6CN4kWdxkp66Kq lYow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=yQmtSC53V1a0JKg4AWzdnb+vwP+cvIVWjcrHwPCZ1/w=; b=FVRJvkoGNEHeJxK4GcxsxnuZmjD0wEQrNg1xKK3OZPt617XTkWJDxDPTWD2jWfC4Tz vY6VEZsWAIGl8h2A4rmPaxUuPo4LlG6J5/7Co7/UcDa9A7XGmVifKJzQO8IKTRN347mo rnH7ftmYopONw/5+LjBrriwFkdX8xB4fUfnedcA7J1NAFvBGcFPer2mUiXugFJAPjGEI rWayfh3JJmGj3/DLa04K3kaWF1QWBDsibXjigZoLszMNcoWipHu5qagthbePr1MobRK3 d93tKoTh16YL3F1jvztYqPsiL5o4dA5oCo9Ty1W4lseZgN0MXvIjZB4lZJ/dWMJtgC0z rcOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=b0zDxZwI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k93si1457056qte.13.2019.05.30.03.22.50 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:22:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=b0zDxZwI; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWICv-0007gF-Mh for patch@linaro.org; Thu, 30 May 2019 06:22:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6V-0002ZM-Lz for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6U-0006Th-IP for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:11 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:46567) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6U-0006T3-CA for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:10 -0400 Received: by mail-wr1-x441.google.com with SMTP id r7so3788701wrr.13 for ; Thu, 30 May 2019 03:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=yQmtSC53V1a0JKg4AWzdnb+vwP+cvIVWjcrHwPCZ1/w=; b=b0zDxZwI8DCcavqQEsrfZ42GgsfYbuubHXpdanDl8UCYoA+7sIUhLeDQilG0bearmk PNxHJDFlY/O+fcH0t0C0J0j7C2+c7PTgGE4Q1tOYT+bS5lZeyeaEEuBOzKj6e47Xfbmk Qod2uN30J/GQW3oui14+m+9LFLNZQdfcbyjU58yrg83bjeOYj95CFGh3UxG3epDBUNDx j0MMH0tlWL8RNIb+ksbZsdzPOQ+fL+yGsuT+O5XVK0YB82zzTGBKJx8GAb2RvAVtgnd5 HnqOj8hjR+ptYul3NbeptQYDR+IZuKOj1lfuqk5GHg48fTS06ah15LH0+tEpg5eq8zsE ZNnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yQmtSC53V1a0JKg4AWzdnb+vwP+cvIVWjcrHwPCZ1/w=; b=Q+AcSyxQOSSloAKMAmeyF7Tf2nmjbJbWloeiKlJIBf2xRBEWr/7Jkc7bcWTIn9d3Cr qBeBtpTqe4ZLvMZ0sTw6NjbxFDBZQdNn5gn/9fB1Ey45MLw7IzrSrbFBZ2I4m15VkA5x 2D7i0exzLk+unW7Gam0IV5QNNm//xDTCLgipJtGg4so3liUu/9KqNMljvv/1KR3FyiZE 4ClwOJQUApyQb0t3sD/5qKwKnhAKVmfMjfJj7Cr5gdlSr9iqSWaYq7nhlFOmzsIPw1F7 sSaLsvLOfEEND3BlZLELrN83AkpFaVCsrCoHjtvLrZsJ6QD9sxV34EzA40SRUdTH4U6J 7qIA== X-Gm-Message-State: APjAAAWZUGW6/ElALClPow/tTFrnb0ybYl4MXyzzVtpSkse5KyiKPe6r yXyWAM7N4KBpmrem6f6hznHafg== X-Received: by 2002:a5d:534b:: with SMTP id t11mr1864752wrv.61.1559211369320; Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u14sm2690100wrt.75.2019.05.30.03.16.04 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:06 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5E5A31FF91; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:41 +0100 Message-Id: <20190530101603.22254-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v1 04/26] tests/docker: Update the Fedora image to Fedora 30 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefano Garzarella Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Fedora 30 got released: https://fedoramagazine.org/announcing-fedora-30/ Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Marc-André Lureau Tested-by: Stefano Garzarella Reviewed-by: Stefano Garzarella Message-Id: <20190528153304.27157-1-philmd@redhat.com> Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fedora.docker index afbba29adaa..12c460597ed 100644 --- a/tests/docker/dockerfiles/fedora.docker +++ b/tests/docker/dockerfiles/fedora.docker @@ -1,4 +1,4 @@ -FROM fedora:29 +FROM fedora:30 ENV PACKAGES \ bc \ bison \ From patchwork Thu May 30 10:15:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165418 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp770971ili; Thu, 30 May 2019 03:23:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqysJgWt8Qzoe6gR0HBe1/H6aYiEthVJ4Ma2rjvx+6Z5VzZ7GxR6/cJQAkpQq2sT8DkNa9Z/ X-Received: by 2002:aed:2494:: with SMTP id t20mr2610698qtc.135.1559211802290; Thu, 30 May 2019 03:23:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211802; cv=none; d=google.com; s=arc-20160816; b=I1eWXgR4F1k/oDx/LD52qrS7i1CigDbtUQB5xfkOe6/TowYni1C10tn7UlD4NN50QO OIIMiemBckP8/yyeFasNpysNdqDeKid7enSgI7q8/Fr++gPqtPgObhcHRZ2+8al8jxhR TaJ+r9unXXpsjUkXpiB3+0WQNz5/YVgjonye/ULC7ClbcNlIm+mVLRECmscvez6B3ix8 BrMmnLJ5r7y+KlRXncT6aatPrlUwiIdCmXhUjM8Ze9qNDLz909jvG5BSViO1NJgAnV4L tPORS30cSZpgWAZnCM2vCyX6eXZH2umw8CXb9bk4SOoHuJtNNO8B0LBS6hFjRN3g3F4U QqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=XEDDkoJKFf+IpBra7HDHG0A6Y/FKSBEEsukwDPufo7k=; b=nK7DA26TqLL6iv7iAmixAuEvNcF/rpapVYFrXxqcehh07BTnvDn5ajFpHgQpFE+TiR P7IMP+r/pOXlJJIRv9onIiF9L3rD7UF2KJO5DuLZye8b5VUZkLAl8IJ9GXBg+XD9GP7E Qp7YeqX7oBvpIBckmkjqysxHQEIJ/64zCGuWKCc+xSZqbH+yPYWCCf3sn5scYWyqmZBu SqcRzNowvNKaGYp4L1NvWNu/nIO5ZpsyFcvKwCV0QowvtVSruqvGNAF7x4cC5UOHVntC CiSik3Yw4mfk41GAVua65TG/GBy95DT4eYHkMdM5d45ik8hNR7FVfiC7gvC0oJ8wN8jg Xqhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lR9r11t9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t47si1405365qte.262.2019.05.30.03.23.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:23:22 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lR9r11t9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50633 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIDR-0007qX-QM for patch@linaro.org; Thu, 30 May 2019 06:23:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6W-0002Zl-8g for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6V-0006UZ-5g for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:12 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:40269) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6U-0006Tc-V2 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:11 -0400 Received: by mail-wm1-x343.google.com with SMTP id 15so3457028wmg.5 for ; Thu, 30 May 2019 03:16:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XEDDkoJKFf+IpBra7HDHG0A6Y/FKSBEEsukwDPufo7k=; b=lR9r11t9rA8f0H5+5wxcChwS0IOKmncWsaLejMOBY+nUB0urOlE7EKrxfhvESLScSG pXan9EJoYz0xV7N5AybHN82/O3BVi9mfgKntuTbOxiJRu7nry7vDSHeuRa8yVo9Um9db BENdaI2y6SBKLtHYSZg+x0PEN9KE4SgFhR0qXwtua6PdfUrWrtObqmlLWLIL/HNl8dcp Ay7leC+khmFPgngHrFoo4Z5b0z5CRDASpydVgtdvNYloHluIkqXDauyJQ1q11L5E57X4 A941B+lyxVXNFUSLu0GNNSJ8QhMNjzB4ncSWcVmeK1z+YnPQAT6y6sMjqUcFoU2rSSpI oiaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XEDDkoJKFf+IpBra7HDHG0A6Y/FKSBEEsukwDPufo7k=; b=Jk6v7E4sltyu+24qfXhhyljGnWJADX6qtU7Qus1pxsZgUOvoyxefXzRE824mAY6gjY xavd23PM+gvVDvCaJEDP7U4b7rnIGqG0Pcq1GkxU2uxnpShQB5Z2cBMYxN0kMsWoSe1x O1WOiH/lfTNcXuSOS691JEsPeT5lhHR0ZvBOIFNhxsnMKl3Zz5IAGYIz53LPlg/f2yWm wBvRde1f/MRH1lpzDgP/6kKxxdBzbI4BzZnoVOUQj9tLi+xnISuHbDzIppNMG4djROa5 F1pmohSg53dcLA540pSH/IeSuVbVsxwTNj3a0xnONUyyd8UuLmzBOJR9vW8twgzObSLP xuEw== X-Gm-Message-State: APjAAAVc0HmxPe+nbXBAhZtVYe2zUDYj026SfyXg/7akWwPA0oI8k/u+ gvI7W9b2h3VgAj50YbUY4MClUQ== X-Received: by 2002:a1c:385:: with SMTP id 127mr1694799wmd.109.1559211369935; Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w185sm1689633wma.39.2019.05.30.03.16.05 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:08 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7422B1FF92; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:42 +0100 Message-Id: <20190530101603.22254-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v1 05/26] tests/docker: Update the Fedora cross compile images to 30 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While at it remove the bogus :latest tag for cris cross compiler. It tends to break caching and cause confusion. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/fedora-cris-cross.docker | 2 +- tests/docker/dockerfiles/fedora-i386-cross.docker | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/docker/dockerfiles/fedora-cris-cross.docker b/tests/docker/dockerfiles/fedora-cris-cross.docker index b168ada615a..09e7e449f9b 100644 --- a/tests/docker/dockerfiles/fedora-cris-cross.docker +++ b/tests/docker/dockerfiles/fedora-cris-cross.docker @@ -2,7 +2,7 @@ # Cross compiler for cris system tests # -FROM fedora:latest +FROM fedora:30 ENV PACKAGES gcc-cris-linux-gnu RUN dnf install -y $PACKAGES RUN rpm -q $PACKAGES | sort > /packages.txt diff --git a/tests/docker/dockerfiles/fedora-i386-cross.docker b/tests/docker/dockerfiles/fedora-i386-cross.docker index eb8108d1185..9106cf9ebed 100644 --- a/tests/docker/dockerfiles/fedora-i386-cross.docker +++ b/tests/docker/dockerfiles/fedora-i386-cross.docker @@ -1,4 +1,4 @@ -FROM fedora:29 +FROM fedora:30 ENV PACKAGES \ gcc \ glib2-devel.i686 \ From patchwork Thu May 30 10:15:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165413 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp767898ili; Thu, 30 May 2019 03:20:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxakIQ/H0oPI1EZvLRY5/ugtZfVUqG1iyIvI8kMgOuIcN+x/pVNVhhdIaHGLvceSPK7nwUn X-Received: by 2002:aed:3003:: with SMTP id 3mr2611922qte.308.1559211610403; Thu, 30 May 2019 03:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211610; cv=none; d=google.com; s=arc-20160816; b=JyMcqzCuAwk/nVa+/v0cvfSyD/1SitqqglORgdwPIConpklbYZPOP35/nQERucRWNO 9zIi9jL4QptqFzZ2sNSm7H6i+6J9eyVGsT2BdNDMe9mamJsdQFXdxKl3Q96UbNsI5Q+S SaZUhFnau+r/G9Je539gSN15X32yILb5OGocpTscdeWMbh7KRAP0QsFb4JGctg8HhgPM KJxyWEioThE2nPH4KBB1amIcgT0HYdNVQFSywnl64MvSeDrzB8IqZBTj560gJ5MyHUMG /R8k1x8vhGhNlFcSKbnPTElzOu9xw32cy4mw7l9G4fzVqaLeaiyRhAFfh7gISYHVsQSm nNLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=tdfRNkcy3tXrd40GFlSuojfYwNRpqR4LehskXAKdxiE=; b=hRykA8yKeDup2RR6rqdVdVatWVN2S8tXfRB+pOiQ85+utOBILGjBZdE+kAIoowg8DZ KR67kGiHnuX48HkRmni9UwNhmQ7xTXyY2EoXwxsc35nOmNU6HMeXXFiYVmF4fs3WJxHz eKBec+Bpz3DjVDcPfL69yAr2vCFEJHFdtf5SubgcykWPUJP3flptf9wS/vPfUS+RGx0g o40cQdeFz0+I/eWc7a2dGsinxQVdPZ/Zh9jfIK29IuqdNzfAxC+AU9bN+3O/ctrm7jbZ Bb2HWizTr5UNDBM3dsl2s5pmUgtcTCDHHFAvFPjOcVJ/p0pwSTp/3Iy5mXAKCLt3Lmjs B8Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bU4MhMOM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s72si1438939qka.208.2019.05.30.03.20.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:20:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=bU4MhMOM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIAL-00054T-Mj for patch@linaro.org; Thu, 30 May 2019 06:20:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6W-0002a4-TO for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6V-0006Uy-Mz for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:12 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:41883) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6V-0006UF-EU for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:11 -0400 Received: by mail-wr1-x441.google.com with SMTP id c2so3807178wrm.8 for ; Thu, 30 May 2019 03:16:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tdfRNkcy3tXrd40GFlSuojfYwNRpqR4LehskXAKdxiE=; b=bU4MhMOMtOQF9SzIY9sKIx1ml5gCo6WA0CTGCSf//xBaBJx9aWmvonLe6FA3rgO0vM r1mqz9QtEKR0dJuKzlIvz9o0Ce6vfW3bVHKXYcShjgmMb7EQ3qBX+6k8VOcdfzTxwORo XObCcf/AWo1cTO/z/x0pw3nTH/8fIO5WyY/PM+GfGNEwjzF8jHamLew9U73WNDbW1RYz IhsdO5Uij9oSHSn1bEAeogEzX0auB+meUQnxhhlB0YKXxuAhSICyW9nBN0DqndfRmA64 wpkZQPGyjyRfrGtpV9nsRPomf/QDlBQQ/uDzlZ75tRSDOTHYXpgxbl0K0cJpi4hpQrjR eCcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tdfRNkcy3tXrd40GFlSuojfYwNRpqR4LehskXAKdxiE=; b=EgfTCFqii4MzZYjyOKfGm3mzrmIlmO3/8IqXkAjZjA0qB1LTf2ipRVspxPR8oSsh12 TUb+KSMlpTfJSQ8Tg/qAVI3qYyR7l4x4y/Amu4VinUTchCW3e+A8nbyUNbTsap1TXiST VItqlbKo2dHpk4G/WHgLEbWPTMGEj/p6qS4WSOt+Iosu4TMK2mEA6Hpn2toQ/CNphpI/ kdMSMdg/XW5BRmjTb4KUON9n6koiJiYEJ306n9/GWx+GLODbbHZ/6BBTwDFcOJYXcS1c 3K47/yOwj4UGgL+a6QwXaJPe5ZJhDmw6FNoohNPBWmp2r2Ozu8Ec24zRuQXMCRNlRdeg 4nyQ== X-Gm-Message-State: APjAAAVKwTd1mnZBUPB1hXA+58n+3wkbLhv+zB4Ec2iRd+QsdBuWVmyW fxjM2GF+fqNLY3BK51P8sS7B+Q== X-Received: by 2002:a5d:568c:: with SMTP id f12mr2040279wrv.77.1559211370441; Thu, 30 May 2019 03:16:10 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id u10sm1736567wml.42.2019.05.30.03.16.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:08 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 884C31FF93; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:43 +0100 Message-Id: <20190530101603.22254-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v1 06/26] tests/docker: Update the Ubuntu image to 19.04 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This has aged a little and we have a separate LTS image for testing on the older distros. Update it to a more recent release like its Fedora cousin. Besides it is useful to have something with gcc-9 on it for squashing those stringop truncation errors. Signed-off-by: Alex Bennée --- tests/docker/dockerfiles/ubuntu.docker | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/tests/docker/dockerfiles/ubuntu.docker b/tests/docker/dockerfiles/ubuntu.docker index 36e2b17de59..8d256961f06 100644 --- a/tests/docker/dockerfiles/ubuntu.docker +++ b/tests/docker/dockerfiles/ubuntu.docker @@ -1,6 +1,15 @@ -FROM ubuntu:16.04 -RUN echo "deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse" >> \ - /etc/apt/sources.list +# +# Latest Ubuntu Release +# +# Useful for testing against relatively bleeding edge libraries and +# compilers. We also have seperate recipe for the most recent LTS +# release. +# +# When updating use the full tag not :latest otherwise the build +# system won't pick up that it has changed. +# + +FROM ubuntu:19.04 ENV PACKAGES flex bison \ ccache \ clang \ @@ -21,7 +30,7 @@ ENV PACKAGES flex bison \ libepoxy-dev \ libfdt-dev \ libgbm-dev \ - libgnutls-dev \ + libgnutls28-dev \ libgtk-3-dev \ libibverbs-dev \ libiscsi-dev \ @@ -34,7 +43,7 @@ ENV PACKAGES flex bison \ libnss3-dev \ libnuma-dev \ libpixman-1-dev \ - libpng12-dev \ + libpng-dev \ librados-dev \ librbd-dev \ librdmacm-dev \ From patchwork Thu May 30 10:15:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165414 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp767902ili; Thu, 30 May 2019 03:20:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGYo8atShZlATmAY5yZPrAzO2EBH8rm6LYaRzZEM7vY99ym3ApOdhbkwQZS0hXI0+Xp+Rs X-Received: by 2002:ac8:2bdb:: with SMTP id n27mr2614269qtn.384.1559211610545; Thu, 30 May 2019 03:20:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211610; cv=none; d=google.com; s=arc-20160816; b=wG0Lf0LZQLC3qvK33sNrTwflHMvbTInHvgIsBoUwzMeqHs0GLO3Ryf1DNvvop1WycI c8O3ynvYHWG6dfNETxB1iDwHnL1a37Zh7WoaGTsBePwBc5gL3JQssiPdNSaPv086UzSf jfmYZ9C7GWYYdKa9/iQAACxsACvdNJI+caFCdsy9+G/sYeEVbXi39Vw4bdaoWAP944Df zAp1R0dEMSsbowDgRmdThBub9RzrZ7+TP7Xor407YwWQcIRArb7SQLTIQ/NFKDC+wbZM 8Xsql+SAiFThr++lr+j8RKu26tOnRpkFZdBa6gWUcgxCQQdb1rei9OBm3CnlKpSroeQt lo6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=W0YwnQ7RyXinYmA/R3gRUT7SUlaDY+T48f3CddOaKS4=; b=yzmXRDFDj7kteaOzv1PR+oA+g1ye2mTXJLx0v4XCs7Ta5ljvNhqVJHOG4DkCuzCTyb QzhJiFv80+rM/6KIIXPm+V76qd6q3QB89wzmoxQMyabgBaRK/rn/VrQhyLY+TbjafM3f hXc6dGOVbLKxxLQvFZcAiVHS+2EvS1E3ibLIT21OqNFVHx5OdhYwfYrrUWYxAIsBThMZ YRvIOpohd8KftxVuIcV9szhFET/iuxJ+eUMLH4JjDS9NSvFIJSYdwFtUDGwXnyDIaXBb scI56OvVWrSvzUZSxFsyZbeUjxj1oHAJ8I64qfbcx8XHd2e9UXmYoQpIUtx9sJEU7YzQ /xRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="is+/WRib"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i8si1030504qkm.147.2019.05.30.03.20.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:20:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="is+/WRib"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIAM-00054g-2l for patch@linaro.org; Thu, 30 May 2019 06:20:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6Y-0002cF-R4 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6Y-0006XT-2T for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:14 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:39973) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6X-0006Wx-SR for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:14 -0400 Received: by mail-wr1-x443.google.com with SMTP id t4so3810371wrx.7 for ; Thu, 30 May 2019 03:16:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W0YwnQ7RyXinYmA/R3gRUT7SUlaDY+T48f3CddOaKS4=; b=is+/WRibWmlDXeyKsRs5GmyS7UPJbnfWF923ZV7AYXKcxqn5PpLdrzy26ni0gIi6te obLr59UrIPwgbrj1WUYrmqmDYgT9z2RJRifLE1LVC+5KFZaaAV8qVB3m48p2XLihW5vF GTv5JBkZTqLkUFLmT0ufgMNnvMrHKIxytuujuoK5ULCsCihdY11xsTf4Cwp1UJObfIAL lj9dfaHBOFZZYPhziXvbA8DYDG7ljIn/9bBPfWqpZfEE4YXNBGjRrG4k2/d6a8OJyf5l lxcnnkh7ePCN4XJrPkR4xjnnapE+5JxKJFcuWQcCOmOqGw7KADNhcxGptghbeWnrqzsA a6vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W0YwnQ7RyXinYmA/R3gRUT7SUlaDY+T48f3CddOaKS4=; b=K6vdjrwlLxle/vb/utQ4b9TX3/SdosrsetBtUCJMN99/oZCjE1Bc5HKzie1jdKWfW1 ZcpOGP0JpyOhzYIQdNEObsomDdy4D667Wf8+pEGyKDyRCGznxKN9JCU0avPb9E4fKnCk RPBBHJWEkh0hXjcCIK3FI9Il/jQWFGWv9zLZjIkVIKk+vPTxZDRE8htEmZXfRzqZ5p6m lr2VTqf5n77W0TvT3PegbT9OgDQFEb+Cgr/Q/cz2dmZnu241yYfDbmCahEhiLcfsLAFJ TFVVC4TJDUr/WvWj9qUGK4+l9+qxv5Lr74XJUef4Ab3aqGUSF6GnGx8cEMpOGFHhNF3U KM1Q== X-Gm-Message-State: APjAAAXN2PwNAGjdMbPHdhOc4fyKov8sar5ijODcVZ4DXDI+pINQzx9s 5HFxpXMhao0QM6aPaHcxYAdW3g== X-Received: by 2002:adf:dc8e:: with SMTP id r14mr2067766wrj.121.1559211372802; Thu, 30 May 2019 03:16:12 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h12sm1917633wre.14.2019.05.30.03.16.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9B72E1FF96; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:44 +0100 Message-Id: <20190530101603.22254-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v1 07/26] .travis.yml: bump gcc sanitiser job to gcc-9 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The toolchain PPA has it so we might as well use it. Signed-off-by: Alex Bennée --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/.travis.yml b/.travis.yml index b053a836a32..f0aa37f2d12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -240,8 +240,8 @@ matrix: - ubuntu-toolchain-r-test packages: # Extra toolchains - - gcc-7 - - g++-7 + - gcc-9 + - g++-9 # Build dependencies - libaio-dev - libattr1-dev @@ -270,11 +270,11 @@ matrix: language: generic compiler: none env: - - COMPILER_NAME=gcc CXX=g++-7 CC=gcc-7 - - CONFIG="--cc=gcc-7 --cxx=g++-7 --disable-pie --disable-linux-user" + - COMPILER_NAME=gcc CXX=g++-9 CC=gcc-9 + - CONFIG="--cc=gcc-9 --cxx=g++-9 --disable-pie --disable-linux-user" - TEST_CMD="" before_script: - - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; } + - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -Wno-error=stringop-truncation -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; } # Run check-tcg against linux-user From patchwork Thu May 30 10:15:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165419 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp773033ili; Thu, 30 May 2019 03:25:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvGfoV/Z/nrncHbMbqjfpght4Hdf5KBt7LzjNt2KIUkd/qw3vg/8qeEPjeS3mIxch6tIsC X-Received: by 2002:a37:4757:: with SMTP id u84mr2437289qka.16.1559211935171; Thu, 30 May 2019 03:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211935; cv=none; d=google.com; s=arc-20160816; b=GyX9VjGhXfrlhY8/4EYzbkefnToQc4hjcww4U+DbtmrBvBIwWClPbWwa3Z34jiVR3/ DrL/zhO0U5JhNxpV+8Q2oWqG5OVFs3NTOQEhb4vQRDVxXyslJWNqieitoFtnitSp4M82 ycH7rwwX6TZhXxjsYiCu9AaBa2k/FSbOf3czyM77bGb4jw6DCod9IHO7uHS1bMkRvgN4 owE+vvZoO9//PbRpSZPy7Nr21xALwEk1xbwFhKroA73N+hCqJph8hb3c4T9U1MuL5M+I 1XpXfJdl0OTsnhEbAqt+VDuD/BQcS/RTFcKsLAItCeOBslQ4O0tje/TLelbR2BdElSpQ dtzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=aEPT2KH0ylKDQMa3RRq5y0ml/pOWW4HSQXWafsxR9f0=; b=zEJWw6OVx63W6HPOsGEx5eBcz9KlAdmeOVskf82oxHP/ZAlTV7InTCZS63oXrCoRiJ EajzhguEtFBBb5srAtb40hH795jFRpmFCNxHNYg+5RHSRvzQgZE+6nAozrJoZjX4tPku gK67IxU5ycpo0M/nIdr53o3RytSZPZ7/oJn8eKTD1drgHSEhU1Z4XeUk4RRGYjijUqSc 2qIs28LbQc04nbRPJnJaCUBj68G/QOEb0vLyinl35LUqTGzGwIo/Jp2zfaca9MTEJycY v++R5u/TZhwal5yg/3lSBcURNuWL5xQaVs1TF1kOjCXwGBRmJjLO/T0fLznzUifmz+bC EC7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ISqxTQ+s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x8si1417766qtf.386.2019.05.30.03.25.35 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:25:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ISqxTQ+s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFa-0001bR-L7 for patch@linaro.org; Thu, 30 May 2019 06:25:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6Z-0002dD-Pc for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6Y-0006Xu-In for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:15 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:36364) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6Y-0006XB-Ca for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:14 -0400 Received: by mail-wr1-x442.google.com with SMTP id n4so765077wrs.3 for ; Thu, 30 May 2019 03:16:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aEPT2KH0ylKDQMa3RRq5y0ml/pOWW4HSQXWafsxR9f0=; b=ISqxTQ+sW2feLTqo940rJnIFrMshLMilzv1nngoXgcL3rLG8EW93HVKRxBcSWtlRC0 cWV/WrfvsX6KIv3AeD8hV9u1bFw0cCmQA+mdT3JjsFx7JL/IrLaaQItB/rMPa9Q2NVjJ kQErzSH5GDGoiDCLGF2Y1xQ99JsQJnd5XmOWnHLlD+eQlfLFCl7ah8eR7H+9Fam28ZBP ShEKJpOvtuifJ48E4c5NxYjL+iAnS3C9ffRGnzpPEfWsfQVoyUbeilMZZPra/xNqC2oA GC9JiqeEkR4fWqDwpUvBprx6oLFmHM5t4oWeqQg8bKvn1iCMd2PTouJUmzMN07X7uL0Q 2wuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aEPT2KH0ylKDQMa3RRq5y0ml/pOWW4HSQXWafsxR9f0=; b=Fq/0F4frv2NJFWHb5+4gGMD4TVu9l/ZJtxASQJGntnqUO5mKR6DNATUWW1+JSpT0yp cCDPz64M16WNxl0qBNTLpEngEKvhJfplJeXejB0ySaMWHjgGD3Zw8T+9TU996aoIMR2M sFuzVbCClLZNGXlu2S8L2HUWtlV1B3TyqcJknP267hyW1QoHMG4gW8MR6ADjTr1C6U2h Gz6tbvyxPD7jpQkrGTfjc6JNvDNVvHabcyi53ssI9hpGTA+NDRM7U/0krjquo6JM4xOX uJwX7Q2W7Eq4U+9rqFtHN9n3oamPkaEJgu6+VBgBL04kgeibWf6KIkTQ2MHPJJTFDf06 05Pg== X-Gm-Message-State: APjAAAVAD9f863l3rfs+sCW6C2Xx6BbjmtPlm9VNE0hUYCZ30U0bzMgv ydT42HhE1uiT9NQPgVOwL5upSQ== X-Received: by 2002:a05:6000:148:: with SMTP id r8mr2070870wrx.210.1559211373322; Thu, 30 May 2019 03:16:13 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f3sm1906097wre.93.2019.05.30.03.16.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AF4561FF98; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:45 +0100 Message-Id: <20190530101603.22254-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 08/26] .travis.yml: add clang ubsan job X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We document this on our wiki and we might as well catch it in our CI rather than waiting for it to be picked up on merge: https://wiki.qemu.org/Testing#clang_UBSan Signed-off-by: Alex Bennée --- .travis.yml | 7 +++++++ 1 file changed, 7 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/.travis.yml b/.travis.yml index f0aa37f2d12..2f1658602ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -152,6 +152,13 @@ matrix: compiler: clang + - env: + - CONFIG="--target-list=${MAIN_SOFTMMU_TARGETS} " + compiler: clang + before_script: + - ./configure ${CONFIG} --extra-cflags="-fsanitize=undefined -Werror" || { cat config.log && exit 1; } + + - env: - CONFIG="--disable-user --target-list-exclude=${MAIN_SOFTMMU_TARGETS}" compiler: clang From patchwork Thu May 30 10:15:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165421 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp773405ili; Thu, 30 May 2019 03:25:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRSj68ozagyWqQt++U6fUFrBVbI6xNoi9a/72zWoj9BLm84qbsmdxrnRcgB/w1ik3XclWo X-Received: by 2002:a37:ac0c:: with SMTP id e12mr2433936qkm.172.1559211959724; Thu, 30 May 2019 03:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211959; cv=none; d=google.com; s=arc-20160816; b=YqGSZIuFm39FVVfM73rTJbGa+RBiIWKnH5XioU4NhdaUn6ntFu14FRjEe9QyKdEMM7 jnVoZmdgcq7PawM/ReE+vYfuCGakSxN4KmacaoFp1adqHVn/hVGxinVVqGOzH8+vD2Kk mDqs7xwOI5Ex7QSpkr6wp8sH25PcuNTYHJ7zodWBQklerGv3f18SWZt5nwFfU1/Kg//B oZA8eeV2GMqDaDKdn5fCB0ICLhgargrLDK9o/nH7svCjwVNy6NtNeDC0zWiFf8Pxl6/O cOlwPmgJOFVM63/GqXRmG+d7oj1ARmpUQv6ml+lbKfTxxYSstebKaFvNM+bsO4J7rWJJ jbOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=xFNo43YFBlGXQTu9u+IzwiFY7MRIcliAhPyrexXbSw4=; b=w0lsiyrHtHDSqgvnvf28wqOwTVrzzlIMry4iPC/2jpqiwxklRYq+QqHCFZiIcpHgTX GEtaHm5jmpFbGVBdeLrCklPZFoWPfNaq1OR1cwbKxDPOD7rWOz2TNp7HdN96mAvIrBrO f9xOtt4aotCIpHy/dx9jeuNX95O1qs2w5uewnb5+T148d1lEIAOXKyw0Ei1Cv65Fjhk/ K0iA0nbWmGz5OpAPRRXIn8EYsDwZ0E30o566CAy/Pw9Ffognm9suD7FrxY7p+BH73ttT k6HWLVFyLtH+1i3OF/n9NFQwH2AuS3+FqsETb5p7kYmFL9AIvq/d1VL6yuxIvsf/kWH5 r80g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aGjwsyhp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l9si500677qvt.183.2019.05.30.03.25.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aGjwsyhp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFz-0001fb-7v for patch@linaro.org; Thu, 30 May 2019 06:25:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54389) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6c-0002f6-EX for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6b-0006aX-Ju for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:18 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:39185) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6b-0006Zh-Al for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:17 -0400 Received: by mail-wr1-x442.google.com with SMTP id x4so3823154wrt.6 for ; Thu, 30 May 2019 03:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xFNo43YFBlGXQTu9u+IzwiFY7MRIcliAhPyrexXbSw4=; b=aGjwsyhpJaISYkAKaegqef18bmnET9MGNJhLPvwin5OYecXdS5j8OilhPw2iOzIN5Z l6z3sNIxNC4428P1VhbmVEnBu70f5bB/ciSX8L4Y6wz+ICKS0L7wlKJfc5OrQJQteQ2R pezeixNxxn4Ddorw2qlh/wm5Ua+MWZeb56xtNq4Omj+7PQC7NDzPuUpQjRxRfGLOKYPH qoV4JeKcqok3eQp6JUbOMGVJdvlkW3RzUPF6IUS3CBReFtstDKmbTHYN8d6DCVutoV4e FriSvQmJFWux1UiDDtBjrM3ZMB4r+Zw32f8cHmruK2UT53LhMnZIiBMZ1q21N6bYbzhm I2oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xFNo43YFBlGXQTu9u+IzwiFY7MRIcliAhPyrexXbSw4=; b=h7u91pY74T8omO6V4HSt7ZPr+dIPlxJqZ3qffRA3ew61FvlEnSGBur/mk2earbyDzM QawGoqwZX57MAvAa8spmvADzCyQb51kSrP58ZA4hYyPMT495GIgmw7+SUCVCPCH3QBSj KM5bbQ4g5TrFqcaGQBfb56E1qpVpuyHoayHiWCOKfA6IbOHE3xuw25dZD7j4JSsu4McX /WIVEcJyd6CiZMQskN4ffO9Lm+XkQpMRVBwHJtjuoYzTmJ+PAIdPaiquq1BqXTbiVuNQ rQfKp63H/rt/P6y6qbTuQPK55+4mJn+YQcAdr0ctB5Mh+XxQRU8jhNQl77WmH2KmBNO7 2UJw== X-Gm-Message-State: APjAAAUlhq9QBW7d4cHRVqfsU6sxNhhAheDQ+aCiZ4/w7brKYDjRYf5p 1hGiV1EGStaD9eEJ2gkx9ZhMD/eDK/U= X-Received: by 2002:a5d:504f:: with SMTP id h15mr2043355wrt.208.1559211376335; Thu, 30 May 2019 03:16:16 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j2sm2338652wrx.65.2019.05.30.03.16.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C32581FF99; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:46 +0100 Message-Id: <20190530101603.22254-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 09/26] tests/vm: Use python configured on build X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta Changed the vm-test makefile to execute python scripts with the interpreter configured on build. This allows to run vm-test targets properly in Linux distros with Python 3 only support. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20190329210804.22121-2-wainersm@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 992d823f6bd..6f82676306d 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -35,7 +35,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(SRC_PATH)/tests/vm/Makefile.include @mkdir -p $(IMAGES_DIR) $(call quiet-command, \ - $< \ + $(PYTHON) $< \ $(if $(V)$(DEBUG), --debug) \ --image "$@" \ --force \ @@ -46,7 +46,7 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ # Build in VM $(IMAGE) vm-build-%: $(IMAGES_DIR)/%.img $(call quiet-command, \ - $(SRC_PATH)/tests/vm/$* \ + $(PYTHON) $(SRC_PATH)/tests/vm/$* \ $(if $(V)$(DEBUG), --debug) \ $(if $(DEBUG), --interactive) \ $(if $(J),--jobs $(J)) \ From patchwork Thu May 30 10:15:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165423 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp773649ili; Thu, 30 May 2019 03:26:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgaGknekG0gikT+xOhopGL3CjnlaOSDNxdEwEko7E2PQy9p7mKxcNldp/UDjN5/EsejaT+ X-Received: by 2002:ac8:336a:: with SMTP id u39mr2657194qta.178.1559211973883; Thu, 30 May 2019 03:26:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211973; cv=none; d=google.com; s=arc-20160816; b=L4RRLwy+rfXPPXKDPDqOG0EvzqMZmIAdLTbilyHVn0aPVt6bP0SmPuhpE+2/8DFRrq vJqolAzDXBWGZa5sqVTAlh8BA1h9eJ9LuK1TXCBcO1e8Wt8WW240BzXtMrQMAaqRX+nn nOWpRmP7QmORV5+XvMhS01UvVO86h5QSEFM0MzWQnJd2h3kkN4Mj+GgkoPrDCukdevgR GXP+qFIgxtRzzEw66Oz4LZV1Z7D/F9OLwMVC6BfGjjmCJ2wwua/QbkYYn11csf1Tpnjh ve03Aq0j+hjO1epyEs0DTfRpS87HFt4n1JRYEIxtKSGV61q4RGXdfbSuKwDvcno2lSIj h+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=VBYJNdKck0NWEjbEOdu/UU5WU/f6QnZI7h23fVKWf28=; b=RfiF3QzVR1Buz99c4pyOGK/b0zHrKF+cqC0of3Qnmd9wwFB4/VI5ddwgdC50sXh7SA f1PLfMPUgvUtS7c7gXGsEx8KC4DGEXgrRC7gCnK9NhYmjEPoQl+hPL56mqarLfURdEoe EjyAxKGnQOmq0MlpSxapT2CBfWlkYXJmGKHyjCpXihJqOngjqDTS5p9TBnccvZtHO2sN WLy9ZG7+brIHV0+qQLwnDOEuggf4c/zhIWFOtpgt+dvCdgoGhH9uDHTY780J6HnRMe1V OVkmZCAHOcgBr6bBgD1TOW/TjeUFILyYQdl8Zmskb7jIGpmTunhq02JdUgUzx5Y485Ve B3/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L+hNcliv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v11si1413659qti.99.2019.05.30.03.26.13 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:26:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=L+hNcliv; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIGD-0001rM-Ay for patch@linaro.org; Thu, 30 May 2019 06:26:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6b-0002dd-3r for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6Z-0006Yz-Ng for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:16 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:38314) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6Z-0006YD-HC for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:15 -0400 Received: by mail-wm1-x341.google.com with SMTP id t5so3468383wmh.3 for ; Thu, 30 May 2019 03:16:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VBYJNdKck0NWEjbEOdu/UU5WU/f6QnZI7h23fVKWf28=; b=L+hNclivWdfxNoKP9Bg5hf2z80o79jIPVIg4SR5HEfYzUFc0vWnf2F0ue9qFLldiEr 4yetA3dJhZqKAfepklZYFmo3CBXUB7GQMX779pmL7qUCq2OcCUO96v41Oj9fYvhfh75d Ir5YciGcITLKee7uQfSBYGC7EIQwgO8+gPNoiH9ppdsNdqLHwm2cP4eUeWREWkMAJWux U34GYK2BWqxf3aWSTlkA5QK/wrGRnVncjLDlbe68dv7XghiQVQyUIatFosPGgYWWpspx aDL9dcVlYmOxUJOHm8ASEM1sR6cZHLV8plAYkZ3hksyqP1csrWrUo8SIg8gRDsIWEW/9 ur7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VBYJNdKck0NWEjbEOdu/UU5WU/f6QnZI7h23fVKWf28=; b=tZ0jFSZj1rZ/8qDXBfFpoC8VSqKi+amoTlpTRY9Ii58J1dp+iiAdrKRiF9rtMeByLi dmfXZYXYEobVO3dzc23trAVKEWlpnsiljkd+0Nl3zwN8zRFoZK1HgZjUbzCK72Ven7kO 0Z0N9GvZEKwqkRYM1Nvd3bOnzoLLOUR3Ivl66UaTGN6kFdXKVdVs77IHpMwP1tTZKcBF gvBOAjxczYiNlmRcz3sbA5fa2TFmNIaBPpfgMNad2nqAnGpTzpK8+uV3Yxc9J78U0Gac nnhD6EoHocXFbyRnfNCZAxsshmX1r4rEkgYAK+Xoji9gQbkuj2f+/aYPgie2voQrvwi1 1YbQ== X-Gm-Message-State: APjAAAUymBS4Reb/jtuk0Nba8+u+cuXGyo9X9moVRbkWFV4mz9EC8ns0 LSH5LUFgQbZ1YxkwYl9BCyBf8A== X-Received: by 2002:a1c:e3d7:: with SMTP id a206mr1840893wmh.7.1559211374442; Thu, 30 May 2019 03:16:14 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id t4sm2364980wmi.41.2019.05.30.03.16.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:09 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D623D1FF9A; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:47 +0100 Message-Id: <20190530101603.22254-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH v1 10/26] tests/vm: Port basevm to Python 3 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta Fixed tests/vm/basevm.py to run with Python 3: - hashlib.sha1() requires an binary encoded object. - uses floor division ("//") (PEP 238). - decode bytes to unicode when needed. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190329210804.22121-3-wainersm@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 Tested-by: Philippe Mathieu-Daudé diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 0556bdcf9e9..083befce9f5 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -85,12 +85,12 @@ class BaseVM(object): if not sha256sum: return True checksum = subprocess.check_output(["sha256sum", fname]).split()[0] - return sha256sum == checksum + return sha256sum == checksum.decode() cache_dir = os.path.expanduser("~/.cache/qemu-vm/download") if not os.path.exists(cache_dir): os.makedirs(cache_dir) - fname = os.path.join(cache_dir, hashlib.sha1(url).hexdigest()) + fname = os.path.join(cache_dir, hashlib.sha1(url.encode()).hexdigest()) if os.path.exists(fname) and check_sha256sum(fname): return fname logging.debug("Downloading %s to %s...", url, fname) @@ -134,7 +134,7 @@ class BaseVM(object): raise NotImplementedError def add_source_dir(self, src_dir): - name = "data-" + hashlib.sha1(src_dir).hexdigest()[:5] + name = "data-" + hashlib.sha1(src_dir.encode()).hexdigest()[:5] tarfile = os.path.join(self._tmpdir, name + ".tar") logging.debug("Creating archive %s for src_dir dir: %s", tarfile, src_dir) subprocess.check_call(["./scripts/archive-source.sh", tarfile], @@ -204,7 +204,7 @@ def parse_args(vmcls): def get_default_jobs(): if kvm_available(vmcls.arch): - return multiprocessing.cpu_count() / 2 + return multiprocessing.cpu_count() // 2 else: return 1 From patchwork Thu May 30 10:15:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165426 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp776196ili; Thu, 30 May 2019 03:29:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4Rmir6vMNZYOx96EFNFPxGE671AINtQBgKsMXa9k6iS+xrvgdAPJsMfOMjW+P1GWDzT/d X-Received: by 2002:a05:620a:15c1:: with SMTP id o1mr2371822qkm.299.1559212142827; Thu, 30 May 2019 03:29:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212142; cv=none; d=google.com; s=arc-20160816; b=e+MtFtsJL7RkVGhFAcVyWvyjHsuMttS3PBpJbpoP3tPxOkHgROqInaNis/h9lH2Zor fIUrgkRttJnbFT6d0XKfR2kd/gHUW07j4qvjaYRij9OqqBsZwAq1Hwi1REYAEjS1mtut vH7eefmxuzT/s/f9QBZTd0Er0zH3QQuUMG1GgRpfoNOA+6HOh/xpQr0Dtx7EKtgpDKNw zUud2NwrgRWC9E94I6Hy1X5zyipE4stYCOU7B747km9PhL0Zzc7x0ZYGkdRMSowdblVC eIkgxmjb0xxItaJseDFWI1ICGO0FPfZFH4gZNtsK1xdSXX/Av+Zr+6fs9SLM1LWqFxHH d5Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=DzRVR0ExhRGQxByUv2nr/r2y2wqFk/czcVmFguGzwdY=; b=V7rcwsVwIcd+IQ2MVFJtyZtmTEWyHv6bgU1w62+2DbNll8juPatf5eHeQTbBoEarvz IYS5U3Qv9ZwG2HeqyscIEh0OK3Lo+CFR/f+a9ElbMDUOj1eOuT55lfk3FnIbCz18Vwli uX7ufc4Ufe4ac3kK+hMzVKNM1zTM3ET6jDib1Lsm4xUB4QxXDV5qyv8k6sMuSgbY7e79 NPTxN38jKeeci6H41TnwcINnqjJGIB12hKicEtmuinKkcilAi2ZINDXwiUf2AKsVmdPt UYqYKJD4imgl+V8ZjHu1bgQEJB5EvEdL5ecc/Pd/gg5x4d84NnlnyODDCNn8Eb5kVoBH WqGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RdP14LNO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q51si919444qtc.370.2019.05.30.03.29.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:29:02 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RdP14LNO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50719 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIIw-0004Pf-AF for patch@linaro.org; Thu, 30 May 2019 06:29:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6e-0002gc-0B for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6d-0006bi-4V for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:19 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6c-0006b5-SU for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:19 -0400 Received: by mail-wr1-x442.google.com with SMTP id m3so3829115wrv.2 for ; Thu, 30 May 2019 03:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DzRVR0ExhRGQxByUv2nr/r2y2wqFk/czcVmFguGzwdY=; b=RdP14LNOerzbqEp1tTroRRiVS7bA7UBC9UFnl1qdwxUFoUTbHJiokmedvonwoFAK9h svvAk61R/y5JcfxyI9ZyDTK/MRqY24Sqgu0JXNeJ0OxcU5DSl/KNWQZ0e6ds3xMNt4u+ RHk2qlNNmDCURKd8lpOeqrtex3kemf54jHZpw6c/Iol5wzzDaj6BT4Iv6ZuwSqL1A1/Z ct4r6deydGD0uezL2mgsr8wD2Uoi9Ez03bU+3kHy52G3uT/uEUYoc3WLlb7Z9ROdhLRb k4q1XFF1wdIXd3szo7nAfz6YVJX+8fwgd0nXDTdOPCL1KEkKzkejhzx7Zz0tT7rq5M8m 9reA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DzRVR0ExhRGQxByUv2nr/r2y2wqFk/czcVmFguGzwdY=; b=agjecLv99QkjPUzYchKT4Tk5k0s8YQ2vqa7sambCtZTLNyjOD/AHvjlscL02r5Zjku LFehZc/Y4vhFFHf/6bEMZeTvp16+tDbOWoNVwSgAt55FuSWOx2DXsWlZSI304ZEISqY1 6WWlzv4droPKhjNE91rePDN5aPVazPQ/L0tUg3SQDJ863bxnTs956J3cflASUA3wKgoX ZqfXpQqyWTACAb8LlZ4mx/JN68vesmiFk2S8DUQWDZNwuF/hKZlNRJw4VTI0sXVkp+dE ZBVsiWB/ug4+xsba7E+Sxnd85PM3tv3vKjix8j1p8wCPYq5tLAOwk6hhPGrOPLJlg7XJ CfBQ== X-Gm-Message-State: APjAAAVbgfViFIVAJFmXQk3W0NbWP/qaojUP7ngrNyyOe+TpqJcpchuO uoMp/MTGb8YZ62CmikDwUpuDBQ== X-Received: by 2002:a5d:694c:: with SMTP id r12mr2152352wrw.214.1559211377929; Thu, 30 May 2019 03:16:17 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f2sm2888915wme.12.2019.05.30.03.16.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:10 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E9E961FF9B; Thu, 30 May 2019 11:16:04 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:48 +0100 Message-Id: <20190530101603.22254-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 11/26] tests/vm: Fix build-centos docker-based tests run X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta `make vm-build-centos` run docker-based tests on CentOS. The created containers should have network otherwise some tests fail. Also fixed the BUILD_SCRIPT template to correctly evaluate "V=1" for verbose output. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20190329210804.22121-5-wainersm@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/centos | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/tests/vm/centos b/tests/vm/centos index ba133ea429a..7417b50af4a 100755 --- a/tests/vm/centos +++ b/tests/vm/centos @@ -26,9 +26,9 @@ class CentosVM(basevm.BaseVM): export SRC_ARCHIVE=/dev/vdb; sudo chmod a+r $SRC_ARCHIVE; tar -xf $SRC_ARCHIVE; - make docker-test-block@centos7 V={verbose} J={jobs}; - make docker-test-quick@centos7 V={verbose} J={jobs}; - make docker-test-mingw@fedora V={verbose} J={jobs}; + make docker-test-block@centos7 {verbose} J={jobs} NETWORK=1; + make docker-test-quick@centos7 {verbose} J={jobs} NETWORK=1; + make docker-test-mingw@fedora {verbose} J={jobs} NETWORK=1; """ def _gen_cloud_init_iso(self): From patchwork Thu May 30 10:15:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165415 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp770197ili; Thu, 30 May 2019 03:22:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrsoq+GvUSUMRzJiA8l1LXHR14e3Ocf2U5qxvVUb4qEY/xqNNvAkNn3MFwPTqS8vJwZgfR X-Received: by 2002:a05:620a:232:: with SMTP id u18mr2405230qkm.131.1559211759430; Thu, 30 May 2019 03:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211759; cv=none; d=google.com; s=arc-20160816; b=tFasxea/kAV+qEFlsvu3heyww2LaBbMkUiMytMX8bxjQFDoXZ8bvO96Hyb0DrPeSY1 SgS/aDfh1Pl3JhvjYe4eh/poQsWRnDK04ue2gkhKE4GE/0oeqwf2c0MXfIncWcbgtiof NuQMKOtJbPI1rIgqVtOHuofRHCiMIhrZIQyQbQ/jtBMIXXEjeWmxTAGPxkfHTSbPtmYb dnyLe2nfPb56YXOi4bQUBIO2QHicjsE1hpzQzHLxmnmr9diEaRi+XxI26O7D+L77w+VJ G8ntpk4v3CIE/9RU8+EffkH6I8FRWhIFEqRYR8XL5J17iRizvYNUK5WjMuq94OcUGeHa EVvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=zHc+QewZiPLzAKrh7Ap5biSxTst0S3+b8dtoVpxzoyo=; b=F8r4+2PgiCc3QTCj9cvyzNHFkguRyq+W9lmhL401qvYOSJjBBOLwylgkk7Re5PLkaH waeL9VjqijmORMypVmsk2ss2Pb5eqjnYjVH+1Es0S01ijHFFE3FUuRZby0AVQRGG2RRF VIL9FGI6j4QLTH881Lj0by6Dm9tbHBSsjZUTl7SbDt37es1QFUhVE567WajTmHolA9i3 IjXji2sGHI1ZIo7Bd4Boe9ziGTPepGXgI5HGMcd/d9IbBGR8XehZru3Vb4mBT+yw1qHX 4I40NZLXS2auML13itmSAghRZzU1cGvmGkU5twgYwH6/31s5tviJnlLbxKThRs/mFeHg s6eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aCUSwaMJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j14si1356220qkg.212.2019.05.30.03.22.39 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:22:39 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=aCUSwaMJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWICk-0007UP-Uf for patch@linaro.org; Thu, 30 May 2019 06:22:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6d-0002ff-3j for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6c-0006ao-2t for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:19 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:39175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6b-0006aH-Se for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:18 -0400 Received: by mail-wm1-x32a.google.com with SMTP id z23so3459874wma.4 for ; Thu, 30 May 2019 03:16:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zHc+QewZiPLzAKrh7Ap5biSxTst0S3+b8dtoVpxzoyo=; b=aCUSwaMJHXE+rRG3Ku2QceQq/98HeRQvRONO/R1BIQnVG1jeFIsenqNU2jnpL0T2ZR dJgxHo72vXx71eNWJL6906Jhbtz7kCkBlK5hAr/8OGWlMA8fNT70v3V5LBMjUujpICOt J4Slyk4z+Nss4WmEAqhnOs2e/vGKirgumAUVWCi0rcjG9UUrzD3AKZtGFm3b6qExo9eD T+qWDkaR+ygFV7IjU0Dm0cF0gNRFkPlAXIg43+UfGpGFp5yFBlDf0xtfXKEW+1O8z043 YT06593rCtvOeKfwp9wS1LfhB1wA0oX6wlct4ZPcIN+0uHll2F8LpG+bnbkRmaBtnAZ8 flTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zHc+QewZiPLzAKrh7Ap5biSxTst0S3+b8dtoVpxzoyo=; b=iU+wpEwofmiGF6KZMcju4eTgyhrPnL1OKKSVkH7lMUrtm20yWE0JWgWTfj75hopztT KCLE1h3eVaacUbl2rXyJjreaiZZnsfnySJ/9ORnDQv2XISWvQXRvURVrcZr+tWIfMGm8 ubjG9RmET8uA+xri7rqgRKgheyGItKPQbj+xyWRQkP44D+43ShH5+9bO/fR/IEo83hFN nlnSsCyWsYxiNRh1+caGKnlf0LfoSCUU9QRtDzGimhs0ADf6xC0Pn6DITctUPAhoD9Sz d0WMMp0kaqxbC48+7SwPtbASHsv3bQgG+Rv4gU2ZTY/zqzeZDTNxO4BEYEBjhICv4cqL YM9Q== X-Gm-Message-State: APjAAAWfI49mGGixaRG7Ut7PSC9TVE/Uaa3ZJdspkH/tzZZMFoHKzkVL CgopxEt8QyffvzgJxE0qH1J98Q== X-Received: by 2002:a1c:e109:: with SMTP id y9mr1689806wmg.35.1559211376798; Thu, 30 May 2019 03:16:16 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h8sm5024657wmf.5.2019.05.30.03.16.08 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:10 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0B85E1FF9C; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:49 +0100 Message-Id: <20190530101603.22254-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a Subject: [Qemu-devel] [PATCH v1 12/26] tests/vm: Add missing variables on help X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Wainer dos Santos Moschetta Added description of variables missing on vm-test help. Signed-off-by: Wainer dos Santos Moschetta Message-Id: <20190329210804.22121-6-wainersm@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 6f82676306d..c59411bee01 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -21,9 +21,13 @@ vm-test: @echo " vm-clean-all - Clean up VM images" @echo @echo "Special variables:" - @echo " BUILD_TARGET=foo - override the build target" - @echo " TARGET_LIST=a,b,c - Override target list in builds." + @echo " BUILD_TARGET=foo - Override the build target" + @echo " TARGET_LIST=a,b,c - Override target list in builds" @echo ' EXTRA_CONFIGURE_OPTS="..."' + @echo " J=[0..9]* - Override the -jN parameter for make commands" + @echo " DEBUG=1 - Enable verbose output on host and interactive debugging" + @echo " V=1 - Enable verbose ouput on host and guest commands" + @echo " QEMU=/path/to/qemu - Change path to QEMU binary" vm-build-all: $(addprefix vm-build-, $(IMAGES)) From patchwork Thu May 30 10:15:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165430 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp781561ili; Thu, 30 May 2019 03:34:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNF8oMPW0HxQfi11juqjfuLc60FQwMSaRgRt3UcUS303zOQQ/KuI1UT5EunU2ZsTh3uMc3 X-Received: by 2002:a0c:8a8d:: with SMTP id 13mr2638037qvv.88.1559212443981; Thu, 30 May 2019 03:34:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212443; cv=none; d=google.com; s=arc-20160816; b=q91qaWWvnyMpyW9yYZM4ki/wMQ1HahZAhhBUHAWekv+ykpxEvJ0gdPcSx/S7pj60sg jX78n4UMU52ryb8aVWuNx+PQbQLDd9gx3i9KTyFeZTbv+CLnzjUmrTqdjWBo0JUssbQB KDUL0hAWR7qU/d18ifarkvIELvCZ+rtAQ2Rp9xs7MWjwrclDio2PU7ExIFCkatUAzaEX 0sdiXnruI4MFZub+1TgZ1oWcNbiA231IWg0odt0N8TnZfqmyLuy1CryxEZQUKp+TYAdw OeKLb653woovSJZ3Z/dq+zZioS8eHM2wNxd675g1Mbs8eghKR3DM4/1sjLEJwg3vI4UT Ya5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=y2B2y1XQyJxhlxlLqIvvLBXxQCmx4xrmH/BIjlRjWcs=; b=esbD/GUXZZ6AGldq49xm6r4J7bhJExcPRp2UsbNHh9JXwPb0uGPpK7/1Jyy6awiuMV 6Pt1NBSd69UbyZfEPJVgBwufLpGFz+xvwtQg5vRQwXVwAXzDSZWlRdBT+UXrxyVrOcxB aATYLwQ31WfvGFRgP41epBZCL+7lMOVdUmwQYrGTGaliqjxJ2HnuK2wc9xNSMOz0cD91 QgqMxJggBHmSNJj4V1InSz0o0ZQ+FUQXatZt9ih1xc0bBlvM3qw/A7Hr7fOuUm4YCAWx xHuLgrHyudmnewaWLwpQKSpoa/Zz3J1kvJyGHYe/RWfFXmczUjYuHZ44WJnNTM/kcIiV WCnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f0wR+s4P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y203si817350qka.30.2019.05.30.03.34.03 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:34:03 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=f0wR+s4P; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWINn-0000D4-Hh for patch@linaro.org; Thu, 30 May 2019 06:34:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54434) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6f-0002iD-7u for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6e-0006cZ-2r for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:21 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:39187) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6d-0006bp-Qi for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:20 -0400 Received: by mail-wr1-x444.google.com with SMTP id x4so3823233wrt.6 for ; Thu, 30 May 2019 03:16:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=y2B2y1XQyJxhlxlLqIvvLBXxQCmx4xrmH/BIjlRjWcs=; b=f0wR+s4PFVjNDk4AMOB+0UFj5XJN5P3DQ+suNvlR1vlOZFnL/ZdlFwTdxwMLARF6Tr gpbCJkbLz95o0AgRFTltIfiu1vdPzisBn+wo6PNUqvmmm2IDVlZ6u4plFy3sxSzDDcRz Us7bfyFayZm58+kC7y40nKaa9aZ+wvtZe9cn53GsyUpLVMmcq0Dwa4kwI0SViCPy8fNy PwDRUw/YygeIiMlUo4GX13xiafwhWPlS6LljgFWIZNgVGArq5naOngOSj/5qyyRabV2X HGn3Y/+4XzA91bHjENRe9euUc9hHhVvM44ddQX9Jo8ZWJMkMkJz+CA+Q4UPo2cIB4vhm mA7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=y2B2y1XQyJxhlxlLqIvvLBXxQCmx4xrmH/BIjlRjWcs=; b=sVtUe1WaUcxvxrXyujWC57rj/tfdpyM2J4iR0EJUn8c3gM6WYs3YfJ7pfLfhg6AxXo Gg2zU96/j2HBGTbeVdwmXmhz84PHXE8DizuvrjrtRFEmBor4L9JJ4LU5s6fNTYGvhW+a uVjeDKNWGecYDsRiCvQk/xY1UQ7cWwnnE86aDxybE8wQgaCcsrdaffiyyNjybT40KBjW LFNeTR2W5rL3qXVm+WLIXoZlDwtpFyfyI1PqCBRGSkcS73gKtfADMtAZLk6KuTgPNK+I zH5NkGlXaV9SorGQU+l6xAopXAKD3rIzgg95dhvyoG1yADwX3Ofoqn2B6W6kCwr0QF5r bIDw== X-Gm-Message-State: APjAAAXtMJRgb+A51GJUB6R7YLimQdUY3W1qej7nUN5ag+eDA3gXJcZ+ NYtll63b243Wf7+wlVn+4Cz7y49DxHA= X-Received: by 2002:a5d:51cf:: with SMTP id n15mr958810wrv.216.1559211378693; Thu, 30 May 2019 03:16:18 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o4sm2355995wmo.20.2019.05.30.03.16.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:17 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 20DA71FF9D; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:50 +0100 Message-Id: <20190530101603.22254-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v1 13/26] scripts: use git archive in archive-source X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Use git archive to create tarballs of qemu and submodules instead of cloning the repository and the submodules. This is a order of magnitude faster because it doesn't fetch the submodules from the internet each time the script runs. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-2-kraxel@redhat.com> [AJB: fixed up tabs] Signed-off-by: Alex Bennée --- scripts/archive-source.sh | 72 +++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 41 deletions(-) -- 2.20.1 diff --git a/scripts/archive-source.sh b/scripts/archive-source.sh index 8b899482600..ca94e49978f 100755 --- a/scripts/archive-source.sh +++ b/scripts/archive-source.sh @@ -19,16 +19,25 @@ if test $# -lt 1; then fi tar_file=$(realpath "$1") -list_file="${tar_file}.list" -vroot_dir="${tar_file}.vroot" +sub_tdir=$(mktemp -d "${tar_file%.tar}.sub.XXXXXXXX") +sub_file="${sub_tdir}/submodule.tar" # We want a predictable list of submodules for builds, that is # independent of what the developer currently has initialized # in their checkout, because the build environment is completely # different to the host OS. submodules="dtc slirp ui/keycodemapdb tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3" +sub_deinit="" -trap "status=$?; rm -rf \"$list_file\" \"$vroot_dir\"; exit \$status" 0 1 2 3 15 +function cleanup() { + local status=$? + rm -rf "$sub_tdir" + if test "$sub_deinit" != ""; then + git submodule deinit $sub_deinit + fi + exit $status +} +trap "cleanup" 0 1 2 3 15 if git diff-index --quiet HEAD -- &>/dev/null then @@ -36,45 +45,26 @@ then else HEAD=$(git stash create) fi -git clone --shared . "$vroot_dir" -test $? -ne 0 && error "failed to clone into '$vroot_dir'" -for sm in $submodules; do - if test -d "$sm/.git" - then - git clone --shared "$sm" "$vroot_dir/$sm" - test $? -ne 0 && error "failed to clone submodule $sm" - fi -done - -cd "$vroot_dir" -test $? -ne 0 && error "failed to change into '$vroot_dir'" - -git checkout $HEAD -test $? -ne 0 && error "failed to checkout $HEAD revision" +git archive --format tar $HEAD > "$tar_file" +test $? -ne 0 && error "failed to archive qemu" for sm in $submodules; do - git submodule update --init $sm - test $? -ne 0 && error "failed to init submodule $sm" + status="$(git submodule status "$sm")" + smhash="${status#[ +-]}" + smhash="${smhash%% *}" + case "$status" in + -*) + sub_deinit="$sub_deinit $sm" + git submodule update --init "$sm" + test $? -ne 0 && error "failed to update submodule $sm" + ;; + +*) + echo "WARNING: submodule $sm is out of sync" + ;; + esac + (cd $sm; git archive --format tar --prefix "$sm/" $smhash) > "$sub_file" + test $? -ne 0 && error "failed to archive submodule $sm ($smhash)" + tar --concatenate --file "$tar_file" "$sub_file" + test $? -ne 0 && error "failed append submodule $sm to $tar_file" done - -if test -n "$submodules"; then - { - git ls-files || error "git ls-files failed" - for sm in $submodules; do - (cd $sm; git ls-files) | sed "s:^:$sm/:" - if test "${PIPESTATUS[*]}" != "0 0"; then - error "git ls-files in submodule $sm failed" - fi - done - } | grep -x -v $(for sm in $submodules; do echo "-e $sm"; done) > "$list_file" -else - git ls-files > "$list_file" -fi - -if test $? -ne 0; then - error "failed to generate list file" -fi - -tar -cf "$tar_file" -T "$list_file" || error "failed to create tar file" - exit 0 From patchwork Thu May 30 10:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165420 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp773397ili; Thu, 30 May 2019 03:25:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyM+g1vu5ZpkXBi2UhKI/YMmYqXolPh75L0739uMTezEwpJkvn2P7vPChZnSvKyQcJPwqyX X-Received: by 2002:a0c:ec12:: with SMTP id y18mr2568342qvo.178.1559211959160; Thu, 30 May 2019 03:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211959; cv=none; d=google.com; s=arc-20160816; b=lF2VkYGzfJ7SUdceaaclCR86MJ94oI0uec0mjv4lPyPkoRdtsc5WdIxuzYVL44kqWD jNjGowXscmH+R46SnzuoP02Yt1FnjWTbI1XQCNGFfSylzaLg3cznfBklYb6s5p95N0Zs jxA35N5LCYVknqNXDpWnb6+O9dGQKjDCrHnodw3/16MMzrqmVEae6IfaC30baweDKfSB kRPwd01Aqx6jxe4MpZqnJGy/6Wo2na2P6eE0cPqngMFRcjif7rFJV4lfA13YWeOetcTU rO1SQbiQsWBWM7D6nEt5V+TlQg12okrEfco2N76GtR9tjEs/BUs9ub+sgMrgzdEW2Aqi 0niQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=cCiZUh4L2IhfBkOcPLSzMZiMaGor1Q+neTC7jHeJYrM=; b=xffjCZshsAVyZMHY6HQtRRs9erULrH+dcAxGVmsF2uJUDmkoyQ5B+b1W3tIs64E55g rnUKR92ExGzcIPA39yv5HPcCWv8uPDY4V1gHLtg/q8vzDF2ewTfGEEecUMA4MMjwFcy3 Ozoxd4w+LNG+9iMOujOemAMdwdjk1PHC5ji+LyV+bi2yFf/RVWuBig1dWWa6qxj9ijEp rtrEQp2aJDIExmn0y36o91QC9E9OdpMmIwiwEkKTvFywFihZYv/jImX7tHrtov9jkONE jAtAcE6ETdk2bCiDcD0qtpdKVHMJezwIP7K3oS0ngz+xTinrY4fXnkDgc7eqS3Geaa28 X0Mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=O56u2QoN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f8si1327815qve.53.2019.05.30.03.25.59 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:25:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=O56u2QoN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFy-0001fS-Cj for patch@linaro.org; Thu, 30 May 2019 06:25:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFE-0001EL-Ez for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFC-0000Gq-VK for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:12 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:35939) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFC-00004y-NL for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:10 -0400 Received: by mail-wm1-x344.google.com with SMTP id v22so3489000wml.1 for ; Thu, 30 May 2019 03:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cCiZUh4L2IhfBkOcPLSzMZiMaGor1Q+neTC7jHeJYrM=; b=O56u2QoNY9oNO8vrbzs8wgl/wHsOmo9d5QufBecCQecm5KrjpChZR3S2U7kgXObvfR rMGKqnjBJDmXRpIpAAHwYH2npDiBOs+ww7v6n/xpA/w+k/2zHoNaVlAxe4r+vkPCpbZT egN9fcGcBhC6WYjYAho8ZG25WTGl+0tDYvpAPuKlLy1WoRSKbKVWLTMgneANYbWeJaZ+ yEyocS1D8ySUvO9vg3e3Mr7yYZTA56aIbP++3TJxDfxW5HzAhfITUHt9PF03YUxRCh49 6Yum5wjefv8ofdDmhH8eU91vKlO/NpuAJ6OtN16fB3nS036HoI5C2APU4XBgsbSbF4J0 eyPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cCiZUh4L2IhfBkOcPLSzMZiMaGor1Q+neTC7jHeJYrM=; b=eOtnPpI4G2qVVXcF1pkmq8V2jrXskSeDDm6E/vvwSpc1Umhh2oQXqQ3BPJt07CuDKf 6+ih07BEiHtGz4dS9HW0vLxHkvlqMyVK6t1alU6UMiv0Ta9S+sAfvdlJ42D3zeqcp73y EmEcwBuss4d+RxaYJ8O07ZXOlJ4yNVviiKjUhkKwkrff/KZu6ggW2S2qUnZ9tdK4H0YM If1/dLSdmgeBDVOKXGxUzBwRp/KDblvn8JO7hus0ji99PaqM1k+6hdA3lme4hiC4vIM1 fzcYrQe5Bb9WNDJuBCzm1lYTtlLiqxmImmEePacxpWl6OE9cojZBVg2bEwYK6kVM+vFB yPQw== X-Gm-Message-State: APjAAAUPppNzAiJLiIZZIP+W2zOR1RTm7jJOipj4wHFmBdTdFeiY1EkI 5fMyOqqxq23WuymbMisK8sGQ+Q== X-Received: by 2002:a05:600c:c4:: with SMTP id u4mr1809023wmm.96.1559211902477; Thu, 30 May 2019 03:25:02 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h90sm7115328wrh.15.2019.05.30.03.25.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:00 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 351D61FF9E; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:51 +0100 Message-Id: <20190530101603.22254-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v1 14/26] tests/vm: python3 fixes X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Add proper unicode handling when processing strings. Also need to explicitly say we want int not float. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-3-kraxel@redhat.com> [AJB: fix conflicts with tests/vm: Port basevm to Python 3] Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 083befce9f5..4847549592d 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -73,7 +73,7 @@ class BaseVM(object): "-vnc", "127.0.0.1:0,to=20", "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")] if vcpus and vcpus > 1: - self._args += ["-smp", str(vcpus)] + self._args += ["-smp", "%d" % vcpus] if kvm_available(self.arch): self._args += ["-enable-kvm"] else: @@ -85,12 +85,13 @@ class BaseVM(object): if not sha256sum: return True checksum = subprocess.check_output(["sha256sum", fname]).split()[0] - return sha256sum == checksum.decode() + return sha256sum == checksum.decode("utf-8") cache_dir = os.path.expanduser("~/.cache/qemu-vm/download") if not os.path.exists(cache_dir): os.makedirs(cache_dir) - fname = os.path.join(cache_dir, hashlib.sha1(url.encode()).hexdigest()) + fname = os.path.join(cache_dir, + hashlib.sha1(url.encode("utf-8")).hexdigest()) if os.path.exists(fname) and check_sha256sum(fname): return fname logging.debug("Downloading %s to %s...", url, fname) @@ -134,7 +135,7 @@ class BaseVM(object): raise NotImplementedError def add_source_dir(self, src_dir): - name = "data-" + hashlib.sha1(src_dir.encode()).hexdigest()[:5] + name = "data-" + hashlib.sha1(src_dir.encode("utf-8")).hexdigest()[:5] tarfile = os.path.join(self._tmpdir, name + ".tar") logging.debug("Creating archive %s for src_dir dir: %s", tarfile, src_dir) subprocess.check_call(["./scripts/archive-source.sh", tarfile], @@ -256,7 +257,7 @@ def main(vmcls): vm.add_source_dir(args.build_qemu) cmd = [vm.BUILD_SCRIPT.format( configure_opts = " ".join(argv), - jobs=args.jobs, + jobs=int(args.jobs), target=args.build_target, verbose = "V=1" if args.verbose else "")] else: From patchwork Thu May 30 10:15:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165425 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp776021ili; Thu, 30 May 2019 03:28:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqynvfH9ZUfT8t3f5o6yb/rLnIDWzgtH8JU2MdQ4JjIsJC0JgOikRTZSWW6ATjKO6Sb2G0ml X-Received: by 2002:ac8:6898:: with SMTP id m24mr2647549qtq.362.1559212129420; Thu, 30 May 2019 03:28:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212129; cv=none; d=google.com; s=arc-20160816; b=CoGSWjzSHqG2PfoCtpXc+NM7aSP2kg+nDidl/lNrY4tJMcmvqnVbwdGsn+1NnzRUMk SGs1MoVCNN0BfNWnqBwQC3w2rL+OoSKDKG7put4HU4xj/5pC0GAjDFfQ/UyE/2E78joi Ct/7RKbVDXaDswB02OzPx5HzlYRzEFwQraQeOfxnNWebWeVsKg45ffhUUuHPnpo5VMVR dm8O+mJWc3N/B/tlJLdkOWWSIJWyglSCx85LQaQLg/tPYgzTTExhnjiRmfm46Hm1FRH+ K90yXiyQpdeEu5NSvmQNDwZmzMoBKEfyWDG2BlrqmxtOnIMMRUScQU0fmpm5sGJ/yHqa E1Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=ISbSCiHJwQQH4YITk0tKqWHAoriU5RlDVxk4ZPctlqyBZ3raxLxuPae19c7NaDzH9Z ADRi+r3QyQEV3QQnYYL+knXJKeB8B+l6u7Eq/TPlLvXgadzcm2FuVmwn82HbOObgYUfE cysnKceNNBPyh1zSY+jHgWiW8Eas6DVHARaVecJtDemLXkIV28Mixx+vUyux+igm9JEv 9ztXDwAB5pJZismp0g2jA6u+i9LTr78pMqQi5y95yK31qU+Vw2K4e+SUwCW2soORcC4P gcpcvLYEmWZZzEagy7pIrGc0gpaXP2s83W8FCpdTmFXIp10fc4b1NXWM61n+3GUIBHT5 vXdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tXn3mjEu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k14si1471908qkg.36.2019.05.30.03.28.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tXn3mjEu; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIIi-0004Cs-RX for patch@linaro.org; Thu, 30 May 2019 06:28:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFE-0001EH-BS for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFC-0000GS-TQ for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:12 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:35342) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFB-00007H-RY for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:10 -0400 Received: by mail-wm1-x342.google.com with SMTP id c6so564940wml.0 for ; Thu, 30 May 2019 03:25:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=tXn3mjEuMwSRnFRjLzCtDSFvdXivMZdk2BXVccr37weXGO8Odahf4ImzjpoAsiXLzn kkma9tEZYI9TF3sQXR4Fg0k/wGJSp77b/35eiUoaF9M772SUBet2i7JPLq3iiWnIstif veJ+LM7K3S2kFAap0cW/qKP816kRQIW4RV+n6ajayUFeJc605EJT77+5fSLwjTRVQHM0 ZoM156VcLNCEm0ZMmysjcbxW3GZvvtGK/JswnpQFeKLSChdncboL/pHRBihAZ4wfN93m MFVBTC6FNZwS2/B9lE8novrMxwtCDPnBhxaj1Pc/1CRU1xPusDnx0VHHH07La+x8Nhqm PFGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tKMybXLMRDSBfHxe/ATk9ylSYfLE+dz7XRu9VYKxKSs=; b=MF6nCG9gLfvn2jfBDdQfop/nP+boDLelgnYapx0nU77dsTnMwXa7vSFfV4Seo5AO/p Yfr7xZsk1i/7i5eDLTNfe/qaZsTW32DsTWvLIfSZBQ163IbP1X2EoZmr3kGuo5+/wPOb B9RGeicn+mLu05fip0dZqvDmhq5wCaab57UML+mfO0OKj1LQDw5gResM2Ep86UZl/r/I +z6Jkrzeg6kiF3DgMk175pA0I0nM+t2aNtuS3I57bwENzaPfY7NX5OB7br2fuvhsB3tw kysSqPO0me4/PNDF4drf19TylXu0t9ag7y2+MPv4aiNFJzWncXOLMxbiATMyWifg0wzn HsrA== X-Gm-Message-State: APjAAAUrsj8pR4kke1J93gen5hJyyWzc4ECM3fxNZ+4CS5GrO1M2+AUr BShXzLYBqMQrJeXmz8MPuasTNw== X-Received: by 2002:a7b:c043:: with SMTP id u3mr1259501wmc.56.1559211905274; Thu, 30 May 2019 03:25:05 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s8sm2386491wra.55.2019.05.30.03.25.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4A9231FF9F; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:52 +0100 Message-Id: <20190530101603.22254-16-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v1 15/26] tests/vm: send proxy environment variables over ssh X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Packages are fetched via proxy that way, if configured on the host. That might be required to pass firewalls, and it allows to route package downloads through a caching proxy server. Needs AcceptEnv setup in sshd_config on the guest side to work. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Message-Id: <20190520124716.30472-4-kraxel@redhat.com> --- tests/vm/basevm.py | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 4847549592d..5e30bac6615 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -38,6 +38,13 @@ class BaseVM(object): GUEST_PASS = "qemupass" ROOT_PASS = "qemupass" + envvars = [ + "https_proxy", + "http_proxy", + "ftp_proxy", + "no_proxy", + ] + # The script to run in the guest that builds QEMU BUILD_SCRIPT = "" # The guest name, to be overridden by subclasses @@ -106,6 +113,8 @@ class BaseVM(object): "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", "-p", self.ssh_port, "-i", self._ssh_key_file] + for var in self.envvars: + ssh_cmd += ['-o', "SendEnv=%s" % var ] if interactive: ssh_cmd += ['-t'] assert not isinstance(cmd, str) From patchwork Thu May 30 10:15:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165431 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp781940ili; Thu, 30 May 2019 03:34:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxv275xTpkw7DcsglMzwfy7c3QxTcAYTdLXskRBn/bGec3zDGbtaX9FBSFWp3LWbVwOPoYG X-Received: by 2002:ac8:74d4:: with SMTP id j20mr2623467qtr.372.1559212468058; Thu, 30 May 2019 03:34:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212468; cv=none; d=google.com; s=arc-20160816; b=Q8/Y1jug7DEsNcY0gwlSNfg0OTen+AJEM8xXND099iSVMMGOItheSIWv3XzhcMPE+R DxSN4zi59kWJWiAiTmLT9i1kXCFh+9cBXn+liELpQhvDqB/Yypg+/7Z+wxJ1tE1RqonG yQN4TeCVjf33gyTpWv398vQPFJwp7ugHplXLNGSGB5Y+IzmSggpniSv8ReH39JO+u3s5 AF4qZNStbA/XgbSbSkKXwd4xe99zskLtS0kQS0AC1FA1s/5IUCAyY30A7DJDCcug+1eZ iah0CqHh6WjOjpVNfSJupWU419nyQEnVK6sBAqJFOeuIBe0pC0v40XgA9EQaXHXG6gEg XOvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=9J8E5pdedqRlrr8v2PQK1sYVyobiXRzGN2v10P6ZPKk=; b=ztRqDEsONAn2f/k2YCiud/OuJHoSHGFOVULUvZO6PSFjMt7aYkdjmZsJo+prtk66Py V8ylDBOZQlkxZwgk6Pv88b4zKUNm0BldHXFpBXA1t4XltVl4afVwAEVqtu5TTUXPZfRC 3Wn7YKIOMqaoZy/gjqxDuFJATNqseag5j8UDjHjcEDqQpY/EXM1GKQ8DJzQBTCL3FzhO RNqqLPXUUDSKyZFH3Vh819ibuhbgToU2jv2VEqx4t1uthvhx19Xy3YymiJxWxY+Ze26a XcaLciJzvi6cfq99Uxt0m8QNZPn7DLYIFaeiW1UYYysAqyR56i+8jUcBj8H2nVNr1frC tUpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tMhGNvsX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d18si1409108qta.389.2019.05.30.03.34.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:34:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tMhGNvsX; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50907 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIOB-0000G6-Lq for patch@linaro.org; Thu, 30 May 2019 06:34:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6g-0002jI-5c for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6f-0006dY-6O for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:22 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6e-0006ct-VY for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:21 -0400 Received: by mail-wr1-x442.google.com with SMTP id w13so3790631wru.11 for ; Thu, 30 May 2019 03:16:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9J8E5pdedqRlrr8v2PQK1sYVyobiXRzGN2v10P6ZPKk=; b=tMhGNvsXWK1d8mDUvvdqV7C9zC2/n+/THau0y1371lKEvNRNUKDZUQ9Cy6q6uSZWKj FVByZuJI+k8nOrf4FKdJNo/EyKYe6cEq2n3IxVL+an7Xm2/XiL1P1crZWLRi00Y5ALyT YGV7zudJQnKsGm1UTeY/vTNo4vS6yjdvtaEhU3miGYxqjF591oU/ZJOsxOsglfUgsAT2 zD86++d3933l0kQQbth+3eJu2ciEiK0DOXZSkUwiP9gF0b6YITdfb5LDbL9cNxefD3B1 LeDt2h6ZKgafBJR7oinzDcEhX9cejKyWtlnnpYVFNh8+zKwJhMgOigVK+6UMvMNpyqs2 7oHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9J8E5pdedqRlrr8v2PQK1sYVyobiXRzGN2v10P6ZPKk=; b=tqHgcfXcWrDZf2I1MWMkuqMlyfvzfT3Qqsfoks+jswxS665ljsLM6ZKuyxxbRZLy2H Q6uOMT9IMzlVR9aWYfeSxMQCQPLMmqcsiLnSVR+B/Rtd1Vie4/KKoqNDPxqVPncA0UWH RohbBrMQ9bLMHksI+PKKL5k/7VepWq+Sa1MnhLH5AhNSOcMGwjQIt3OTTp+7Ce1pZtty E/4ExAzyiPiEWUqo3QiabTIC12gQk5k/B5AZB897FEuKyHjrbhKzhDY9E96vtBF+jLMb oLA2fgYXg3UopHYd++n6uOt1fxyjagU5UQutHycPnxCVBwap+cvox5iL/kme1kfA37Ix XBtg== X-Gm-Message-State: APjAAAXPaIZCJVLHuWrg5uA0W0oMqYbIzsVoEQY09WY40A+cV1zTEI7G bx/bwECL7wsPSMCfsFy2NYZLJDeqAGM= X-Received: by 2002:a5d:638a:: with SMTP id p10mr2048522wru.273.1559211379486; Thu, 30 May 2019 03:16:19 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id 32sm5445495wra.35.2019.05.30.03.16.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:17 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5FEA81FFA3; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:53 +0100 Message-Id: <20190530101603.22254-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 16/26] tests/vm: use ssh with pty unconditionally X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Allways ask ssh to run with a pseudo terminal. Not having a terminal causes problems now and then. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-5-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5e30bac6615..395eefaec94 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -107,16 +107,14 @@ class BaseVM(object): os.rename(fname + ".download", fname) return fname - def _ssh_do(self, user, cmd, check, interactive=False): - ssh_cmd = ["ssh", "-q", + def _ssh_do(self, user, cmd, check): + ssh_cmd = ["ssh", "-q", "-t", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, "-o", "ConnectTimeout=1", "-p", self.ssh_port, "-i", self._ssh_key_file] for var in self.envvars: ssh_cmd += ['-o', "SendEnv=%s" % var ] - if interactive: - ssh_cmd += ['-t'] assert not isinstance(cmd, str) ssh_cmd += ["%s@127.0.0.1" % user] + list(cmd) logging.debug("ssh_cmd: %s", " ".join(ssh_cmd)) @@ -128,9 +126,6 @@ class BaseVM(object): def ssh(self, *cmd): return self._ssh_do(self.GUEST_USER, cmd, False) - def ssh_interactive(self, *cmd): - return self._ssh_do(self.GUEST_USER, cmd, False, True) - def ssh_root(self, *cmd): return self._ssh_do("root", cmd, False) @@ -284,9 +279,9 @@ def main(vmcls): return 2 if args.interactive: - if vm.ssh_interactive(*cmd) == 0: + if vm.ssh(*cmd) == 0: return 0 - vm.ssh_interactive() + vm.ssh() return 3 else: if vm.ssh(*cmd) != 0: From patchwork Thu May 30 10:15:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165424 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp775976ili; Thu, 30 May 2019 03:28:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyb/HAxsvi6aUKnlQ97EQYGiSiehlThcu5b4P8EgelL4Ys1nQWNmMu3Oym4rD3dwLZQ97LB X-Received: by 2002:ac8:381d:: with SMTP id q29mr2628202qtb.347.1559212126419; Thu, 30 May 2019 03:28:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212126; cv=none; d=google.com; s=arc-20160816; b=NxX3SGqq8NeO+NSXgul2S3yTKLqYlsEYKao6kaATIS7c/Ky6WTDI+S8PebwFW7Ez5I IIPlb2F39Y+43ISM2tUvef9QAqZF9RLSfGFeyruzZi5aUFdpYwMsTCkMPExxfTxPLMAD AUXKfkDRxBaux2CVxGdSJdSsDk9n9LifLSU5Jo1d9qJ43Vu8JNltg/gtJOCPMplCAoN0 vs4N4rwpZPa5fHKDfy4bQn6CQJbHx6i7k6TnJIl3EO0ucNuam1oyJu/MoUzXjrj6vvJa OasnFUmJY7IGo1/hSrUY189Pn51NOo/FhGLxiNO1oTDCsvniHjH9KrE1H3IYF2byyPm/ W2jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=f1LzSCynUI6fUnn106lFa25PqYUY/YDKYZafY8tD3Yg=; b=b8Kns7lwSmuLQvSZsJU4/7+QsRSIO2LUT0TTXta3vy5ie32ruU4fRLPun6fYXndTa3 A81XkgoZxVTFv3BIyt8cGo4sGFNMWblQ5foRRbAEyO5+Mim+Ou+I51HU5FHQEKksZC8p eXp47nKgoFkMHe8x6tT4GL5CHbBcObXKet0KuKYny3q4D4l219JzUHQX1DklZEHS/cuf 1+JtuegrUD9j6CFTi/ArxFFs0JosC6rErLxfCk4zXzU86ZpYsPnQWnDviW1SEI6o1YE0 XYgPNao/NDiw9FxZFyJdClQybXF2+sfL9KeNWs9OInx76ZD+LT8+U8itqhWzcGl8flrS VKkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tL38zyF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v1si1415826qkf.183.2019.05.30.03.28.46 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:28:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=tL38zyF0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50707 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIIf-0004AB-Uk for patch@linaro.org; Thu, 30 May 2019 06:28:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFG-0001Ej-AL for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000Iz-Tj for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:55521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFD-0000BY-Dj for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wm1-x334.google.com with SMTP id u78so3603731wmu.5 for ; Thu, 30 May 2019 03:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f1LzSCynUI6fUnn106lFa25PqYUY/YDKYZafY8tD3Yg=; b=tL38zyF0BhsVozr95jh31CUABlgftio1pK336oAi9rr4l0aYWXBMCRVE71Me+u9AFH P9e9Vp4KmdyIwYL8cCKyOAcI/hAaWOYrVGuobcQTne+YKUrgZcWW5Y3P06h5ac3Yi+en 4oqpF7I3hqnebO5BEB/ZYox1iTnwUottJWXpzo2frLimSFkxRnZO61mdCk2Bd1aB11Ja s7/yzCHbglYed+bUTxnOG5fwIMXdKJqL6+8jbcm4BoPT6vW16dHfPPB8oDstVtq6iHH+ MmYzwlsf7zU4Cur692GcnUitumsTfCfeyhjKRGm6HI62SewUdMaZ7DM2Hrx7/iJUqydU N9Aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f1LzSCynUI6fUnn106lFa25PqYUY/YDKYZafY8tD3Yg=; b=Z6jUofCJHWm6ljlyCLi08DlyftFQ6l1r/9pwHIFL1xnWnI5Acdqjz55+dHIFODVrgV jU9Q1DCitapF2ceUR3l+UqSbRyIpxim4YCJfCWQxdGmD981tLzth/OcanBsKiOhkWcBh cm9+oSIjLmN72ywurU7c9T2ElXSJj9amNFqw5ZdINhuHPfDGY9o9gWSnD9JOP2kgIUkq nBENMsi3U9m739mtPEWPQBH09jDqCips/krjiR1/BqYXrpFGpt9ckkEU1Sfr3oxqwnMQ EqXXh4NIjurdqCYKjsnH2N3Zc0rCwaGmbJ/9deDWb/JJbVourWpTwaIEljxeSP3C6+sc 35yA== X-Gm-Message-State: APjAAAUuA8eK6BiVbVilCCNA1HSBxPLKjhTCEXpWvbgTF58jpvkvYMBv io1GF+Nii+SCTRNQiXhzUDXh3w== X-Received: by 2002:a1c:7510:: with SMTP id o16mr1893664wmc.154.1559211908713; Thu, 30 May 2019 03:25:08 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id y132sm3811044wmd.35.2019.05.30.03.25.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:07 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7428F1FFA5; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:54 +0100 Message-Id: <20190530101603.22254-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 Subject: [Qemu-devel] [PATCH v1 17/26] tests/vm: run test builds on snapshot X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , Ed Maste , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann The build script doesn't shutdown the guest VMs properly, which results in filesystem corruption and guest boot failures sooner or later. Use the --snapshot to run builds on a snapshot, That way killing the VM doesn't corrupt the base image. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Ed Maste Message-Id: <20190520124716.30472-6-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index c59411bee01..276b870216c 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -57,6 +57,7 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(V),--verbose) \ --image "$<" \ $(if $(BUILD_TARGET),--build-target $(BUILD_TARGET)) \ + --snapshot \ --build-qemu $(SRC_PATH) -- \ $(if $(TARGET_LIST),--target-list=$(TARGET_LIST)) \ $(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \ From patchwork Thu May 30 10:15:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165433 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp785417ili; Thu, 30 May 2019 03:38:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqxU9H6XIm8X/7CPXYxdb/otv/eFyy0xfFhT7NSqLJKr60mSsoyJqI8uNxUC6fBxeWKDr8Oh X-Received: by 2002:ac8:48c8:: with SMTP id l8mr2652481qtr.20.1559212681416; Thu, 30 May 2019 03:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212681; cv=none; d=google.com; s=arc-20160816; b=PzEFYhbyJ/Ya5udEbwLJHz03ZwnyaRnnhJ0KhxL4w08PS1a9PaQOF32iyblU2quFR/ BLQFI66GbKR7tGBgLwQzzV9Vw/xO7DPiEHrCmRJDWA6sa3bURXIsoMvME9UmN4Sbnt0r u4j08npHyzW1OGBnH5/dr+IpBo46XyL/3Pim0w2m6OP2oAixr0mxb9VRCyAefr8ItxeN fPlRui2RVPx2mz6VW2S/BDzCuLqpcBcKB+zubcqbbP7+tie+Fk3UyJAwk9M39qIKQK4K r/U37XpCTvRDQ8oAM6QQhJXqpNALjgkpcQEgMGhxplmlZeZWK0aLU/xWgnYNu+QGOSG3 silA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=9uHkcMcsE9fyEwD5PKdvI++8JESJlTBOyqyYuFuuSZE=; b=BlvzX4St2ejqbcva8X3hQVCTQbgTe5YetDStWfjSFazayyURfGPQw6JwBB56VL1yyS Iu6PQYwSkI7tt8lYNK9zRJ4GUinQFudpes/tVqCADyvea12VeZoxwYke3N5KwKV0ydgu 0Y4ivBdqP/UMxD7fT5Hs9cLt4IWlIe2VQWKAaw52A5FyQY3Vu1xPGM/Hf53P2MjRWkEy BqBJRJr2Bbyne3ebXcofgkN4UWBlWEcyDMezSnva3i7TW+mMWQMRJU4HFDGw9AxcGSty 6nuk8npm6dISjyH0+ZAoSXeg8aI4GIHjP8I7UGNvrthHVyPWDHJcTCc4R733bxZUReiy X62A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X1sEQNqZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q14si1420770qtq.305.2019.05.30.03.38.01 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X1sEQNqZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:51152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIRd-00033b-0h for patch@linaro.org; Thu, 30 May 2019 06:38:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54463) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6g-0002js-OO for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6f-0006eO-RV for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:22 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:39180) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6f-0006dD-K0 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:21 -0400 Received: by mail-wm1-x32f.google.com with SMTP id z23so3460006wma.4 for ; Thu, 30 May 2019 03:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9uHkcMcsE9fyEwD5PKdvI++8JESJlTBOyqyYuFuuSZE=; b=X1sEQNqZbd4mlCH6UlYXnKT8C5RngBph4LPyHKT0/zM7GR4nhpA75kDAL+Hms7IWCA LrOnEJ6LlbWNxqgyqqvyfyS2/DFzGpTD1PA4kWiA9DwJ46B76SBNb/1v6vjcyaQHzYS1 70Rc20sQy7y0EIWNLUDJ0nszdSw27mARIMVgSlLx/ZOeJf8KD8iL+SRmDLIwGRyqruo5 761cw5G/Kgaqx8qOr64v3MwwQblCnwTZi7qcV0qncZjr8L8NH2dxfySxr2jkLKwKh3Gt fEAoYbVu3zuixIMvgWGbsmPtQxil7MHDQ007hkIclLv10jqDwD6W0r8TAxpCg+b1YFqI u7Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9uHkcMcsE9fyEwD5PKdvI++8JESJlTBOyqyYuFuuSZE=; b=ngmkxG520l0WXvNZPhQuljcQeEzK0m84pEj1xkT3ttreFNj+rMIuB3UlE1vqurexmr huVN9QpVtd1tHPtNCSOWOgk+XQo9+59Ggq+8tBGtm99BKcyw63OCWdqCB0zDmcJurCpg RJHtuvhEbRq6VLC36n8Q3MWdo3C6wTu8ahu6oTcK1qsI8AUt4ny6xBpsTD16brWkxvHl u9mFmxDe//BBswa3Ud4ANcv/oVcmL/4XeWhMgNt0yRtljUOTFqX9yybxDaocMYtz+gHJ HCh+e5r6euQGaaxY81iFtS9v5D0AL8dlYZGalzMvjXPVNuJjfXijMHDQPat2r2srBN+B TMxg== X-Gm-Message-State: APjAAAXyoLA/UxeZCz8mb3P9HsKEe6o5DFbytfLIDDLDzDNo/VVts30c cLEh1+ul7TZOEpQj1uyHhrjjlA== X-Received: by 2002:a1c:6154:: with SMTP id v81mr1648078wmb.92.1559211380553; Thu, 30 May 2019 03:16:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id h90sm7066459wrh.15.2019.05.30.03.16.10 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:18 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 86F201FFA6; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:55 +0100 Message-Id: <20190530101603.22254-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32f Subject: [Qemu-devel] [PATCH v1 18/26] tests/vm: proper guest shutdown X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann When not running in snapshot mode ask the guest to poweroff and wait for this to finish instead of simply quitting qemu, so the guest can flush pending updates to disk. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-7-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 395eefaec94..f27178f3c7c 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -51,6 +51,8 @@ class BaseVM(object): name = "#base" # The guest architecture, to be overridden by subclasses arch = "#arch" + # command to halt the guest, can be overridden by subclasses + poweroff = "poweroff" def __init__(self, debug=False, vcpus=None): self._guest = None self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", @@ -202,6 +204,10 @@ class BaseVM(object): def wait(self): self._guest.wait() + def graceful_shutdown(self): + self.ssh_root(self.poweroff) + self._guest.wait() + def qmp(self, *args, **kwargs): return self._guest.qmp(*args, **kwargs) @@ -278,11 +284,13 @@ def main(vmcls): traceback.print_exc() return 2 - if args.interactive: - if vm.ssh(*cmd) == 0: - return 0 + exitcode = 0 + if vm.ssh(*cmd) != 0: + exitcode = 3 + if exitcode != 0 and args.interactive: vm.ssh() - return 3 - else: - if vm.ssh(*cmd) != 0: - return 3 + + if not args.snapshot: + vm.graceful_shutdown() + + return exitcode From patchwork Thu May 30 10:15:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165435 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp786715ili; Thu, 30 May 2019 03:39:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzV0l/lw8EQ4lJt/MMc/pEq4bXMotgVBaoSsPs5MEp4bq6kFEonhDaSMdz2dLBaEY0o5/0+ X-Received: by 2002:a37:b7c6:: with SMTP id h189mr2412073qkf.347.1559212774859; Thu, 30 May 2019 03:39:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212774; cv=none; d=google.com; s=arc-20160816; b=if8jZBY5610uEaR7ETt4/QpzSeNbRtTfjxyXa3waTEKUSHSI92i6QQ53Xc6sj165xg sdu2CfKq0A6NaJxY7DQefDtJKu14LohHf2SkIpGCxN2Kh79PPK77m3E/A6XW5btJuZgS VGe3wxIS2agv796nhuIR0z+oxIItOh0wlYPU1Q5rODnG+KocfIRXumOeqCoy+IUQkZmN EbRuuG4iqIxw/QKEp/0wAY7iotJBI2N7iAnD6YYmsGX/R+bH8yDPHizOLY9IpIjdbStQ KFzU4Sk15tB0frV8/SSnkt6mn673LsDUrHHQEKcO8tVx8fCv2T0JNeoIGhpHNDqyZXpj EeCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=pxbSV5w1/gsrwx8qszzFPSyV1J05+UPofdUUztDCX0k=; b=RxqE77q5ZWkgnyUK0u6ZJz6T0g2F2JtWGfLkXvGD6zBOlpsG51q+Ar+l8fSO2lHe+b hqS5eByxSmq1UP4sNZR2J3YVSRV7aBnNvJoyOoQG7VZPAf3400hlgpdmEjBbTeyHJOq7 SXwAzZ6eKVFMwV44v+hq8lC7QDd3IgUaWxp/pFdGRAD3o4q8qcgRu+JNFJsXNU7zvfbA csgsgq3HJsg38+hTb9PqfbbqPZoa+nXFJLsZua9c6HGmAmi43vXQyovfyldxkF6y02Eh Kl1WOO768vGCagrNzui4rCpsYrvtV6zTDRcEjAcl0YiYIsMiJPnEeGMHcgtQ8TAXRdB0 stOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z92u7mgn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id m16si1488459qkg.3.2019.05.30.03.39.34 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:39:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Z92u7mgn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:51204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIT8-0003iC-Fb for patch@linaro.org; Thu, 30 May 2019 06:39:34 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFF-0001Ef-WE for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000Il-QB for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:13 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:44865) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFD-0008WJ-CD for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wr1-x42b.google.com with SMTP id w13so3809897wru.11 for ; Thu, 30 May 2019 03:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pxbSV5w1/gsrwx8qszzFPSyV1J05+UPofdUUztDCX0k=; b=Z92u7mgnl/2wSQgta1S1HUVwByky2RwKi/PW9uUGu52frrFQGVyjBMxZwtJvdtYstb OJEfmgTGSMDZpwEzwH9G6WI6paDYJH9QWg7E85jOu4W3ABn20f6W45x66ZusQWk+M6Z4 CfYS1CTr09figWeaFQUdxG6KsZbNK06ueNRrGc0wgu92QherBU7TQ6Ouz2R6NAbpu2KZ 3SKeVVNVuyVltpKZapFUYKSvcyO9NGgJROivdwBqWVLc/R4pJy4kJL3OGTWuBsEJEC+H blL5E04yAWXt1aw8QRRJZT4RzEDE1h6X38OU04THCqlrgjoUQdTXtWzg1XCwov3k/yik /IPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pxbSV5w1/gsrwx8qszzFPSyV1J05+UPofdUUztDCX0k=; b=L+JOBHg6Xk0gBYS53KEO9Y1mzirwrXX4j7c41snolo74ctfG1nUfZ6sSVpJkTz0MfD lZDtjPANLMjUBrGHnqofCcFbX9ihfTLWS14Xb+rgpsc0xXizzFFIRkwWBn1ONdns6PGg xDXv1Ejqvc4UMb44idH30L6aErOzoTvDzc7A4FLdrO+1c5CJjl0j2eQipDoTsDU96JJU NrJD17CyDruRM8h+0ES/Gdd2TNhlzcTDOAPEhdiB34AT1bfiDBjshj2mJvEfG3SZqP64 gtf/VEiJ112/wlaL602RoJ9hp7NwoeYtue0o86Mxwr5FKtxmrJmwU8JANRdEtRSovGvR MtwA== X-Gm-Message-State: APjAAAW41oRYxM5AStV9eLZLiGc+S/ylRftj/sczNhgbPD43G4wmvve1 VaG3S+c6F0CgBLMriOe+lKwKVQ== X-Received: by 2002:adf:afd0:: with SMTP id y16mr2141025wrd.22.1559211901966; Thu, 30 May 2019 03:25:01 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q17sm1492690wrx.74.2019.05.30.03.25.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:00 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9AA201FFA9; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:56 +0100 Message-Id: <20190530101603.22254-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42b Subject: [Qemu-devel] [PATCH v1 19/26] tests/vm: add vm-boot-{ssh, serial}- targets X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann For testing/troubleshooting convinience. make vm-boot-serial- Boot guest, with the serial console on stdio. make vm-boot-ssh- Boot guest, login via ssh. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-8-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 276b870216c..e329129bd65 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -20,6 +20,10 @@ vm-test: @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" @echo + @echo "For trouble-shooting:" + @echo " vm-boot-serial- - Boot guest, serial console on stdio" + @echo " vm-boot-ssh- - Boot guest and login via ssh" + @echo @echo "Special variables:" @echo " BUILD_TARGET=foo - Override the build target" @echo " TARGET_LIST=a,b,c - Override target list in builds" @@ -63,3 +67,18 @@ vm-build-%: $(IMAGES_DIR)/%.img $(if $(EXTRA_CONFIGURE_OPTS),$(EXTRA_CONFIGURE_OPTS)), \ " VM-BUILD $*") +vm-boot-serial-%: $(IMAGES_DIR)/%.img + qemu-system-x86_64 -enable-kvm -m 4G -smp 2 -nographic \ + -drive if=none,id=vblk,cache=writeback,file="$<" \ + -netdev user,id=vnet \ + -device virtio-blk-pci,drive=vblk \ + -device virtio-net-pci,netdev=vnet \ + || true + +vm-boot-ssh-%: $(IMAGES_DIR)/%.img + $(call quiet-command, \ + $(SRC_PATH)/tests/vm/$* \ + --image "$<" \ + --interactive \ + false, \ + " VM-BOOT-SSH $*") From patchwork Thu May 30 10:15:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165427 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp776580ili; Thu, 30 May 2019 03:29:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKbp5Bpgk8nlPaqQJKzB7dRajHmgB55wiX+QkHo1cSkS5+A9Hjnf2fcVXu+UIG2iCL6NpO X-Received: by 2002:ac8:1115:: with SMTP id c21mr2640388qtj.155.1559212168712; Thu, 30 May 2019 03:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212168; cv=none; d=google.com; s=arc-20160816; b=xUlLAGo/giMkF0ep9w8eoFAzS2fvuG1yioH4nQUPxblffLK/EQVPA0JLAwfrGAS9Cy rwMGhuucNs2b19BOR7FVvzeiGT4nDIF8L0ObaPBfWp7YiqX/RfWyFO8MLJLEuWAeS9ZJ bRqv5pbb/EJq2xYrmqlZ1ZUYrJELZyNITZZucHVNsYkPJlInseCVPJoMCorGkZplJyUk GosovnRL2y183O9q3sIJxu2VuEGj7/32OKSL4KYRBlAuz2qHfJB+sEEQM+UGR47q6DS7 57b8P3eyVQiFMH8+IE/1v80nmirD/fJMLBcntBZzaAelse4/rZP6oh0iMbSIqlztNm87 oR7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ULMYDzDhsSMCX4YzAm5KDo0Ff4IgPy209ucg+FKeKHM=; b=KcqTjyiRGSoTIUW4FbUS1XY73i71JiOinTwOxfO+bd3lbuJ71dM7FXHotqvYfNSf0I IYL/1jLntQFRzxdBhL561oXdxBmcTS7ZmJYK4ECw5lULdY4AeyEy6Ar9ycPiEMjJZIXB NyNvQYAX9a1BE9rTqAiQxFOSkGfeDZf6VHa7V/+ZNYzgTDOlMu5RsueJXUvnfUXdvTt6 +0EXGaoJyZaPEuNgzoSImTuTMmnSZow4Kw4Ss+3Hxki//5Oxsj1UwnaqusJhPDHjPgAk OC4YNWspSVrnybNEsKxWPMwSC/vIy5ZM5qohigYsQl2i5uPcXxBaGMpkHt3I9K1xCveo ZRoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=D03hb4mj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k8si1423784qtc.368.2019.05.30.03.29.28 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:29:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=D03hb4mj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIJM-00050Z-7e for patch@linaro.org; Thu, 30 May 2019 06:29:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFG-0001Ek-At for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFE-0000JA-07 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:44871) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFD-00008r-F3 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wr1-x431.google.com with SMTP id w13so3810123wru.11 for ; Thu, 30 May 2019 03:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ULMYDzDhsSMCX4YzAm5KDo0Ff4IgPy209ucg+FKeKHM=; b=D03hb4mjDfpx448Oph86YwD6jxyYp+jxB2vt3SOVA7eoNHOMFlMfG92dAMqv2dQ0V/ aX7VPgrmUwLDABImVrGqIn/LsTqQP5MUb9bdP9fXtO5EhcQBT89lWC/LpRDNlKLW8zM1 RJQ1DKWuvUiar7JFNIl6lnWSLab2ajSUjKh7PIoC7B8IDyi4O0nkStmsXfnTTR4PyPF8 fRifYyrp7480MZOwUkwOjVhiVxBQJC3qzhj8ILyCtiV94t1C3alknzwsBcKLr61ZQ5P9 o6E9OK6xQtV/m2fQaaaau8jYCmIQzXljLZvylpvdkEnMHcx7EDNczQZN4I8HkDpJ38dB G4gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ULMYDzDhsSMCX4YzAm5KDo0Ff4IgPy209ucg+FKeKHM=; b=T+uGeRZRDd+zLecSES8mj1ijWdv5E6CyjNP0pxyGLPHRcBkT/bv1BUQlpbVlcEPKGF QkuZRLECin+a7D/w/qBju0qEh9WIwp1hEPpBZ3MgQEFfg6L4tkdU6xnTmnv8AartHs/j gE6sUJxjneEjmQZN0KTEfBfg1NQCJLmIKAn0TOtw9dzH26ApssgT2Z0Z1L5PICJuzPat 12g4xj1tDfY6u0vvKWcDkNDcb6F1rLW3o1Z0/JJ1MccbwdoxzoRrtGceU8GeKP9MMAdd F5qV2J84+NRsWhl5y/Sw56I/IGOnFPK2iH/2x+hXy4eUPWH6o5R5nSm9KuTm+4O5Tzqq 5Jkw== X-Gm-Message-State: APjAAAWkEvBFBapGaIJdckjCiPKeMVJept72prg0WKgGMX03iuS8vI5e gMpNvaZL7rL1uJSF459tEOunEBY7hTM= X-Received: by 2002:adf:f951:: with SMTP id q17mr2033922wrr.173.1559211906831; Thu, 30 May 2019 03:25:06 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id j9sm2297440wrr.90.2019.05.30.03.25.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id AE5B31FF87; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:57 +0100 Message-Id: <20190530101603.22254-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::431 Subject: [Qemu-devel] [PATCH v1 20/26] tests/vm: add DEBUG=1 to help text X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Message-Id: <20190520124716.30472-9-kraxel@redhat.com> [AJB: fix minor conflict] Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index e329129bd65..628eecade78 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -25,6 +25,8 @@ vm-test: @echo " vm-boot-ssh- - Boot guest and login via ssh" @echo @echo "Special variables:" + @echo " DEBUG=1 - be verbose, also start interactive" + @echo " shell on build failures" @echo " BUILD_TARGET=foo - Override the build target" @echo " TARGET_LIST=a,b,c - Override target list in builds" @echo ' EXTRA_CONFIGURE_OPTS="..."' From patchwork Thu May 30 10:15:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165429 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp779213ili; Thu, 30 May 2019 03:31:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUfSaGLhSR/u9DLbNqF3Npu78LfwUUzu5RGnSbVR8g/EKaNX2779N0bbRxKttBJt0pStHH X-Received: by 2002:ac8:24f8:: with SMTP id t53mr2729197qtt.241.1559212309621; Thu, 30 May 2019 03:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212309; cv=none; d=google.com; s=arc-20160816; b=RKrUuF/yBoQG8JYir0eQJ1BfBsh2RwTCd5khtLzOW4QrJZx3UDusx6bc3E4rGB70Mn RVSe4FOXCjFHsKHFX2bEx89tYCltokiVYcvL44sjwCPTuerg9xa+KQwHuTe1stauqxH7 V9t4Lzoi5I/CZnB9Nyfki9rkjxUwWWcbKouTmimDq1oM01z/8WbJC47WKLS+mfqPZ9NS TGUZtw7TX7ZfyA5i1XmzFrWZhLzgGGNUJ7xRH9yskC1Gs2XVdIt5TGwtop0/kY4R+MAi RCRBYsve6Gzft5M+MYakFzFMA0Tz7e1+Y4kCRPXeY9Rp5B5VK5gGhD1OG3ZiQw26er+0 dj6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=2471IffjmNwT1ZIHN+LiHQt5WCW20wr0QmjXYo3CRl8=; b=pMcOqyl/gAczBM7OInMvwyzIdYdCgVt4QrBgIfbXYF7UpF2j7s3jOAhzn/Xqsko+s1 nEsvRWbbRhhDF3KMFJ01zfOlLs2V0VO//l+fpZ1gpTEy0T9OyX+3W+O2EXY4Arl6FvPi rmv57vlVLe0EYeSTDcivdLEtWQLdw5XVI0M3QajQ+IRFHKkN7AYYHxseMupTuXyyyp7m j5kSYF+WT0iLsZ/Bz3y0CjQCq0Lf0EtOSLgopdbMAsyyMjTQKqnTL8ZfQ9tbADpmir5c es3WAfH8lRSBNsBvu8ROlik+qrglJq53af+lbjJ1+L5IXO3rtLdBAwa0FH2FOVKd02kv B12w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GhP6pyvg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a12si1441113qkk.253.2019.05.30.03.31.49 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GhP6pyvg; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50768 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWILd-0006fw-3p for patch@linaro.org; Thu, 30 May 2019 06:31:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFF-0001Ed-Pi for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000Ha-C9 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:13 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:51755) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFC-0000Af-TB for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wm1-x343.google.com with SMTP id f10so3617872wmb.1 for ; Thu, 30 May 2019 03:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2471IffjmNwT1ZIHN+LiHQt5WCW20wr0QmjXYo3CRl8=; b=GhP6pyvgxpZHNbcmuwIEZapIcPwTGrWK0KZLjWSykCKgyPcPg2c1rfpruDvYzZsjt6 MMzu1U5NZa7LdAGOfNQm5KJDcjnzTbl+hFh7iHD+eNMY4yboMipXfdtjtMTRYtoEX/Uh bZYiSPwFsYtuFGSVQHMAJdiKdAhTowkASDpUA8uFlqTUsKeq1UNMnfZZt9sKD1XAYamM q79zSr5dkeLTSPI0b7H6Td1KqyX5TdHLXbpoHPGLaPIlSQp0UMUSAUhUA7dJdykWM9vU xxj+Wp4WmedLwGahsLBEu9vQ4VEP6F66xvC0fiKsBvXGNzTGB1W9JK214ORoHdSUnkWi q8fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2471IffjmNwT1ZIHN+LiHQt5WCW20wr0QmjXYo3CRl8=; b=GjjV/JBiFVLYKaUGDxIgM6J+2DT8peDzDzDVvyOlm5E5PNLvWwCSlj1drtfRbHKGMy gEkVda7RX3t1rNdsNjeeGC64FEWLjyiNImAoQvNnVd5uWoZy9UP6FqH9ETN7EPKgV2Ls mPxrCDWir/v2tnecQeGaBzgFOHOnfMoe2Ns5H7dkJp8Qj2bYLewiDTahgZr2Pwl9410Z c/9EQaj0YRirDovy2TjtyznlijRFrCBjl+yXgxb/+ueS2L5tedmDcIUzEw9D+sOrc8h+ LpqumTf6Ji232szEdEh4zZcrEo5j6El96nUy7sveH0S1b6GLCalGdHetgIGakUfJP43u m/RA== X-Gm-Message-State: APjAAAWwV5nMlnu94cqZUbwBO05aGZbPA781E+GMIhm/r+hDjVnv5YUb ZT4PDWlRlCXUrk2DBqpN5sJNNJUfy2k= X-Received: by 2002:a05:600c:1101:: with SMTP id b1mr1855856wma.154.1559211907916; Thu, 30 May 2019 03:25:07 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id w2sm1744827wru.16.2019.05.30.03.25.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:04 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C4FBF1FFAA; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:58 +0100 Message-Id: <20190530101603.22254-22-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH v1 21/26] tests/vm: serial console support helpers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Add a bunch of helpers to talk to the guest using the serial console. Also drop the hard-coded -serial parameter for the vm so QEMUMachine.set_console() actually works. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-10-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 85 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index f27178f3c7c..8894267f078 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -2,10 +2,11 @@ # # VM testing base class # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,7 +14,9 @@ from __future__ import print_function import os +import re import sys +import socket import logging import time import datetime @@ -79,8 +82,7 @@ class BaseVM(object): "-cpu", "max", "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22", "-device", "virtio-net-pci,netdev=vnet", - "-vnc", "127.0.0.1:0,to=20", - "-serial", "file:%s" % os.path.join(self._tmpdir, "serial.out")] + "-vnc", "127.0.0.1:0,to=20"] if vcpus and vcpus > 1: self._args += ["-smp", "%d" % vcpus] if kvm_available(self.arch): @@ -162,6 +164,8 @@ class BaseVM(object): logging.debug("QEMU args: %s", " ".join(args)) qemu_bin = os.environ.get("QEMU", "qemu-system-" + self.arch) guest = QEMUMachine(binary=qemu_bin, args=args) + guest.set_machine('pc') + guest.set_console() try: guest.launch() except: @@ -184,6 +188,81 @@ class BaseVM(object): raise Exception("Cannot find ssh port from 'info usernet':\n%s" % \ usernet_info) + def console_init(self, timeout = 120): + vm = self._guest + vm.console_socket.settimeout(timeout) + + def console_log(self, text): + for line in re.split("[\r\n]", text): + # filter out terminal escape sequences + line = re.sub("\x1b\[[0-9;?]*[a-zA-Z]", "", line) + line = re.sub("\x1b\([0-9;?]*[a-zA-Z]", "", line) + # replace unprintable chars + line = re.sub("\x1b", "", line) + line = re.sub("[\x00-\x1f]", ".", line) + if line == "": + continue + # log console line + sys.stderr.write("con recv: %s\n" % line) + + def console_wait(self, expect): + vm = self._guest + output = "" + while True: + try: + chars = vm.console_socket.recv(1024) + except socket.timeout: + sys.stderr.write("console: *** read timeout ***\n") + sys.stderr.write("console: waiting for: '%s'\n" % expect) + sys.stderr.write("console: line buffer:\n") + sys.stderr.write("\n") + self.console_log(output.rstrip()) + sys.stderr.write("\n") + raise + output += chars.decode("latin1") + if expect in output: + break + if "\r" in output or "\n" in output: + lines = re.split("[\r\n]", output) + output = lines.pop() + if self.debug: + self.console_log("\n".join(lines)) + if self.debug: + self.console_log(output) + + def console_send(self, command): + vm = self._guest + if self.debug: + logline = re.sub("\n", "", command) + logline = re.sub("[\x00-\x1f]", ".", logline) + sys.stderr.write("con send: %s\n" % logline) + for char in list(command): + vm.console_socket.send(char.encode("utf-8")) + time.sleep(0.01) + + def console_wait_send(self, wait, command): + self.console_wait(wait) + self.console_send(command) + + def console_ssh_init(self, prompt, user, pw): + sshkey_cmd = "echo '%s' > .ssh/authorized_keys\n" % SSH_PUB_KEY.rstrip() + self.console_wait_send("login:", "%s\n" % user) + self.console_wait_send("Password:", "%s\n" % pw) + self.console_wait_send(prompt, "mkdir .ssh\n") + self.console_wait_send(prompt, sshkey_cmd) + self.console_wait_send(prompt, "chmod 755 .ssh\n") + self.console_wait_send(prompt, "chmod 644 .ssh/authorized_keys\n") + + def console_sshd_config(self, prompt): + self.console_wait(prompt) + self.console_send("echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config\n") + for var in self.envvars: + self.console_wait(prompt) + self.console_send("echo 'AcceptEnv %s' >> /etc/ssh/sshd_config\n" % var) + + def print_step(self, text): + sys.stderr.write("### %s ...\n" % text) + def wait_ssh(self, seconds=300): starttime = datetime.datetime.now() endtime = starttime + datetime.timedelta(seconds=seconds) From patchwork Thu May 30 10:15:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165432 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp783316ili; Thu, 30 May 2019 03:35:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqwfo2hYiaQm43//rs8A9MdbfN6Iu+eH0Q4+pdOiftwtKGTIXvEvufkU6mXsF7V0lX3QDftE X-Received: by 2002:a0c:9850:: with SMTP id e16mr2728580qvd.163.1559212550422; Thu, 30 May 2019 03:35:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212550; cv=none; d=google.com; s=arc-20160816; b=FAoaAv8ovnbMzBcKoMm9aJIjAn+5+fTtJhhKbSJ3piYD7K2s3Qc9qmu1pxqYi4UyUR Em+CZ8J27f8HMMPyj6H2lmU4Y8tL73ie+Mh7JANYazxM+SbzyV3B4D2N2RpxkHKCCuA+ 67l8SpCdEIarg1N1diIkQ4jvm80JRrLRJJY9nkTBX+VoCR/fMqZah2DyFvjRF5EeKjal DEs9Xym0M9fvsNdPZdd1HnagH648bapP1+9emGCgICdWiramCcZDS1ATvVKCHY+enp8v MQ/54MjCmCQ02liN7EUeu/KwS0PyTNosfD4q0Y01rkhGjGYShgF0UTYXOsZjvNScvjuM HJVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=i/i2ywuXLTtPSClMKCvPqBuSnYnrMH6w3mkxq4w23A4=; b=YIMFxtHF2qCSnMvCxtzqs1wBgTHixvuRiWDQEst2IFwHqW7IoHWLSYJEBkrCvBzJ9P 9/lCSJ5veEpwA0QGCB2vZQ6jx8rG620khAT0SFG9ax6F/Up5yMtoZ5aizpuZKnpJdpoO nqVwPpGIEAtStknJEHhZi/sAcWB30klixshwIQ5ra2V9NmBcLBqsbRCfuq0kDjnQ0VyE ModZk8t41/nDBGaiqazppheb3aIbZf1dy5yitqML82tBAE21hFTVyZpwMhVJ2qiOKP97 szozL4f6l2FbOHYtOkfRJK/8PMh2qUFNRILud6c8Pb0eRgA6Un80vVZHzo104wDdyX36 Fb1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TNcxgGyp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id j4si268267qth.144.2019.05.30.03.35.50 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:35:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TNcxgGyp; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIPW-0001PB-0G for patch@linaro.org; Thu, 30 May 2019 06:35:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFH-0001Fy-EM for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000IU-MC for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:37404) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFD-000063-93 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wm1-x332.google.com with SMTP id 7so3479010wmo.2 for ; Thu, 30 May 2019 03:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i/i2ywuXLTtPSClMKCvPqBuSnYnrMH6w3mkxq4w23A4=; b=TNcxgGyp5olZtcGwMrsQZz9b1DiB1Qg6J72RCiIIFI8KfjP50Hm7kLdE+BNF43CVL0 yQUCUg8lALISTJOPr03WIWH5vSMeBu+HaD8kUyMIVZmggwzKa410X3+GhAmB6oMXHYXO O96P7XMjKxxwoLlbnf1IsmDL48z/CUWzwDgAxcIIoEPTczWCgG+AiRRkrCgKF3fkfkbZ 78jcOLi7uYQpiy1FGjXsa7cstlFAJENKKlLm/gmJph3ivyfbJAwxbFIu5PAFz61PPSz5 kJl4kG5Wov8hbWd75Wj+7wpxaaxRC/GKreNAALgVB+0vaA5QKRi6Q/F36ubLqZkfgiCH RIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i/i2ywuXLTtPSClMKCvPqBuSnYnrMH6w3mkxq4w23A4=; b=ByCCSwD04DhP9av0+TNW5TstqeZy1Vc0jtQvifZCPHvJ5vFL7JlH3aCsnYSLZKgoA+ 74JNzuUAjTjgB/OL7/RyDwg4bbGAhqT+Ez6qb7dVUJfufGy8ugxk5mjbhz1DDYoZbqV0 1KhSGRdTlviCWCt+bc25v3e0rAsPgmv3/97N7B6k6dw04fkUT93QxoGt6Tg6h5mbHZxm sU443O5NHWDApkrJ38sjMIj92zWdc6ojfuNHfzJlFYky3ejLVY3vdKttrEuXzSvpn5+K 0HLC3qDEBoTiy+32r1NifRBqBGOpe7Zy6Wirh+YJ9oZ7trvu8DvmJtZS0jdKukDTDwZ0 HTSw== X-Gm-Message-State: APjAAAW4D/nGPxfYMFAHxVNW1jFVvEBdInOePQJsoKBg9dpTn/gAyecu f/p7WY3hTrzDiPmjnEgkrvECFQ== X-Received: by 2002:a1c:9a16:: with SMTP id c22mr1852538wme.39.1559211903728; Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id n4sm2145728wrp.61.2019.05.30.03.25.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:02 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DABD61FFAB; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:15:59 +0100 Message-Id: <20190530101603.22254-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 Subject: [Qemu-devel] [PATCH v1 22/26] tests/vm: openbsd autoinstall, using serial console X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Brad Smith Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-11-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/openbsd | 158 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 145 insertions(+), 13 deletions(-) -- 2.20.1 diff --git a/tests/vm/openbsd b/tests/vm/openbsd index 2105c01a267..c5f0a152183 100755 --- a/tests/vm/openbsd +++ b/tests/vm/openbsd @@ -2,10 +2,11 @@ # # OpenBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,34 +14,165 @@ import os import sys +import socket import subprocess import basevm class OpenBSDVM(basevm.BaseVM): name = "openbsd" arch = "x86_64" + + link = "https://cdn.openbsd.org/pub/OpenBSD/6.5/amd64/install65.iso" + csum = "38d1f8cadd502f1c27bf05c5abde6cc505dd28f3f34f8a941048ff9a54f9f608" + size = "20G" + pkgs = [ + # tools + "git", + "pkgconf", + "bzip2", "xz", + + # gnu tools + "bash", + "gmake", + "gsed", + "bison", + + # libs: usb + "libusb1", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg", + "png", + + # libs: ui + "sdl2", + "gtk+3", + "libxkbcommon", + ] + BUILD_SCRIPT = """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/rsd1c; - ./configure --cc=x86_64-unknown-openbsd6.1-gcc-4.9.4 --python=python2.7 {configure_opts}; - gmake --output-sync -j{jobs} {verbose}; - # XXX: "gmake check" seems to always hang or fail - #gmake --output-sync -j{jobs} check {verbose}; + cd ../build + ../src/configure --cc=cc --python=python3 {configure_opts}; + gmake --output-sync -j{jobs} {target} {verbose}; """ + poweroff = "halt -p" def build_image(self, img): - cimg = self._download_with_cache("http://download.patchew.org/openbsd-6.1-amd64.img.xz", - sha256sum='8c6cedc483e602cfee5e04f0406c64eb99138495e8ca580bc0293bcf0640c1bf') - img_tmp_xz = img + ".tmp.xz" + self.print_step("Downloading install iso") + cimg = self._download_with_cache(self.link, sha256sum=self.csum) img_tmp = img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + iso = img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args = [ + "-machine", "graphics=off", + "-cdrom", iso + ]) + self.console_init() + self.console_wait_send("boot>", "set tty com0\n") + self.console_wait_send("boot>", "\n") + + # pre-install configuration + self.console_wait_send("(I)nstall", "i\n") + self.console_wait_send("Terminal type", "xterm\n") + self.console_wait_send("System hostname", "openbsd\n") + self.console_wait_send("Which network interface", "vio0\n") + self.console_wait_send("IPv4 address", "dhcp\n") + self.console_wait_send("IPv6 address", "none\n") + self.console_wait_send("Which network interface", "done\n") + self.console_wait_send("DNS domain name", "localnet\n") + self.console_wait("Password for root account") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Password for root account") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait_send("Start sshd(8)", "yes\n") + self.console_wait_send("X Window System", "\n") + self.console_wait_send("xenodm", "\n") + self.console_wait_send("console to com0", "\n") + self.console_wait_send("Which speed", "\n") + + self.console_wait("Setup a user") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Full name") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Password") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Password") + self.console_send("%s\n" % self.GUEST_PASS) + + self.console_wait_send("Allow root ssh login", "yes\n") + self.console_wait_send("timezone", "UTC\n") + self.console_wait_send("root disk", "\n") + self.console_wait_send("(W)hole disk", "\n") + self.console_wait_send("(A)uto layout", "\n") + self.console_wait_send("Location of sets", "cd0\n") + self.console_wait_send("Pathname to the sets", "\n") + self.console_wait_send("Set name(s)", "\n") + self.console_wait_send("without verification", "yes\n") + + self.print_step("Installation started now, this will take a while") + self.console_wait_send("Location of sets", "done\n") + + self.console_wait("successfully completed") + self.print_step("Installation finished, rebooting") + self.console_wait_send("(R)eboot", "reboot\n") + + # setup qemu user + prompt = "$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt = "openbsd#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/rsd1c' >> /etc/rc.local\n") + + # enable w+x for /home + self.console_wait(prompt) + self.console_send("sed -i -e '/home/s/rw,/rw,wxallowed,/' /etc/fstab\n") + + # tweak datasize limit + self.console_wait(prompt) + self.console_send("sed -i -e 's/\\(datasize[^=]*\\)=[^:]*/\\1=infinity/' /etc/login.conf\n") + + # use http (be proxy cache friendly) + self.console_wait(prompt) + self.console_send("sed -i -e 's/https/http/' /etc/installurl\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkg_add %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.wait() + if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") if __name__ == "__main__": sys.exit(basevm.main(OpenBSDVM)) From patchwork Thu May 30 10:16:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165428 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp777064ili; Thu, 30 May 2019 03:29:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqy31gsdTSucazUwVJ5w2VswgSMznu3W4uycwYabbCBcsRf2AxzOp/UcBQLlyszjsPhJMPt9 X-Received: by 2002:ac8:70cf:: with SMTP id g15mr1730062qtp.254.1559212195300; Thu, 30 May 2019 03:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212195; cv=none; d=google.com; s=arc-20160816; b=PE4EWqSWqxr8ntJ6FDq+OYWX4R6C/NY3HsvzUGxOMbR2YlZdAgeWJW6E83vvWrztDu Wn79S8fmo3ckE01/dH0n02xQKn+0kxa55KTN2yWDKOpsFLgDiQR/wQx03vVPVQJnqXd8 alnZzspZB7ye3uWiVOyQjHgkTm+wmHjJ+KsWfslk/sOrX+DQ7b1ldHxVHK8bdJKiYyG8 DmLQsxtXIM97nWqZTsJqHQJVP/TL2LamIO3Upx201RaI03WaqsGfgp2fBIXbtRQNYJoA 9Xo0gcwSGg4BMKKMjYavoWgwlC97ZB2b9dSaW+UStU9vihepeel89GArvxcEZ1mZr2Oy +laQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=va2aVkiTrZ/koDvdRJBXUCzzwNDsrPnddM8kRf0oauo=; b=MDpA4xQBxWRzzqmDr4HGCNCBBauu4s/gNwzW/ZSmu+N9+ajcbaW2C/ybPsRLgaxZQw TxEv7bLSq9EyeEdUAlqFhwocfUs6XmzUuTw6VlTg6hQhbeoQRUsXmXUu+IrqsZFiYQLs oPcjLDtgl/pIMRu35pI/NSceeBxr4EFknylauUmnEa7NlOJPDYqZg0wxbzoywAikSy3d 2vGKa2Nqr1rfU0WUuwT78DSvdWemIjVSXaGnAvtBILFnsIJuH2cFqMap4X0ky1U8Hexa qJ6UT3+wJVz8CDKr6QwwJusqwv48ZPlnb6U5pJblFyK7GwM3osn8aQiS8YKXtomfZMuC lFDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="FhZr4sq/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i15si1497967qte.365.2019.05.30.03.29.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:29:55 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="FhZr4sq/"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIJm-00055J-OA for patch@linaro.org; Thu, 30 May 2019 06:29:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFH-0001FU-0Y for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000Hf-Ck for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38370) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFC-000084-Tj for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wm1-x344.google.com with SMTP id t5so3485440wmh.3 for ; Thu, 30 May 2019 03:25:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=va2aVkiTrZ/koDvdRJBXUCzzwNDsrPnddM8kRf0oauo=; b=FhZr4sq/npVp5hp155MS1l9IwHy5BynqFOrKZ2FsshYjC1YveSAwlfYIaBoL8TVzAY 2yOeHpYRQO+QVaEmKd5CZ/aiBSwvWbPCJMpqKezXLjghTM61O2B3FiBsoRSuEd3sriG3 OnP2AZG3omLerTyYfHkrMW2lvEbNfuOZ4k6dSbhkeJVfvyMFak+mBbKVNFTOzqA8j+g6 hPHgIIRRRP2tgafoPJsBiqes+FPG92OuTvP6+dAODJFxPI8gfHUWDC3gllM6i5gsvRF/ ShiN2/e4Wf21n+1jS4buFsFgHfc2MEyZc6wS2VMbSevLMJ9AA/N1P8RJdOriXVOW7w4V fORg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=va2aVkiTrZ/koDvdRJBXUCzzwNDsrPnddM8kRf0oauo=; b=g1SJ+kGOt9nGRfZKjMIm/HySlyCINBjFTxNaRqusujiNAdMslDJM0he141nkfoXVNN Zi41LA6nkWDBdeV6S6jYpm53UQah6uyyYnEB216dlk8d5ocDbzCjPAXKBUM/8j8A+7oG TBUmeBzIYblSFCQAZ3r5DpOSU9EFapeHver7Uo3KFADqNUzTlK2ulLmnIF/3G6UiMz7o hV+2K6NMNdcdm74Khm7C36n/2meWxuCaydsFVTRbJlFDmw3NlhSHot2E2iL8JFVAgmob jx6aRqsB5zswGNiBEQZ3kNkFxjUSel1i7PcP1dasK5CExjnSHIpP9Vjf5DVlYz5XzzmZ N3sQ== X-Gm-Message-State: APjAAAVi2v2w6yez6rtxfQiWoJpoLqRGaW90JvXTFSyqI5ScfxqCcFJL mtm/jjrNN0KWi0FGlmBfgrI8x1U6gAA= X-Received: by 2002:a1c:f111:: with SMTP id p17mr1859994wmh.62.1559211906225; Thu, 30 May 2019 03:25:06 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id k17sm1516486wrm.73.2019.05.30.03.25.02 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F03CC1FFAC; Thu, 30 May 2019 11:16:05 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:16:00 +0100 Message-Id: <20190530101603.22254-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v1 23/26] tests/vm: freebsd autoinstall, using serial console X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Note that freebsd package downloads are delivered as non-cachable content, so I had to configure squid with "ignore-no-store ignore-private ignore-reload" for pkgmir.geo.freebsd.org to make the caching actually work. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Tested-by: Thomas Huth Message-Id: <20190520124716.30472-12-kraxel@redhat.com> --- tests/vm/freebsd | 179 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 169 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/tests/vm/freebsd b/tests/vm/freebsd index b0066017a61..eb029bdfede 100755 --- a/tests/vm/freebsd +++ b/tests/vm/freebsd @@ -2,43 +2,202 @@ # # FreeBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. # import os +import re import sys +import time +import socket import subprocess import basevm class FreeBSDVM(basevm.BaseVM): name = "freebsd" arch = "x86_64" + + link = "https://download.freebsd.org/ftp/releases/ISO-IMAGES/12.0/FreeBSD-12.0-RELEASE-amd64-disc1.iso.xz" + csum = "1d40015bea89d05b8bd13e2ed80c40b522a9ec1abd8e7c8b80954fb485fb99db" + size = "20G" + pkgs = [ + # build tools + "git", + "pkgconf", + "bzip2", + + # gnu tools + "bash", + "gmake", + "gsed", + "flex", "bison", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg-turbo", + "png", + + # libs: ui + "sdl2", + "gtk3", + "libxkbcommon", + + # libs: opengl + "libepoxy", + "mesa-libs", + ] + BUILD_SCRIPT = """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/vtbd1; - ./configure {configure_opts}; + cd ../build + ../src/configure --python=python3.6 {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ + def console_boot_serial(self): + self.console_wait_send("Autoboot", "3") + self.console_wait_send("OK", "set console=comconsole\n") + self.console_wait_send("OK", "boot\n") + def build_image(self, img): - cimg = self._download_with_cache("http://download.patchew.org/freebsd-11.1-amd64.img.xz", - sha256sum='adcb771549b37bc63826c501f05121a206ed3d9f55f49145908f7e1432d65891') - img_tmp_xz = img + ".tmp.xz" + self.print_step("Downloading install iso") + cimg = self._download_with_cache(self.link, sha256sum=self.csum) img_tmp = img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + iso = img + ".install.iso" + iso_xz = iso + ".xz" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso_xz]) + subprocess.check_call(["xz", "-dvf", iso_xz]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args = [ + "-machine", "graphics=off", + "-cdrom", iso + ]) + self.console_init() + self.console_boot_serial() + self.console_wait_send("Console type", "xterm\n") + + # pre-install configuration + self.console_wait_send("Welcome", "\n") + self.console_wait_send("Keymap Selection", "\n") + self.console_wait_send("Set Hostname", "freebsd\n") + self.console_wait_send("Distribution Select", "\n") + self.console_wait_send("Partitioning", "\n") + self.console_wait_send("Partition", "\n") + self.console_wait_send("Scheme", "\n") + self.console_wait_send("Editor", "f") + self.console_wait_send("Confirmation", "c") + + self.print_step("Installation started now, this will take a while") + + # post-install configuration + self.console_wait("New Password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Retype New Password:") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("Network Configuration", "\n") + self.console_wait_send("IPv4", "y") + self.console_wait_send("DHCP", "y") + self.console_wait_send("IPv6", "n") + self.console_wait_send("Resolver", "\n") + + self.console_wait_send("Time Zone Selector", "a\n") + self.console_wait_send("Confirmation", "y") + self.console_wait_send("Time & Date", "\n") + self.console_wait_send("Time & Date", "\n") + + self.console_wait_send("System Configuration", "\n") + self.console_wait_send("System Hardening", "\n") + + # qemu user + self.console_wait_send("Add User Accounts", "y") + self.console_wait("Username") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("Full name") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait_send("Uid", "\n") + self.console_wait_send("Login group", "\n") + self.console_wait_send("Login group", "\n") + self.console_wait_send("Login class", "\n") + self.console_wait_send("Shell", "\n") + self.console_wait_send("Home directory", "\n") + self.console_wait_send("Home directory perm", "\n") + self.console_wait_send("Use password", "\n") + self.console_wait_send("Use an empty password", "\n") + self.console_wait_send("Use a random password", "\n") + self.console_wait("Enter password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Enter password again:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait_send("Lock out", "\n") + self.console_wait_send("OK", "yes\n") + self.console_wait_send("Add another user", "no\n") + + self.console_wait_send("Final Configuration", "\n") + self.console_wait_send("Manual Configuration", "\n") + self.console_wait_send("Complete", "\n") + + self.print_step("Installation finished, rebooting") + self.console_boot_serial() + + # setup qemu user + prompt = "$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt = "root@freebsd:~ #" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup serial console + self.console_wait(prompt) + self.console_send("echo 'console=comconsole' >> /boot/loader.conf\n") + + # setup boot delay + self.console_wait(prompt) + self.console_send("echo 'autoboot_delay=1' >> /boot/loader.conf\n") + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/vtbd1' >> /etc/rc.local\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkg install -y %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("Uptime:") + self.wait() + if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") if __name__ == "__main__": sys.exit(basevm.main(FreeBSDVM)) From patchwork Thu May 30 10:16:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165437 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp787916ili; Thu, 30 May 2019 03:40:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxUVEJL5RSVDTb4NB+id74jDtMKRsL8LmKjIfvAqKC26PN9FxKX0OfTnX31WhFifrvYVKLl X-Received: by 2002:ac8:7656:: with SMTP id i22mr2688933qtr.260.1559212847385; Thu, 30 May 2019 03:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212847; cv=none; d=google.com; s=arc-20160816; b=r5cl7FuPu0c5OfvEBT3aOq9GnIn/aPXIRmjXug77ZyGGauXmbRYeXK5rHvNHlHfvLM 8AgxP62AXmEUV3mAkD5nCIlyu7eQw4RJBmNTljYF1hGw09Oo7dkW6OR7J1PCTl3p8+xg aSSlgeusJhNhNyUEksj62MXOiI0gqFigN/oL2uAHru5zCWSIM9EMQ2uYdZxSopBEV4k+ bnYwwj+YVsa0lfddoLvlDAQaUmc6Evr65RKo8R3uyijbFUYvN3UOttC4un3dW6L4k7Zb 0EDvr7ny791sabv10SF+BMNeGjxWXMhgMRYJy82S0m4wnTfUP8+VUvemkO97+4obbU76 4SHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=aZAe5/QuAbq/RHBzy6OF/4DQuFxdnGK9gRe+n2IiOXg=; b=XE1mkREbIgBR+RgktUXLeDzfq42Oc/unKN1b6qIgIrxpRauJHeKl1Cpgz+rtyvHqZI DAx2AblPAbC1vnF5mxAnr2+DxLucR6SoxwJNTofHwaVGHSLKM49LQeR54aYrNMvWZjcQ varBuiSRtTyGRB632d7CT2GblDphZW2t4sjNtfoOk61YaiB/MP+WoreJe+gt9HTnU/mR 3nL4AjZow11IdvATtktzKer7/A7bN5yxBqbKvDlMg9+luAsNmVPU8LcIjfvi8hd6fVib pLdbzISCQDeJBs1O1Cdvyl0tqMFI42cUUbrnRtR7G3BB6uAp1j1rinZxsTLl3oZd6Vew 39ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QTSBLr0X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n14si453144qkg.165.2019.05.30.03.40.47 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:40:47 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QTSBLr0X; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:51260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIUI-0004Qz-Ty for patch@linaro.org; Thu, 30 May 2019 06:40:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFG-0001FS-WA for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000Hl-D4 for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:14 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:36419) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFC-00005N-Rf for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wr1-x444.google.com with SMTP id n4so784452wrs.3 for ; Thu, 30 May 2019 03:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aZAe5/QuAbq/RHBzy6OF/4DQuFxdnGK9gRe+n2IiOXg=; b=QTSBLr0XWHCd/iJm3vSaH+EHQOXGEqP1yZOPE4f8BN7VS1vZcEFHqyF0dn0Qr8ou0t Qi3umUy1mH+xWYgoQam6C+XdNTOO0iwpvt7DCiyc9nX+U8+aBUV+9sAqre4vgca9JocE 3F9O3eBH9AyjbpAlkVJMpkMzHanuT+yFMWAqghPiIYSsna4gyaxpvvhrgFt8196ayndS GmkOUcxbjng5xCovVxuoTFty3CQDzYwNlW2SaOM0acCrf+i7qikEY0c6mbc5gimPc/7L IYvrAUhqQYq5o6thYdLdhj9+INjPePBS6ONdDgUXOzM25P18fCH1KQ3BLcK6Cjn7nFk3 stKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aZAe5/QuAbq/RHBzy6OF/4DQuFxdnGK9gRe+n2IiOXg=; b=ZCPSlx6UKXlhejQEo8D+/BlyUhKardzspy3BraRBLQvqwKhIcYgF6k3Ac4Gbbsiaba tisYN61punv+n1uMBMAoGb+7EJek3YEeUNCYBTrQusX/WtQGTLRe1b5Woq7QQv6ipgjt Gt3gCyz7GXB1Dvc6phO6Cn3LyFwZudDPLhSkv0UBFBYpgnnRVLP0yOCs30cCjL1czbmF nEryXNIUiyFhOhH8rPYTrmC5V2eivc6V+ajLp8NNGBz5ah/KFRqBNRvrphxuR9rGR7nD Wj3wfE79reZbT1M3u4GvQXEgcs+6iMI0GIdlnJJLqFJWM+Ah4Tj68PX7isT8jPA9Vqf+ VAUQ== X-Gm-Message-State: APjAAAVvaPr/qXCPS5zx2t2s2lovtIujo64icJoZbXhvi4kGhBlP97MQ /09MEYIAWLP1R02g/a4rv+7k7XlULFs= X-Received: by 2002:a5d:4f0d:: with SMTP id c13mr2141228wru.117.1559211903205; Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id s9sm2304564wmc.1.2019.05.30.03.25.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:01 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 113A61FFAE; Thu, 30 May 2019 11:16:06 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:16:01 +0100 Message-Id: <20190530101603.22254-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::444 Subject: [Qemu-devel] [PATCH v1 24/26] tests/vm: netbsd autoinstall, using serial console X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Gerd Hoffmann , Kamil Rytarowski , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Instead of fetching the prebuilt image from patchew download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Signed-off-by: Gerd Hoffmann Reviewed-by: Kamil Rytarowski Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-13-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/netbsd | 187 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 177 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/tests/vm/netbsd b/tests/vm/netbsd index 4c6624ea5ed..6dbfc1b0fbe 100755 --- a/tests/vm/netbsd +++ b/tests/vm/netbsd @@ -2,10 +2,11 @@ # # NetBSD VM image # -# Copyright 2017 Red Hat Inc. +# Copyright 2017-2019 Red Hat Inc. # # Authors: # Fam Zheng +# Gerd Hoffmann # # This code is licensed under the GPL version 2 or later. See # the COPYING file in the top-level directory. @@ -13,32 +14,198 @@ import os import sys +import time import subprocess import basevm class NetBSDVM(basevm.BaseVM): name = "netbsd" arch = "x86_64" + + link = "https://cdn.netbsd.org/pub/NetBSD/NetBSD-8.0/images/NetBSD-8.0-amd64.iso" + size = "20G" + pkgs = [ + # tools + "git-base", + "pkgconf", + "xz", + "python37", + + # gnu tools + "bash", + "gmake", + "gsed", + "flex", "bison", + + # libs: crypto + "gnutls", + + # libs: images + "jpeg", + "png", + + # libs: ui + "SDL2", + "gtk3+", + "libxkbcommon", + ] + BUILD_SCRIPT = """ set -e; - rm -rf /var/tmp/qemu-test.* - cd $(mktemp -d /var/tmp/qemu-test.XXXXXX); + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; tar -xf /dev/rld1a; - ./configure --python=python2.7 {configure_opts}; + cd ../build + ../src/configure --python=python3.7 --disable-opengl {configure_opts}; gmake --output-sync -j{jobs} {target} {verbose}; """ + poweroff = "/sbin/poweroff" def build_image(self, img): - cimg = self._download_with_cache("http://download.patchew.org/netbsd-7.1-amd64.img.xz", - sha256sum='b633d565b0eac3d02015cd0c81440bd8a7a8df8512615ac1ee05d318be015732') - img_tmp_xz = img + ".tmp.xz" + cimg = self._download_with_cache(self.link) img_tmp = img + ".tmp" - sys.stderr.write("Extracting the image...\n") - subprocess.check_call(["cp", "-f", cimg, img_tmp_xz]) - subprocess.check_call(["xz", "-dvf", img_tmp_xz]) + iso = img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args = [ + "-device", "VGA", + "-machine", "graphics=off", + "-cdrom", iso + ]) + self.console_init() + self.console_wait("Primary Bootstrap") + + # serial console boot menu output doesn't work for some + # reason, so we have to fly blind ... + for char in list("5consdev com0\n"): + time.sleep(0.2) + self.console_send(char) + self.console_wait("") + self.console_wait_send("> ", "boot\n") + + self.console_wait_send("Terminal type", "xterm\n") + self.console_wait_send("a: Installation messages", "a\n") + self.console_wait_send("b: US-English", "b\n") + self.console_wait_send("a: Install NetBSD", "a\n") + self.console_wait("Shall we continue?") + self.console_wait_send("b: Yes", "b\n") + + self.console_wait_send("a: ld0", "a\n") + self.console_wait_send("a: This is the correct", "a\n") + self.console_wait_send("b: Use the entire disk", "b\n") + self.console_wait("NetBSD bootcode") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("b: Use existing part", "b\n") + self.console_wait_send("x: Partition sizes ok", "x\n") + self.console_wait_send("for your NetBSD disk", "\n") + self.console_wait("Shall we continue?") + self.console_wait_send("b: Yes", "b\n") + + self.console_wait_send("b: Use serial port com0", "b\n") + self.console_wait_send("f: Set serial baud rate", "f\n") + self.console_wait_send("a: 9600", "a\n") + self.console_wait_send("x: Exit", "x\n") + + self.console_wait_send("a: Full installation", "a\n") + self.console_wait_send("a: CD-ROM", "a\n") + + self.print_step("Installation started now, this will take a while") + self.console_wait_send("Hit enter to continue", "\n") + + self.console_wait_send("d: Change root password", "d\n") + self.console_wait_send("a: Yes", "a\n") + self.console_wait("New password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("New password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Retype new password:") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("o: Add a user", "o\n") + self.console_wait("username") + self.console_send("%s\n" % self.GUEST_USER) + self.console_wait("to group wheel") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("a: /bin/sh", "a\n") + self.console_wait("New password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("New password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Retype new password:") + self.console_send("%s\n" % self.GUEST_PASS) + + self.console_wait_send("a: Configure network", "a\n") + self.console_wait_send("a: vioif0", "a\n") + self.console_wait_send("Network media type", "\n") + self.console_wait("autoconfiguration") + self.console_wait_send("a: Yes", "a\n") + self.console_wait_send("DNS domain", "localnet\n") + self.console_wait("Are they OK?") + self.console_wait_send("a: Yes", "a\n") + self.console_wait("installed in /etc") + self.console_wait_send("a: Yes", "a\n") + + self.console_wait_send("e: Enable install", "e\n") + proxy = os.environ.get("http_proxy") + if not proxy is None: + self.console_wait_send("f: Proxy", "f\n") + self.console_wait("Proxy") + self.console_send("%s\n" % proxy) + self.console_wait_send("x: Install pkgin", "x\n") + self.console_init(1200) + self.console_wait_send("Hit enter to continue", "\n") + self.console_init() + + self.console_wait_send("g: Enable sshd", "g\n") + self.console_wait_send("x: Finished conf", "x\n") + self.console_wait_send("Hit enter to continue", "\n") + + self.print_step("Installation finished, rebooting") + self.console_wait_send("d: Reboot the computer", "d\n") + + # setup qemu user + prompt = "localhost$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt = "localhost#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'chmod 666 /dev/rld1a' >> /etc/rc.local\n") + + # turn off mprotect (conflicts with tcg) + self.console_wait(prompt) + self.console_send("echo security.pax.mprotect.enabled=0 >> /etc/sysctl.conf\n") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("pkgin update\n") + self.ssh_root_check("pkgin -y install %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("entering state S5") + self.wait() + if os.path.exists(img): os.remove(img) os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") if __name__ == "__main__": sys.exit(basevm.main(NetBSDVM)) From patchwork Thu May 30 10:16:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165417 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp770661ili; Thu, 30 May 2019 03:23:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxemRNs3e997BMTtVrOyaXBCXskHqsY+19HSwv9kfQLwUQ0PToGEZcbGK1+53wwYT98dSIL X-Received: by 2002:ac8:2454:: with SMTP id d20mr2638814qtd.266.1559211787547; Thu, 30 May 2019 03:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559211787; cv=none; d=google.com; s=arc-20160816; b=WGv8rerDdPttz46Vu1fx05Nn7M1r3vtj3eM/xbF43DFWaNKfzCzzkANjWwKhUH5mAN iUAGtOMZvFuyDC+8D9clKU/NQBTgQxUKvoBFAlcjsgSyGvVvLEYnwp0f7xB3X+pU4eog UKt/Z1qBMsH+qtZDX4g/jk9Zj0T5Utki0C1aEou1xp0dFYhXuDj1YU/2G2HibmqIt6GY 3De+ztD7kpzR95qAaqYyWcMi1FB5jHQQvLZ1L9h/DPCjaX7PfwoZqS/qVvYVcYFzlSdr zJ6wUzvh8LxUVBoKNew5GlaWKc/kWccHEhR3KhZSXGmMIXm1dd4nozBQ8EKn2SgNZe/f Kujw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=dF2Xpj04JhKy3oIojWgfJAl18N1uBEDIDiQKZRkPPHE=; b=O8iTE0vJOdxhHdn+zxwE/2ODPtzHwJfoWEvJWNN85xOspCmj5QgxMEgkMCR4GBtTLz VIGuXgrArQ09jGiPohB9sfMbtgd7BB0u+IITEV2q/Oj2jc7WoUaPBkjBp7qTnid3RX+8 /p0yFreIorcHbIxLA1u2NfhK1EYpCznr49IvwQqAJOe9vo4ok2PtlAlCD5LpLv5v+Vg9 xxbF5Vj0GX7o8TqhRA42WZsMvmfqRfjx7gT0VHV7CNeOzZ4cEKO9i1xSilfFquBVTn5S dCjIntoevQwGP2Him5mo7/c3MplOPmVzAsw3IZEeoPrroWaVyqTWDNbUgwukiq97k7/G C69w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=p5E84X6s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p66si1507924qkf.185.2019.05.30.03.23.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=p5E84X6s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:50629 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIDC-0007Yj-V4 for patch@linaro.org; Thu, 30 May 2019 06:23:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWI6i-0002kt-3o for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWI6f-0006du-Fv for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:23 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:33978) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWI6f-0006d3-6r for qemu-devel@nongnu.org; Thu, 30 May 2019 06:16:21 -0400 Received: by mail-wr1-x443.google.com with SMTP id f8so3845051wrt.1 for ; Thu, 30 May 2019 03:16:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dF2Xpj04JhKy3oIojWgfJAl18N1uBEDIDiQKZRkPPHE=; b=p5E84X6snfABOEe9EKK76wKIzgtBZXLsSB6Ur1wZJFpEI6VPJI7X9EfbW+SIXKM/GB AuPKs4IvKa8rLXWqDnofhEoqR+O4qUCVgz0m3vOoGK0T1RTv7tdwOHHgLc8xIrRRwKAn JmBUPTmuuMUukCGssynri+mOqIQVNHKl64nHEPSDQ59DMwBjml0ZUQ725NXbwW4xyLPq G2FAyD0tXTYaOSwOrlkCjMB9Zb3JRXIemc2w9kieCjGdxcuuESH7gO8eC94EIGX6rbX3 gMXUKwhOkPCc7313P70HR/9gvXbK3gITzBKj6WmT9aU4ystUTBT/ORZgwC/w/yeNFsKu rkBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dF2Xpj04JhKy3oIojWgfJAl18N1uBEDIDiQKZRkPPHE=; b=qWILPlCny7b08Wlzsq+k99n43rC3X64hLZFzRwJ2sbmUt5AONYLF74BwTU+BpY5E7C yjTsqPIIdk7L45/Ni5WIP/7jctsnLRf+PntVXXiwsLDKrE4NghZ82lYKaC8udLS0xzUo WlkmuN7ecK+L9mQhOLPycxnNl+6P8uBTvjHTzmYveoxME1S5Rj+xmQ2bRZ+VDkZUvlPO t4IQKdWyccq5XnKQbyqV2oXEVfxv6l0qAjUK6Az4AifqSTJGFRLkTzk+w5rFer/els+L nm1jjbauC7cDkBfz4K216y9O4BaMKsGx8yMCsxpncJsBDZAgosCQ5D0JoU+Y6o91SIEz ONUw== X-Gm-Message-State: APjAAAU1z3ZAmBhC5Re8ACdjsMjTF+LQgYlwYxYgidTTs/YndbO+ncmJ 3HO04SFnAP5fzYfJcwHHFgikzg== X-Received: by 2002:a5d:4104:: with SMTP id l4mr2066716wrp.302.1559211380121; Thu, 30 May 2019 03:16:20 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id b5sm1949162wrx.22.2019.05.30.03.16.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:16:17 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 29EE21FFAF; Thu, 30 May 2019 11:16:06 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:16:02 +0100 Message-Id: <20190530101603.22254-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v1 25/26] tests/vm: fedora autoinstall, using serial console X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Download the install iso and prepare the image locally. Install to disk, using the serial console. Create qemu user, configure ssh login. Install packages needed for qemu builds. Yes, we have docker images for fedora. But for trouble-shooting it might be helpful to have a vm too. When vm builds fail you can use it to figure whenever the vm setup or the guest os is the problem. Signed-off-by: Gerd Hoffmann Tested-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-14-kraxel@redhat.com> Signed-off-by: Alex Bennée --- tests/vm/Makefile.include | 3 +- tests/vm/basevm.py | 9 +- tests/vm/fedora | 187 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 197 insertions(+), 2 deletions(-) create mode 100755 tests/vm/fedora -- 2.20.1 diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 628eecade78..5e37063d32d 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -2,7 +2,7 @@ .PHONY: vm-build-all vm-clean-all -IMAGES := ubuntu.i386 freebsd netbsd openbsd centos +IMAGES := ubuntu.i386 freebsd netbsd openbsd centos fedora IMAGES_DIR := $(HOME)/.cache/qemu-vm/images IMAGE_FILES := $(patsubst %, $(IMAGES_DIR)/%.img, $(IMAGES)) @@ -16,6 +16,7 @@ vm-test: @echo " vm-build-netbsd - Build QEMU in NetBSD VM" @echo " vm-build-openbsd - Build QEMU in OpenBSD VM" @echo " vm-build-centos - Build QEMU in CentOS VM, with Docker" + @echo " vm-build-fedora - Build QEMU in Fedora VM" @echo "" @echo " vm-build-all - Build QEMU in all VMs" @echo " vm-clean-all - Clean up VM images" diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 8894267f078..d4b816be14d 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -205,7 +205,7 @@ class BaseVM(object): # log console line sys.stderr.write("con recv: %s\n" % line) - def console_wait(self, expect): + def console_wait(self, expect, expectalt = None): vm = self._guest output = "" while True: @@ -214,6 +214,8 @@ class BaseVM(object): except socket.timeout: sys.stderr.write("console: *** read timeout ***\n") sys.stderr.write("console: waiting for: '%s'\n" % expect) + if not expectalt is None: + sys.stderr.write("console: waiting for: '%s' (alt)\n" % expectalt) sys.stderr.write("console: line buffer:\n") sys.stderr.write("\n") self.console_log(output.rstrip()) @@ -222,6 +224,8 @@ class BaseVM(object): output += chars.decode("latin1") if expect in output: break + if not expectalt is None and expectalt in output: + break if "\r" in output or "\n" in output: lines = re.split("[\r\n]", output) output = lines.pop() @@ -229,6 +233,9 @@ class BaseVM(object): self.console_log("\n".join(lines)) if self.debug: self.console_log(output) + if not expectalt is None and expectalt in output: + return False + return True def console_send(self, command): vm = self._guest diff --git a/tests/vm/fedora b/tests/vm/fedora new file mode 100755 index 00000000000..c5621d08322 --- /dev/null +++ b/tests/vm/fedora @@ -0,0 +1,187 @@ +#!/usr/bin/env python +# +# Fedora VM image +# +# Copyright 2019 Red Hat Inc. +# +# Authors: +# Gerd Hoffmann +# +# This code is licensed under the GPL version 2 or later. See +# the COPYING file in the top-level directory. +# + +import os +import re +import sys +import time +import socket +import subprocess +import basevm + +class FedoraVM(basevm.BaseVM): + name = "fedora" + arch = "x86_64" + + base = "http://dl.fedoraproject.org/pub/fedora/linux/releases/30/" + link = base + "Server/x86_64/iso/Fedora-Server-netinst-x86_64-30-1.2.iso" + repo = base + "Server/x86_64/os/" + full = base + "Everything/x86_64/os/" + csum = "5e4eac4566d8c572bfb3bcf54b7d6c82006ec3c6c882a2c9235c6d3494d7b100" + size = "20G" + pkgs = [ + # tools + 'git-core', + 'flex', 'bison', + 'gcc', 'binutils', 'make', + + # perl + 'perl-Test-Harness', + + # libs: usb + '"pkgconfig(libusb-1.0)"', + '"pkgconfig(libusbredirparser-0.5)"', + + # libs: crypto + '"pkgconfig(gnutls)"', + + # libs: ui + '"pkgconfig(sdl2)"', + '"pkgconfig(gtk+-3.0)"', + '"pkgconfig(ncursesw)"', + + # libs: audio + '"pkgconfig(libpulse)"', + '"pkgconfig(alsa)"', + ] + + BUILD_SCRIPT = """ + set -e; + rm -rf /home/qemu/qemu-test.* + cd $(mktemp -d /home/qemu/qemu-test.XXXXXX); + mkdir src build; cd src; + tar -xf /dev/vdb; + cd ../build + ../src/configure --python=python3 {configure_opts}; + gmake --output-sync -j{jobs} {target} {verbose}; + """ + + def build_image(self, img): + self.print_step("Downloading install iso") + cimg = self._download_with_cache(self.link, sha256sum=self.csum) + img_tmp = img + ".tmp" + iso = img + ".install.iso" + + self.print_step("Preparing iso and disk image") + subprocess.check_call(["cp", "-f", cimg, iso]) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", + img_tmp, self.size]) + + self.print_step("Booting installer") + self.boot(img_tmp, extra_args = [ + "-machine", "graphics=off", + "-cdrom", iso + ]) + self.console_init(300) + self.console_wait("installation process.") + time.sleep(0.3) + self.console_send("\t") + time.sleep(0.3) + self.console_send(" console=ttyS0") + proxy = os.environ.get("http_proxy") + if not proxy is None: + self.console_send(" proxy=%s" % proxy) + self.console_send(" inst.repo=%s" % self.repo) + self.console_send("\n") + + self.console_wait_send("2) Use text mode", "2\n") + + self.console_wait_send("5) [!] Installation Dest", "5\n") + self.console_wait_send("1) [x]", "c\n") + self.console_wait_send("2) [ ] Use All Space", "2\n") + self.console_wait_send("2) [x] Use All Space", "c\n") + self.console_wait_send("1) [ ] Standard Part", "1\n") + self.console_wait_send("1) [x] Standard Part", "c\n") + + self.console_wait_send("7) [!] Root password", "7\n") + self.console_wait("Password:") + self.console_send("%s\n" % self.ROOT_PASS) + self.console_wait("Password (confirm):") + self.console_send("%s\n" % self.ROOT_PASS) + + self.console_wait_send("8) [ ] User creation", "8\n") + self.console_wait_send("1) [ ] Create user", "1\n") + self.console_wait_send("3) User name", "3\n") + self.console_wait_send("ENTER:", "%s\n" % self.GUEST_USER) + self.console_wait_send("4) [ ] Use password", "4\n") + self.console_wait_send("5) Password", "5\n") + self.console_wait("Password:") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait("Password (confirm):") + self.console_send("%s\n" % self.GUEST_PASS) + self.console_wait_send("7) Groups", "c\n") + + while True: + good = self.console_wait("3) [x] Installation", + "3) [!] Installation") + self.console_send("r\n") + if good: + break + time.sleep(10) + + while True: + good = self.console_wait("4) [x] Software", + "4) [!] Software") + self.console_send("r\n") + if good: + break + time.sleep(10) + self.console_send("r\n" % self.GUEST_PASS) + + self.console_wait_send("'b' to begin install", "b\n") + + self.print_step("Installation started now, this will take a while") + + self.console_wait_send("Installation complete", "\n") + self.print_step("Installation finished, rebooting") + + # setup qemu user + prompt = " ~]$" + self.console_ssh_init(prompt, self.GUEST_USER, self.GUEST_PASS) + self.console_wait_send(prompt, "exit\n") + + # setup root user + prompt = " ~]#" + self.console_ssh_init(prompt, "root", self.ROOT_PASS) + self.console_sshd_config(prompt) + + # setup virtio-blk #1 (tarfile) + self.console_wait(prompt) + self.console_send("echo 'KERNEL==\"vdb\" MODE=\"666\"' >> %s\n" % + "/etc/udev/rules.d/99-qemu.rules") + + self.print_step("Configuration finished, rebooting") + self.console_wait_send(prompt, "reboot\n") + self.console_wait("login:") + self.wait_ssh() + + self.print_step("Installing packages") + self.ssh_root_check("rm -vf /etc/yum.repos.d/fedora*.repo\n") + self.ssh_root_check("echo '[fedora]' >> /etc/yum.repos.d/qemu.repo\n") + self.ssh_root_check("echo 'baseurl=%s' >> /etc/yum.repos.d/qemu.repo\n" % self.full) + self.ssh_root_check("echo 'gpgcheck=0' >> /etc/yum.repos.d/qemu.repo\n") + self.ssh_root_check("dnf install -y %s\n" % " ".join(self.pkgs)) + + # shutdown + self.ssh_root(self.poweroff) + self.console_wait("sleep state S5") + self.wait() + + if os.path.exists(img): + os.remove(img) + os.rename(img_tmp, img) + os.remove(iso) + self.print_step("All done") + +if __name__ == "__main__": + sys.exit(basevm.main(FedoraVM)) From patchwork Thu May 30 10:16:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 165434 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp785662ili; Thu, 30 May 2019 03:38:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEr4gCxM4Mye+Dzz9UchHAvMF2FrptjeCgzbcF0H2cGxcaDW1+JCrAhZjKkyPsVi2IWygL X-Received: by 2002:aed:2494:: with SMTP id t20mr2666147qtc.135.1559212699841; Thu, 30 May 2019 03:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559212699; cv=none; d=google.com; s=arc-20160816; b=pJe6346W1ACpoDd8i7RoA9qSLAsiRktb0oEGrBbGy7iVRw7XVpVaklkQaex2wqff7y n2+fd/osFEA7BzTMIxeP5IJFq7+bUSJq99kIXcUAIszV0bP7D/x1w8o7/n7vgQZMPw/V 1RrAaNE1D1sjeUAs73NsSdcPoabJF7fozgFOJgo7l2fGyYRldvu35M8StKtLiI3GWTda Sa6XzQq5+kxWQn+bUJb4e6tYleS9tCAPWl1YlWtE65Hl+PFJ+BWogrQDNC19fmKh+5KS 4P6CNcLsCM/rEq5kgGv6P9EEBys8cUIQzPKkzvkGpgRT5p1DRG1DMnJRiLYvrQp/3qsm t6Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=CpnAoS/0GcDEawDwz3KOhZJ7qTcVFE5i2TefLG4nXpc=; b=KVssoC5aRq+9CFk+o4edQGounxhIOR79UyxX5z1CBNNybmBdX2/AoOWgya70F3gJMP hzHNmuJVNC+NDnaAyQxTcY+QJ/dcWFjhNIuBvpjTxWYE8ywFy4uT5Qt9aAT/sqgLL233 oleOOF6x03712ZlMZgXLMIbhe78irwbIEdXwFw+0L08dSG1PE5mbk6DCSMe29ufnwvmF 360iAfUbUE+o90Pbyn2s+MQen5x/5Vq1g7q4+s/6syH56CdD3lkxbzKt4kgtgZAeNiSo 2FPwft3i55CGT+KY2o70Sn0V4ynlz2kEZsIor+HjKMenAJ5DK2zCJh0JOV0PCGd0Xwam E5Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GK2VeXpK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h20si1413789qkg.262.2019.05.30.03.38.19 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 30 May 2019 03:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GK2VeXpK; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:51168 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIRv-00035U-Fy for patch@linaro.org; Thu, 30 May 2019 06:38:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWIFF-0001Ee-RR for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWIFD-0000IW-Lp for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:13 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:46629) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWIFD-00006h-AK for qemu-devel@nongnu.org; Thu, 30 May 2019 06:25:11 -0400 Received: by mail-wr1-x442.google.com with SMTP id r7so3808391wrr.13 for ; Thu, 30 May 2019 03:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CpnAoS/0GcDEawDwz3KOhZJ7qTcVFE5i2TefLG4nXpc=; b=GK2VeXpKbHRBUYHZ7j7VMimnF5DLHkozn5ZPwW/6q3H97FNgcCI7K4F2fiRUIVEshy G8cf6CDAVzIG3dw4cZjUU0RaP/v5q72ZtmQPZU+BcZIAOvzk2lF+6L7hOoYuIjNxv/ww RAtkT3judKRtxA88y79MLUew2Fx/dfp9KcOJU+qj2wHvE/IOnJGevtUbyMo0Jnv0PxIf WBQ7Qi1UZEWA66dLCC0BKb0nm8AVot4UO133jMd9wLw/6cQ0EhO+XAmkRwu8/0bwDMiv Fii3C19vJ2cw7iOTtgRxTkxf/7h/gTK/JuXyx/91yUw1l67y0UeRw4VcP2AqCYOJTRFA CePg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CpnAoS/0GcDEawDwz3KOhZJ7qTcVFE5i2TefLG4nXpc=; b=K8TnCsLYip2GtkVRB47LHv0FSWfZ7jhSGeaULfY1DQu1ZRfD/nwFe5cBXwKtCYNglk t9l5Wa8b2uiUS07OWbPPt6SxET7ymn6apLY4/4ELitZbu2Dpm8N0entVGfYOCF+JPp2l d0+B2NRMVZ5ZPFADcH+5GHlpzG4xDleSFvUN2lbBVSIalonj+HH05CZtyzzXcRsFgVhI fN5WOldbTcTQ2U/V00nWUGa7Mm+OKFIJwcgs0lrg6EJS4d6UzRdQAA4oQpEg32GWVpQX VP30PKpHnDThDDTmbJm0iRPMjHSNE9pQMhCl0P18x16vFzV++ihtre6Hn7UWdKwBg/jo iHYg== X-Gm-Message-State: APjAAAWpUkOshhtA1fFQcFhP2Vy6IgHI2zkkmzsvndhDJHhfuq68WoeV 34fScFBdGQ6nhCqf8xpH6R83jQ== X-Received: by 2002:a5d:4d46:: with SMTP id a6mr2176257wru.142.1559211904702; Thu, 30 May 2019 03:25:04 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id p16sm4156798wrg.49.2019.05.30.03.25.01 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 30 May 2019 03:25:03 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3E06B1FFB1; Thu, 30 May 2019 11:16:06 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 30 May 2019 11:16:03 +0100 Message-Id: <20190530101603.22254-27-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190530101603.22254-1-alex.bennee@linaro.org> References: <20190530101603.22254-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v1 26/26] tests/vm: ubuntu.i386: apt proxy setup X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Configure apt proxy so package downloads can be cached and can pass firewalls. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190520124716.30472-15-kraxel@redhat.com> --- tests/vm/ubuntu.i386 | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 diff --git a/tests/vm/ubuntu.i386 b/tests/vm/ubuntu.i386 index a22d137e76d..b869afd212f 100755 --- a/tests/vm/ubuntu.i386 +++ b/tests/vm/ubuntu.i386 @@ -51,6 +51,10 @@ class UbuntuX86VM(basevm.BaseVM): " ssh-authorized-keys:\n", " - %s\n" % basevm.SSH_PUB_KEY, "locale: en_US.UTF-8\n"]) + proxy = os.environ.get("http_proxy") + if not proxy is None: + udata.writelines(["apt:\n", + " proxy: %s" % proxy]) udata.close() subprocess.check_call(["genisoimage", "-output", "cloud-init.iso", "-volid", "cidata", "-joliet", "-rock",