From nobody Wed Nov 5 14:26:06 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1534871152431577.3502291726377; Tue, 21 Aug 2018 10:05:52 -0700 (PDT) Received: from localhost ([::1]:54949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsA6J-0003yH-6h for importer@patchew.org; Tue, 21 Aug 2018 13:05:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsA3x-0001Al-8X for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsA3o-0005hC-O3 for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:20 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:37167) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsA3n-0005c0-JN for qemu-devel@nongnu.org; Tue, 21 Aug 2018 13:03:16 -0400 Received: by mail-wr1-x42f.google.com with SMTP id u12-v6so16460851wrr.4 for ; Tue, 21 Aug 2018 10:03:15 -0700 (PDT) Received: from 640k.lan (dynamic-adsl-78-12-184-244.clienti.tiscali.it. [78.12.184.244]) by smtp.gmail.com with ESMTPSA id v6-v6sm2608955wmc.43.2018.08.21.10.03.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Aug 2018 10:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=TWZzAulVo+A0Kz/7z6ngW5EJM7sxfjkxlRE2NVAR6vA=; b=gcwnOWA9A9mu+X45/CsL5sdHyGsoDePHH+Hq8lcnE+s7xaNKikeGj+Um686bgscZ8D GoQwFvsWEq93g/s7+9kUWVJY4+tLosP0w9L6g8oZY5GXop02xbcVvp4nWeiHmzJV2Ya4 Pq5KkOYXOANMD9ASw3eMPRIjs8O8ky6Wq3kuqNgZmnJNJhef/TFYJVcjQLD8RN11vg2w ydkrxARXD/zErHwdMsoPStjiZzK+x/fdDw/FIxD7ESZrfOkBOvIWKuweAnk+8kix5thU jhJRCKFKOYvnLlWo4TOFoz+9zpGwm1YNnmtFxZx4fv0lfAnjXw4oCq9B7dwA1skoTMFC 1t2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=TWZzAulVo+A0Kz/7z6ngW5EJM7sxfjkxlRE2NVAR6vA=; b=OiG9S7R5fydt6kG3dc30KU3pscGE18/5JEPlFLashdvNQ+nEX7iDTsHiScOHnL6dxt hLfGjFN+5T8+QQ/B+SpzUdtK4YjvjYpON0BQYt8+nTjPFCtRj72DAu9ZMBf0rOg1g0dt 11wyVEENviUYwpL+d4RmWAGlRpTDLQvambuC/6Va0GvynkHKL8WQYTaK8mT2zVTW0zeA wDLFvM7G5Nz/cKeOjrqJCDObV2YAqcJA52vhq0JcF7cgpw/5eNXWOr8sQ5WyuAeuhwLg dOBOWg/LsX2DEvo/Q0bTcwOr2hA8OTa2AYzo5bs3aW0EzVc/4YQvI73aJ8src4/o81sB 46nw== X-Gm-Message-State: APzg51DQBaDCLRdvFaxt2X/iUy5+5Wzz06MRv4vcgvdAghALLWGwCUc1 d4PWPxWcELV6XKIQ8h33guqUghon X-Google-Smtp-Source: ANB0Vdbk/MwPxCLKGiMrD4W6mZazrbaf059Hge/gy4GsPbzRkXWHXr5GilxGiYY1pc9RY3pp+ZGm6A== X-Received: by 2002:adf:a602:: with SMTP id k2-v6mr12263239wrc.181.1534870994131; Tue, 21 Aug 2018 10:03:14 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 21 Aug 2018 19:01:42 +0200 Message-Id: <1534870966-9287-11-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> References: <1534870966-9287-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42f Subject: [Qemu-devel] [PULL 10/74] tests/migration-test: Silence the kvm_hv message by default 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 Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDMRC_1 RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth When running "make check" on a non-POWER host, the output is quite distorted like this: [...] GTESTER check-qtest-nios2 GTESTER check-qtest-or1k GTESTER check-qtest-ppc64 Skipping test: kvm_hv not available Skipping test: kvm_hv not available Ski= pping test: kvm_hv not available Skipping test: kvm_hv not available GTES= TER check-qtest-ppcemb GTESTER check-qtest-ppc GTESTER check-qtest-riscv32 GTESTER check-qtest-riscv64 [...] Move the check to the beginning of the main function instead, so that we do not have to test the condition again and again for each test, and better use g_test_message() instead of g_print() here, like it is also done in ufd_version_check() already. Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth Message-Id: <1534419358-10932-2-git-send-email-thuth@redhat.com> Reviewed-by: Juan Quintela Signed-off-by: Paolo Bonzini --- tests/migration-test.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/migration-test.c b/tests/migration-test.c index eb58d0a..0e687b7 100644 --- a/tests/migration-test.c +++ b/tests/migration-test.c @@ -438,15 +438,6 @@ static int test_migrate_start(QTestState **from, QTest= State **to, " -incoming %s", accel, tmpfs, bootpath, uri); } else if (strcmp(arch, "ppc64") =3D=3D 0) { - - /* On ppc64, the test only works with kvm-hv, but not with kvm-pr - * and TCG is touchy due to race conditions on dirty bits - * (especially on PPC for some reason) - */ - if (access("/sys/module/kvm_hv", F_OK)) { - g_print("Skipping test: kvm_hv not available "); - return -1; - } cmd_src =3D g_strdup_printf("-machine accel=3D%s -m 256M" " -name source,debug-threads=3Don" " -serial file:%s/src_serial" @@ -750,6 +741,17 @@ int main(int argc, char **argv) return 0; } =20 + /* + * On ppc64, the test only works with kvm-hv, but not with kvm-pr and = TCG + * is touchy due to race conditions on dirty bits (especially on PPC f= or + * some reason) + */ + if (g_str_equal(qtest_get_arch(), "ppc64") && + access("/sys/module/kvm_hv", F_OK)) { + g_test_message("Skipping test: kvm_hv not available"); + return 0; + } + tmpfs =3D mkdtemp(template); if (!tmpfs) { g_test_message("mkdtemp on path (%s): %s\n", template, strerror(er= rno)); --=20 1.8.3.1