app/test: remove ifdefs for cmdline library

Message ID 20231214113021.517622-1-bruce.richardson@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series app/test: remove ifdefs for cmdline library |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Bruce Richardson Dec. 14, 2023, 11:30 a.m. UTC
  The DPDK unit test binary relies on cmdline library and cannot do
anything without it being present. As it's a mandatory dependency we can
remove the ifdefs for it from main.c

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 app/test/test.c | 6 ------
 1 file changed, 6 deletions(-)
  

Comments

Tyler Retzlaff Dec. 14, 2023, 5:03 p.m. UTC | #1
On Thu, Dec 14, 2023 at 11:30:21AM +0000, Bruce Richardson wrote:
> The DPDK unit test binary relies on cmdline library and cannot do
> anything without it being present. As it's a mandatory dependency we can
> remove the ifdefs for it from main.c
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---

Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  
David Marchand Feb. 1, 2024, 10:33 a.m. UTC | #2
On Thu, Dec 14, 2023 at 6:03 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> On Thu, Dec 14, 2023 at 11:30:21AM +0000, Bruce Richardson wrote:
> > The DPDK unit test binary relies on cmdline library and cannot do
> > anything without it being present. As it's a mandatory dependency we can
> > remove the ifdefs for it from main.c
> >
> > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>

Applied, thanks.
  

Patch

diff --git a/app/test/test.c b/app/test/test.c
index bfa9ea52e3..c818fda17b 100644
--- a/app/test/test.c
+++ b/app/test/test.c
@@ -11,13 +11,11 @@ 
 #include <ctype.h>
 #include <sys/queue.h>
 
-#ifdef RTE_LIB_CMDLINE
 #include <cmdline_rdline.h>
 #include <cmdline_parse.h>
 #include <cmdline_socket.h>
 #include <cmdline.h>
 extern cmdline_parse_ctx_t main_ctx[];
-#endif
 
 #include <rte_memory.h>
 #include <rte_eal.h>
@@ -106,12 +104,10 @@  int last_test_result;
 int
 main(int argc, char **argv)
 {
-#ifdef RTE_LIB_CMDLINE
 	struct cmdline *cl;
 	char *tests[argc]; /* store an array of tests to run */
 	int test_count = 0;
 	int i;
-#endif
 	char *extra_args;
 	int ret;
 
@@ -183,7 +179,6 @@  main(int argc, char **argv)
 				"HPET is not enabled, using TSC as default timer\n");
 
 
-#ifdef RTE_LIB_CMDLINE
 	char *dpdk_test = getenv("DPDK_TEST");
 
 	if (dpdk_test && strlen(dpdk_test) > 0)
@@ -259,7 +254,6 @@  main(int argc, char **argv)
 		cmdline_interact(cl);
 		cmdline_stdin_exit(cl);
 	}
-#endif
 	ret = 0;
 
 out: