Skip to contentSkip to conversation

runtime: don't run pv-host tests when gen-se-header is unavailable

PATCH In review Nico Boehr 2 participants 2 messages May 31, 2023

Subsystems (2)
lore
Share & tools
lore

Nico Boehr

author
#0 lore raw

PATCH 1/1 runtime: don't run pv-host tests when gen-se-header is unavailable

When the gen-se-header tool is not given as an argument to configure, all tests which act as a PV host will not be built by the makefiles.

run_tests.sh will fail when a test binary is missing. This means when we add the pv-host tests to unittest.cfg we will have FAILs when gen-se-header is missing.

Since it is desirable to have the tests in unittest.cfg, add a new group pv-host which designates tests that act as a PV host. These will only run if the gen-se-header tool is available.

The pv-host group is currently not used, but will be with Janoschs series "s390x: Add PV SIE intercepts and ipl tests" here:
https://lore.kernel.org/all/[email protected]/

---
 scripts/runtime.bash | 5 +++++
 1 file changed, 5 insertions(+)
scripts/runtime.bash +5 -0
index 07b62b0e1fe7..486dbeda8179 100644
@@ -98,6 +98,11 @@ function run()
         return
     fi
 
+    if [ -z "$GEN_SE_HEADER" ] && find_word "pv-host" "$groups"; then
+        print_result "SKIP" $testname "" "no gen-se-header available for pv-host test"
+        return
+    fi
+
     if [ -z "$only_group" ] && find_word nodefault "$groups" &&
             skip_nodefault; then
         print_result "SKIP" $testname "" "test marked as manual run only"
Signature · 1 line
2.39.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 25 lines · Nico Boehr

When the gen-se-header tool is not given as an argument to configure, all tests which act as a PV host will not be built by the makefiles.

run_tests.sh will fail when a test binary is missing. This means when we add the pv-host tests to unittest.cfg we will have FAILs when gen-se-header is missing.

Since it is desirable to have the tests in unittest.cfg, add a new group pv-host which designates tests that act as a PV host. These will only run if the gen-se-header tool is available.

The pv-host group is currently not used, but will be with Janoschs series "s390x: Add PV SIE intercepts and ipl tests" here:
https://lore.kernel.org/all/[email protected]/

---
  scripts/runtime.bash | 5 +++++
  1 file changed, 5 insertions(+)
scripts/runtime.bash +0 -0
index 07b62b0e1fe7..486dbeda8179 100644

scripts/runtime.bash function run() · line 104

Quoted 7 lines
scripts/runtime.bash +4 -0
@@ -98,6 +98,11 @@ function run()
          return
      fi
 
+    if [ -z "$GEN_SE_HEADER" ] && find_word "pv-host" "$groups"; then
+        print_result "SKIP" $testname "" "no gen-se-header available for pv-host test"
+        return
+    fi