From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 5F8C14CE4 for ; Mon, 13 Jun 2016 10:17:47 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3rSlyM1Ty8zBqC; Mon, 13 Jun 2016 10:17:47 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Thomas Monjalon , David Marchand , Bruce Richardson Date: Mon, 13 Jun 2016 10:12:28 +0200 Message-Id: <1465805550-30640-9-git-send-email-viktorin@rehivetech.com> X-Mailer: git-send-email 2.8.0 In-Reply-To: <1465805550-30640-1-git-send-email-viktorin@rehivetech.com> References: <1465805550-30640-1-git-send-email-viktorin@rehivetech.com> In-Reply-To: <1463510101-5633-1-git-send-email-viktorin@rehivetech.com> References: <1463510101-5633-1-git-send-email-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH v4 08/10] app/test: convert current pci_test into a single test case X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jun 2016 08:17:47 -0000 The current test_pci is just a single test case that tests the blacklisting of devices. Rename it to test_pci_blacklist and call it from the test_pci. The setup and cleanup are moved out of the test_pci_blacklist entirely to cover all other tests. Signed-off-by: Jan Viktorin --- v4 * the definitions of setup and cleanup functions are NOT moved (T. Monjalon) --- app/test/test_pci.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/app/test/test_pci.c b/app/test/test_pci.c index 50078a0..28d710b 100644 --- a/app/test/test_pci.c +++ b/app/test/test_pci.c @@ -178,17 +178,14 @@ test_pci_cleanup(void) return 0; } -int -test_pci(void) +static int +test_pci_blacklist(void) { struct rte_devargs_list save_devargs_list; printf("Dump all devices\n"); rte_eal_pci_dump(stdout); - if (test_pci_setup()) - return -1; - rte_eal_pci_register(&my_driver); rte_eal_pci_register(&my_driver2); @@ -224,6 +221,18 @@ test_pci(void) rte_eal_pci_unregister(&my_driver); rte_eal_pci_unregister(&my_driver2); + return 0; +} + +int +test_pci(void) +{ + if (test_pci_setup()) + return -1; + + if (test_pci_blacklist()) + return -1; + if (test_pci_cleanup()) return -1; -- 2.8.0