From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by dpdk.org (Postfix) with ESMTP id B18B31066 for ; Tue, 24 Apr 2018 01:55:20 +0200 (CEST) Received: by mail-wr0-f194.google.com with SMTP id v60-v6so45723920wrc.7 for ; Mon, 23 Apr 2018 16:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=Kl11J220zIyxma9njn0AOTLXknJy+X6daj2lWCoyqvY=; b=aDOMJm1wD63AMLEGL6YMbo9Xw6Z4p7/R/RiSWh7c1e1mssFBgNgR4hndnUm/AYd+QK 6/vmkOJvohzP9kz0TJZ4dIChPphAPo9H+qxUJCtHmyNjzZNS8iGa+8VdOL5PPtkLOVHi VXnhavtxWKZNI0RCR/3bwnsJu7fMIRR+XOqzzvrramT+vYKcrG8UTlafRU7Wa+jOf63f v3FoUxwOhyn9XF5hFjtKtFOBKEPM45M7/LfKqz4Mt4XKRUQjMkDG/wwiDQ0u9BkMoF2Q 7Y7Xc2k0Hiz7ttO/pEbDvouuzSk/aYXrVGJFH9IN5aCZftxN9GnpVasEu8upe1SsBWgL LNfA== 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:in-reply-to:references; bh=Kl11J220zIyxma9njn0AOTLXknJy+X6daj2lWCoyqvY=; b=WGe1AHHmnZcYNGwIdrEMFx4wYkoWqwCrLmB+DT5dmdc/kSAytcUpLc9e5LIkPLF/4W VHxbsZXu6sCkEILc/9gxm+LUApSRxrHsE5XcfGSgfmvTLBPu3ozWesRRGq97kyEpdq5a Hrc3lXW26IoPHfJG6nsRPrEyZtg620CwOSMcLTOgn/yn4EiHdtRphQ5+HpDZkYnPEhLc SZIPa70QOgGgebZbnQLpwGQrHCT4hRec8bTAog3nDUhfx0hKQCgHoatvem3UYwj9E7t6 +r8kTjNPm0xYGog8tjiL7zMAXFyzlVAQE7ckyHY5jDwXq4nVUtAIsGXwhm0yIrifwKFF qYgg== X-Gm-Message-State: ALQs6tD8sgSvYX0lOGdKtkx7LPCydhBRT34b6mfForL8w6yorOObmsVf cxWaDSdvfaOZh6kKwG2sG+JYeI5P X-Google-Smtp-Source: AIpwx48gydBb/kNUhCE7lvrL0Q7Y4dq0SpLLSXS2e1odChwJNosDU/lqJYvO9uTR2JsndEJHY2tXXQ== X-Received: by 2002:adf:ac64:: with SMTP id v91-v6mr17582062wrc.80.1524527720025; Mon, 23 Apr 2018 16:55:20 -0700 (PDT) Received: from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 55-v6sm28922279wrw.52.2018.04.23.16.55.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 16:55:19 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet Date: Tue, 24 Apr 2018 01:54:47 +0200 Message-Id: <9fd2a316f20a05d2579fa204ba4e97f9b6516b61.1524527213.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v5 05/10] test: remove devargs unit tests X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2018 23:55:21 -0000 The current test will not be compatible anymore with a private devargs list. Moreover, the new functions should have new tests, while the existing API will be removed. The current unit tests are thus obsolete and hereby removed. Signed-off-by: Gaetan Rivet Acked-by: Thomas Monjalon --- MAINTAINERS | 1 - test/test/Makefile | 1 - test/test/test_devargs.c | 103 ----------------------------------------------- 3 files changed, 105 deletions(-) delete mode 100644 test/test/test_devargs.c diff --git a/MAINTAINERS b/MAINTAINERS index 645bd5263..1857bfd64 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -145,7 +145,6 @@ F: test/test/test_common.c F: test/test/test_cpuflags.c F: test/test/test_cycles.c F: test/test/test_debug.c -F: test/test/test_devargs.c F: test/test/test_eal* F: test/test/test_errno.c F: test/test/test_interrupts.c diff --git a/test/test/Makefile b/test/test/Makefile index c9c007c9b..2630ab484 100644 --- a/test/test/Makefile +++ b/test/test/Makefile @@ -161,7 +161,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_DISTRIBUTOR) += test_distributor_perf.c SRCS-$(CONFIG_RTE_LIBRTE_REORDER) += test_reorder.c -SRCS-y += test_devargs.c SRCS-y += virtual_pmd.c SRCS-y += packet_burst_generator.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += test_acl.c diff --git a/test/test/test_devargs.c b/test/test/test_devargs.c deleted file mode 100644 index b8f3146f6..000000000 --- a/test/test/test_devargs.c +++ /dev/null @@ -1,103 +0,0 @@ -/* SPDX-License-Identifier: BSD-3-Clause - * Copyright 2014 6WIND S.A. - */ - -#include -#include -#include -#include - -#include -#include - -#include "test.h" - -/* clear devargs list that was modified by the test */ -static void free_devargs_list(void) -{ - struct rte_devargs *devargs; - - while (!TAILQ_EMPTY(&devargs_list)) { - devargs = TAILQ_FIRST(&devargs_list); - TAILQ_REMOVE(&devargs_list, devargs, next); - free(devargs->args); - free(devargs); - } -} - -static int -test_devargs(void) -{ - struct rte_devargs_list save_devargs_list; - struct rte_devargs *devargs; - - /* save the real devargs_list, it is restored at the end of the test */ - save_devargs_list = devargs_list; - TAILQ_INIT(&devargs_list); - - /* test valid cases */ - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "08:00.1") < 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "0000:5:00.0") < 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "04:00.0,arg=val") < 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_BLACKLISTED_PCI, "0000:01:00.1") < 0) - goto fail; - if (rte_eal_devargs_type_count(RTE_DEVTYPE_WHITELISTED_PCI) != 2) - goto fail; - if (rte_eal_devargs_type_count(RTE_DEVTYPE_BLACKLISTED_PCI) != 2) - goto fail; - if (rte_eal_devargs_type_count(RTE_DEVTYPE_VIRTUAL) != 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring0") < 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring1,key=val,k2=val2") < 0) - goto fail; - if (rte_eal_devargs_type_count(RTE_DEVTYPE_VIRTUAL) != 2) - goto fail; - free_devargs_list(); - - /* check virtual device with argument parsing */ - if (rte_eal_devargs_add(RTE_DEVTYPE_VIRTUAL, "net_ring1,k1=val,k2=val2") < 0) - goto fail; - devargs = TAILQ_FIRST(&devargs_list); - if (strncmp(devargs->name, "net_ring1", - sizeof(devargs->name)) != 0) - goto fail; - if (!devargs->args || strcmp(devargs->args, "k1=val,k2=val2") != 0) - goto fail; - free_devargs_list(); - - /* check PCI device with empty argument parsing */ - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "04:00.1") < 0) - goto fail; - devargs = TAILQ_FIRST(&devargs_list); - if (strcmp(devargs->name, "04:00.1") != 0) - goto fail; - if (!devargs->args || strcmp(devargs->args, "") != 0) - goto fail; - free_devargs_list(); - - /* test error case: bad PCI address */ - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "08:1") == 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "00.1") == 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "foo") == 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, ",") == 0) - goto fail; - if (rte_eal_devargs_add(RTE_DEVTYPE_WHITELISTED_PCI, "000f:0:0") == 0) - goto fail; - - devargs_list = save_devargs_list; - return 0; - - fail: - free_devargs_list(); - devargs_list = save_devargs_list; - return -1; -} - -REGISTER_TEST_COMMAND(devargs_autotest, test_devargs); -- 2.11.0