test: set iova=va mode on ppc64 with --no-huge

Message ID 20231128144045.2403960-1-christian.ehrhardt@canonical.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series test: set iova=va mode on ppc64 with --no-huge |

Checks

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

Commit Message

Christian Ehrhardt Nov. 28, 2023, 2:40 p.m. UTC
  From: Christian Ehrhardt <christian.ehrhardt@canonical.com>

On ppc64, without huge pages, pa would be the default but fails like:
  EAL: Cannot use IOVA as 'PA' since physical addresses are not available

On a normal system setup we'd expect an admin to set up huge pages
and for the unlikely case that they do not do that set iova=va
themselve. But the testing infrastructure does not have this conscious
admin that will do that, so fix test execution that by adjusting the
tests arguments accordingly if the conditions are met.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
 app/test/suites/meson.build | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Luca Boccassi Nov. 28, 2023, 2:56 p.m. UTC | #1
On Tue, 28 Nov 2023 at 14:40, <christian.ehrhardt@canonical.com> wrote:
>
> From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
>
> On ppc64, without huge pages, pa would be the default but fails like:
>   EAL: Cannot use IOVA as 'PA' since physical addresses are not available
>
> On a normal system setup we'd expect an admin to set up huge pages
> and for the unlikely case that they do not do that set iova=va
> themselve. But the testing infrastructure does not have this conscious
> admin that will do that, so fix test execution that by adjusting the
> tests arguments accordingly if the conditions are met.
>
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> ---
>  app/test/suites/meson.build | 8 ++++++++
>  1 file changed, 8 insertions(+)

Acked-by: Luca Boccassi <bluca@debian.org>
  
Thomas Monjalon March 6, 2024, 5:50 p.m. UTC | #2
28/11/2023 15:56, Luca Boccassi:
> On Tue, 28 Nov 2023 at 14:40, <christian.ehrhardt@canonical.com> wrote:
> >
> > From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> >
> > On ppc64, without huge pages, pa would be the default but fails like:
> >   EAL: Cannot use IOVA as 'PA' since physical addresses are not available
> >
> > On a normal system setup we'd expect an admin to set up huge pages
> > and for the unlikely case that they do not do that set iova=va
> > themselve. But the testing infrastructure does not have this conscious
> > admin that will do that, so fix test execution that by adjusting the
> > tests arguments accordingly if the conditions are met.
> >
> > Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> 
> Acked-by: Luca Boccassi <bluca@debian.org>

Moved the comment inside the "if condition" context.

Applied, thanks.
  

Patch

diff --git a/app/test/suites/meson.build b/app/test/suites/meson.build
index 478f245a54..8efbb165bf 100644
--- a/app/test/suites/meson.build
+++ b/app/test/suites/meson.build
@@ -10,6 +10,14 @@  test_no_huge_args = ['--no-huge', '-m', '2048']
 has_hugepage = run_command(has_hugepages_cmd, check: true).stdout().strip() != '0'
 message('hugepage availability: @0@'.format(has_hugepage))
 
+# On ppc64, without huge pages, pa would be the default but fails like:
+# EAL: Cannot use IOVA as 'PA' since physical addresses are not available
+if not has_hugepage
+    if arch_subdir == 'ppc'
+        test_no_huge_args += '--iova-mode=va'
+    endif
+endif
+
 # process source files to determine the different unit test suites
 # - fast_tests
 # - perf_tests