From nobody Wed May 8 07:22:07 2024 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; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505919331812388.24491665527614; Wed, 20 Sep 2017 07:55:31 -0700 (PDT) Received: from localhost ([::1]:48626 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dugPT-0000pq-39 for importer@patchew.org; Wed, 20 Sep 2017 10:55:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dufPw-0007HN-95 for qemu-devel@nongnu.org; Wed, 20 Sep 2017 09:51:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dufPt-0004aN-7O for qemu-devel@nongnu.org; Wed, 20 Sep 2017 09:51:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35614) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dufPs-0004Zx-Um for qemu-devel@nongnu.org; Wed, 20 Sep 2017 09:51:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D91E81E1E for ; Wed, 20 Sep 2017 09:02:16 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-116-62.ams2.redhat.com [10.36.116.62]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21BE55C888; Wed, 20 Sep 2017 09:02:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D91E81E1E Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=thuth@redhat.com From: Thomas Huth To: Jason Wang , qemu-devel@nongnu.org, "Michael S. Tsirkin" Date: Wed, 20 Sep 2017 11:02:07 +0200 Message-Id: <1505898127-5914-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 20 Sep 2017 09:02:16 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] tests/pxe: Test more NICs when running in SPEED=slow mode 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: Victor Kaplansky Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The pxe-test is a very good test to excercise NICs, thus we should use it to test all NICs that can be used by the BIOS for booting via network. However, to avoid that the default testing time increases too much, the additional NICs are only tested in the "make check SPEED=3Dslow" mode. The virtio-net NIC on ppc64 is now also only tested in slow mode, since the test on ppc64 is really quite slow and we've got test coverage for virtio-net in big endian mode now on s390x, too. Signed-off-by: Thomas Huth --- tests/pxe-test.c | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/tests/pxe-test.c b/tests/pxe-test.c index 0d70afc..937f29e 100644 --- a/tests/pxe-test.c +++ b/tests/pxe-test.c @@ -1,11 +1,12 @@ /* * PXE test cases. * - * Copyright (c) 2016 Red Hat Inc. + * Copyright (c) 2016, 2017 Red Hat Inc. * * Authors: * Michael S. Tsirkin , * Victor Kaplansky + * Thomas Huth * * This work is licensed under the terms of the GNU GPL, version 2 or late= r. * See the COPYING file in the top-level directory. @@ -36,14 +37,14 @@ static void test_pxe_one(const char *params, bool ipv6) g_free(args); } =20 -static void test_pxe_e1000(void) +static void test_pxe_ipv4(gconstpointer data) { - test_pxe_one("-device e1000,netdev=3D" NETNAME, false); -} + const char *model =3D data; + char *dev_arg; =20 -static void test_pxe_virtio_pci(void) -{ - test_pxe_one("-device virtio-net-pci,netdev=3D" NETNAME, false); + dev_arg =3D g_strdup_printf("-device %s,netdev=3D" NETNAME, model); + test_pxe_one(dev_arg, false); + g_free(dev_arg); } =20 static void test_pxe_spapr_vlan(void) @@ -68,11 +69,21 @@ int main(int argc, char *argv[]) g_test_init(&argc, &argv, NULL); =20 if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { - qtest_add_func("pxe/e1000", test_pxe_e1000); - qtest_add_func("pxe/virtio", test_pxe_virtio_pci); + qtest_add_data_func("pxe/e1000", "e1000", test_pxe_ipv4); + qtest_add_data_func("pxe/virtio", "virtio-net-pci", test_pxe_ipv4); + if (g_test_slow()) { + qtest_add_data_func("pxe/ne2000", "ne2k_pci", test_pxe_ipv4); + qtest_add_data_func("pxe/eepro100", "i82550", test_pxe_ipv4); + qtest_add_data_func("pxe/pcnet", "pcnet", test_pxe_ipv4); + qtest_add_data_func("pxe/rtl8139", "rtl8139", test_pxe_ipv4); + qtest_add_data_func("pxe/vmxnet3", "vmxnet3", test_pxe_ipv4); + } } else if (strcmp(arch, "ppc64") =3D=3D 0) { - qtest_add_func("pxe/virtio", test_pxe_virtio_pci); qtest_add_func("pxe/spapr-vlan", test_pxe_spapr_vlan); + if (g_test_slow()) { + qtest_add_data_func("pxe/virtio", "virtio-net-pci", test_pxe_i= pv4); + qtest_add_data_func("pxe/e1000", "e1000", test_pxe_ipv4); + } } else if (g_str_equal(arch, "s390x")) { qtest_add_func("pxe/virtio-ccw", test_pxe_virtio_ccw); } --=20 1.8.3.1