patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v4 1/5] test: load drivers when required
       [not found] <20200323195926.12182-1-david.marchand@redhat.com>
@ 2020-03-23 19:59 ` David Marchand
  2020-03-23 21:01   ` Aaron Conole
  2020-03-23 19:59 ` [dpdk-stable] [PATCH v4 2/5] test: skip subtests in no-huge mode David Marchand
  1 sibling, 1 reply; 3+ messages in thread
From: David Marchand @ 2020-03-23 19:59 UTC (permalink / raw)
  To: dev
  Cc: aconole, ruifeng.wang, maicolgabriel, bruce.richardson, stable,
	Reshma Pattan

Concatenating to test_args if event_eth_tx_adapter_autotest is executed
makes all subsequent tests inherit from the drivers loading while this
is unneeded.

Fixes: 207b1c813f39 ("test: fix build without ring PMD")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 app/test/meson.build | 30 +++++++++++++-----------------
 1 file changed, 13 insertions(+), 17 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index 0a2ce710f0..7ab2b586e1 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -403,37 +403,33 @@ timeout_seconds_fast = 10
 get_coremask = find_program('get-coremask.sh')
 num_cores_arg = '-l ' + run_command(get_coremask).stdout().strip()
 
-test_args = [num_cores_arg]
+default_test_args = [num_cores_arg]
 
 foreach arg : fast_test_names
+	test_args = default_test_args
+
 	if (get_option('default_library') == 'shared' and
 		arg == 'event_eth_tx_adapter_autotest')
 		foreach drv:dpdk_drivers
 			test_args += ['-d', drv.full_path().split('.a')[0] + '.so']
 		endforeach
 	endif
-	if host_machine.system() == 'linux'
-		test(arg, dpdk_test,
-			  env : ['DPDK_TEST=' + arg],
-			  args : test_args +
-				 ['--file-prefix=@0@'.format(arg)],
-		timeout : timeout_seconds_fast,
-		is_parallel : false,
-		suite : 'fast-tests')
-	else
-		test(arg, dpdk_test,
-			env : ['DPDK_TEST=' + arg],
-			args : test_args,
+	if is_linux
+		test_args += ['--file-prefix=@0@'.format(arg)]
+	endif
+
+	test(arg, dpdk_test,
+		env : ['DPDK_TEST=' + arg],
+		args : test_args,
 		timeout : timeout_seconds_fast,
 		is_parallel : false,
 		suite : 'fast-tests')
-	endif
 endforeach
 
 foreach arg : perf_test_names
 	test(arg, dpdk_test,
 	env : ['DPDK_TEST=' + arg],
-	args : test_args,
+	args : default_test_args,
 	timeout : timeout_seconds,
 	is_parallel : false,
 	suite : 'perf-tests')
@@ -442,7 +438,7 @@ endforeach
 foreach arg : driver_test_names
 	test(arg, dpdk_test,
 		env : ['DPDK_TEST=' + arg],
-		args : test_args,
+		args : default_test_args,
 		timeout : timeout_seconds,
 		is_parallel : false,
 		suite : 'driver-tests')
@@ -451,7 +447,7 @@ endforeach
 foreach arg : dump_test_names
 	test(arg, dpdk_test,
 		env : ['DPDK_TEST=' + arg],
-		args : test_args,
+		args : default_test_args,
 		timeout : timeout_seconds,
 		is_parallel : false,
 		suite : 'debug-tests')
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dpdk-stable] [PATCH v4 2/5] test: skip subtests in no-huge mode
       [not found] <20200323195926.12182-1-david.marchand@redhat.com>
  2020-03-23 19:59 ` [dpdk-stable] [PATCH v4 1/5] test: load drivers when required David Marchand
@ 2020-03-23 19:59 ` David Marchand
  1 sibling, 0 replies; 3+ messages in thread
From: David Marchand @ 2020-03-23 19:59 UTC (permalink / raw)
  To: dev
  Cc: aconole, ruifeng.wang, maicolgabriel, bruce.richardson, stable,
	Gavin Hu, Yipeng Wang, Konstantin Ananyev, Sameh Gobriel,
	Cristian Dumitrescu, Anatoly Burakov

From: Ruifeng Wang <ruifeng.wang@arm.com>

When running with '--no-huge' flag, tests failed with messages as:
    ACL context creation with invalid NUMA should have failed!
    fbk hash creation should have failed
    test_table_pipeline: Check pipeline invalid params failed.

These cases test against invalid socket ID as input parameter, and
expect error return. But function calls return success because
invalid sock ID is overwritten to SOCKET_ID_ANY when in no-huge mode.

The tests against invalid socket ID are skipped in no-huge mode.

Fixes: 5640171c528a ("malloc: fix external heap allocation in no-huge mode")
Cc: stable@dpdk.org

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
Reviewed-by: Gavin Hu <gavin.hu@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
---
 app/test/test_acl.c            | 22 ++++++++++++----------
 app/test/test_hash.c           |  7 +++++--
 app/test/test_table_pipeline.c | 12 +++++++-----
 3 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/app/test/test_acl.c b/app/test/test_acl.c
index 501de35da1..316bf4d065 100644
--- a/app/test/test_acl.c
+++ b/app/test/test_acl.c
@@ -1397,16 +1397,18 @@ test_invalid_parameters(void)
 	} else
 		rte_acl_free(acx);
 
-	/* invalid NUMA node */
-	memcpy(&param, &acl_param, sizeof(param));
-	param.socket_id = RTE_MAX_NUMA_NODES + 1;
-
-	acx = rte_acl_create(&param);
-	if (acx != NULL) {
-		printf("Line %i: ACL context creation with invalid NUMA "
-				"should have failed!\n", __LINE__);
-		rte_acl_free(acx);
-		return -1;
+	if (rte_eal_has_hugepages()) {
+		/* invalid NUMA node */
+		memcpy(&param, &acl_param, sizeof(param));
+		param.socket_id = RTE_MAX_NUMA_NODES + 1;
+
+		acx = rte_acl_create(&param);
+		if (acx != NULL) {
+			printf("Line %i: ACL context creation with invalid "
+					"NUMA should have failed!\n", __LINE__);
+			rte_acl_free(acx);
+			return -1;
+		}
 	}
 
 	/* NULL name */
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index fbd5725c68..ab978ea689 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -1136,8 +1136,11 @@ fbk_hash_unit_test(void)
 	handle = rte_fbk_hash_create(&invalid_params_7);
 	RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed");
 
-	handle = rte_fbk_hash_create(&invalid_params_8);
-	RETURN_IF_ERROR_FBK(handle != NULL, "fbk hash creation should have failed");
+	if (rte_eal_has_hugepages()) {
+		handle = rte_fbk_hash_create(&invalid_params_8);
+		RETURN_IF_ERROR_FBK(handle != NULL,
+					"fbk hash creation should have failed");
+	}
 
 	handle = rte_fbk_hash_create(&invalid_params_same_name_1);
 	RETURN_IF_ERROR_FBK(handle == NULL, "fbk hash creation should have succeeded");
diff --git a/app/test/test_table_pipeline.c b/app/test/test_table_pipeline.c
index 441338ac01..bc412c3081 100644
--- a/app/test/test_table_pipeline.c
+++ b/app/test/test_table_pipeline.c
@@ -190,11 +190,13 @@ check_pipeline_invalid_params(void)
 		goto fail;
 	}
 
-	p = rte_pipeline_create(&pipeline_params_3);
-	if (p != NULL) {
-		RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with invalid "
-			"socket\n", __func__);
-		goto fail;
+	if (rte_eal_has_hugepages()) {
+		p = rte_pipeline_create(&pipeline_params_3);
+		if (p != NULL) {
+			RTE_LOG(INFO, PIPELINE, "%s: Configure pipeline with "
+				"invalid socket\n", __func__);
+			goto fail;
+		}
 	}
 
 	/* Check pipeline consistency */
-- 
2.23.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH v4 1/5] test: load drivers when required
  2020-03-23 19:59 ` [dpdk-stable] [PATCH v4 1/5] test: load drivers when required David Marchand
@ 2020-03-23 21:01   ` Aaron Conole
  0 siblings, 0 replies; 3+ messages in thread
From: Aaron Conole @ 2020-03-23 21:01 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, ruifeng.wang, maicolgabriel, bruce.richardson, stable,
	Reshma Pattan

David Marchand <david.marchand@redhat.com> writes:

> Concatenating to test_args if event_eth_tx_adapter_autotest is executed
> makes all subsequent tests inherit from the drivers loading while this
> is unneeded.
>
> Fixes: 207b1c813f39 ("test: fix build without ring PMD")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---

Acked-by: Aaron Conole <aconole@redhat.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-23 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200323195926.12182-1-david.marchand@redhat.com>
2020-03-23 19:59 ` [dpdk-stable] [PATCH v4 1/5] test: load drivers when required David Marchand
2020-03-23 21:01   ` Aaron Conole
2020-03-23 19:59 ` [dpdk-stable] [PATCH v4 2/5] test: skip subtests in no-huge mode David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).