From 005ed8c853e9256500498d26fd7159690ad7d1b7 Mon Sep 17 00:00:00 2001 From: Maciej Borzecki Date: Thu, 29 Aug 2024 13:15:30 +0200 Subject: [PATCH] spread: add fips test suite Signed-off-by: Maciej Borzecki --- spread.yaml | 29 ++++++++++++++++++++++++++--- tests/fips/main-fips | 1 + tests/fips/main-known | 1 + tests/fips/main-searching | 1 + tests/fips/main-snap-run | 1 + tests/fips/main-try | 1 + tests/fips/smoke-find-info | 1 + tests/fips/smoke-install | 1 + tests/fips/smoke-remove | 1 + tests/fips/smoke-sandbox | 1 + tests/fips/smoke-versioning | 1 + tests/lib/spread/rules/main.yaml | 1 + 12 files changed, 37 insertions(+), 3 deletions(-) create mode 120000 tests/fips/main-fips create mode 120000 tests/fips/main-known create mode 120000 tests/fips/main-searching create mode 120000 tests/fips/main-snap-run create mode 120000 tests/fips/main-try create mode 120000 tests/fips/smoke-find-info create mode 120000 tests/fips/smoke-install create mode 120000 tests/fips/smoke-remove create mode 120000 tests/fips/smoke-sandbox create mode 120000 tests/fips/smoke-versioning diff --git a/spread.yaml b/spread.yaml index da12da8619f..372ca5cd201 100644 --- a/spread.yaml +++ b/spread.yaml @@ -946,7 +946,7 @@ suites: # All other tests run now and will heavily modify the system. tests/main/: summary: Full-system tests for snapd - systems: [-ubuntu-secboot-*] + systems: [-ubuntu-secboot-*, -ubuntu-fips-*] prepare: | "$TESTSLIB"/prepare-restore.sh --prepare-suite prepare-each: | @@ -973,7 +973,7 @@ suites: tests/completion/: summary: completion tests # ppc64el disabled because of https://bugs.launchpad.net/snappy/+bug/1655594 - systems: [-ubuntu-core-*, -ubuntu-*-ppc64el, -ubuntu-secboot-*] + systems: [-ubuntu-core-*, -ubuntu-*-ppc64el, -ubuntu-secboot-*, -ubuntu-fips-*] prepare: | "$TESTSLIB"/prepare-restore.sh --prepare-suite prepare-each: | @@ -1000,7 +1000,7 @@ suites: tests/regression/: summary: Regression tests for snapd - systems: [-ubuntu-secboot-*] + systems: [-ubuntu-secboot-*, -ubuntu-fips-*] prepare: | "$TESTSLIB"/prepare-restore.sh --prepare-suite prepare-each: | @@ -1057,6 +1057,7 @@ suites: -amazon-*, -centos-*, -ubuntu-secboot-*, + -ubuntu-fips-*, ] # unittests are run as part of the autopkgtest build already backends: [-autopkgtest] @@ -1397,4 +1398,26 @@ suites: . "$TESTSLIB"/pkgdb.sh distro_purge_package qemu genisoimage sshpass qemu-kvm cloud-image-utils xz-utils + # FIPS test suite + tests/fips/: + summary: FIPS enabled test suite + systems: + - ubuntu-fips-* + environment: + # TODO add snap variant + # disable reexec so that the tests run with deb + SNAP_REEXEC/deb: "0" + prepare: | + "$TESTSLIB"/prepare-restore.sh --prepare-suite + prepare-each: | + "$TESTSLIB"/prepare-restore.sh --prepare-suite-each + restore-each: | + "$TESTSLIB"/prepare-restore.sh --restore-suite-each + restore: | + "$TESTSLIB"/prepare-restore.sh --restore-suite + debug: | + if [ "$SPREAD_DEBUG_EACH" = 1 ]; then + systemctl status snapd.socket || true + fi + # vim:ts=4:sw=4:et diff --git a/tests/fips/main-fips b/tests/fips/main-fips new file mode 120000 index 00000000000..8df0132e6c4 --- /dev/null +++ b/tests/fips/main-fips @@ -0,0 +1 @@ +../main/fips \ No newline at end of file diff --git a/tests/fips/main-known b/tests/fips/main-known new file mode 120000 index 00000000000..28e86838a98 --- /dev/null +++ b/tests/fips/main-known @@ -0,0 +1 @@ +../main/known \ No newline at end of file diff --git a/tests/fips/main-searching b/tests/fips/main-searching new file mode 120000 index 00000000000..e94e31e6d26 --- /dev/null +++ b/tests/fips/main-searching @@ -0,0 +1 @@ +../main/searching \ No newline at end of file diff --git a/tests/fips/main-snap-run b/tests/fips/main-snap-run new file mode 120000 index 00000000000..97d80d09b96 --- /dev/null +++ b/tests/fips/main-snap-run @@ -0,0 +1 @@ +../main/snap-run \ No newline at end of file diff --git a/tests/fips/main-try b/tests/fips/main-try new file mode 120000 index 00000000000..0a2f9ba9cc2 --- /dev/null +++ b/tests/fips/main-try @@ -0,0 +1 @@ +../main/try \ No newline at end of file diff --git a/tests/fips/smoke-find-info b/tests/fips/smoke-find-info new file mode 120000 index 00000000000..6065024df2c --- /dev/null +++ b/tests/fips/smoke-find-info @@ -0,0 +1 @@ +../smoke/find-info \ No newline at end of file diff --git a/tests/fips/smoke-install b/tests/fips/smoke-install new file mode 120000 index 00000000000..25e117f2c00 --- /dev/null +++ b/tests/fips/smoke-install @@ -0,0 +1 @@ +../smoke/install \ No newline at end of file diff --git a/tests/fips/smoke-remove b/tests/fips/smoke-remove new file mode 120000 index 00000000000..0091748f52c --- /dev/null +++ b/tests/fips/smoke-remove @@ -0,0 +1 @@ +../smoke/remove \ No newline at end of file diff --git a/tests/fips/smoke-sandbox b/tests/fips/smoke-sandbox new file mode 120000 index 00000000000..4bf0f217f70 --- /dev/null +++ b/tests/fips/smoke-sandbox @@ -0,0 +1 @@ +../smoke/sandbox \ No newline at end of file diff --git a/tests/fips/smoke-versioning b/tests/fips/smoke-versioning new file mode 120000 index 00000000000..e0dbd1c4bdc --- /dev/null +++ b/tests/fips/smoke-versioning @@ -0,0 +1 @@ +../smoke/versioning \ No newline at end of file diff --git a/tests/lib/spread/rules/main.yaml b/tests/lib/spread/rules/main.yaml index 4335113e122..c903a40094a 100644 --- a/tests/lib/spread/rules/main.yaml +++ b/tests/lib/spread/rules/main.yaml @@ -9,6 +9,7 @@ rules: - tests/smoke/. - tests/unit/.* - tests/upgrade/.* + - tests/fips/.* to: [$SELF] unit: