From c2ed103d24f78983581d6ece4b2bf0ed5a7bd3c2 Mon Sep 17 00:00:00 2001 From: George Pantelakis Date: Wed, 16 Apr 2025 17:03:39 +0200 Subject: [PATCH] plans: migrate gating to fmf format --- .fmf/version | 1 + ci.fmf | 1 + gating.yaml | 8 ++-- plans/ci.fmf | 26 ++++++++++ tests/simple-rsapss-test/Makefile | 63 ------------------------ tests/simple-rsapss-test/PURPOSE | 3 -- tests/simple-rsapss-test/runtest.sh | 74 ----------------------------- tests/tests.yml | 15 ------ 8 files changed, 32 insertions(+), 159 deletions(-) create mode 100644 .fmf/version create mode 100644 ci.fmf create mode 100644 plans/ci.fmf delete mode 100644 tests/simple-rsapss-test/Makefile delete mode 100644 tests/simple-rsapss-test/PURPOSE delete mode 100755 tests/simple-rsapss-test/runtest.sh delete mode 100644 tests/tests.yml diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/ci.fmf b/ci.fmf new file mode 100644 index 0000000..c5aa0e0 --- /dev/null +++ b/ci.fmf @@ -0,0 +1 @@ +resultsdb-testcase: separate diff --git a/gating.yaml b/gating.yaml index 9bbbe06..0a833f3 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,7 +3,7 @@ product_versions: - rhel-8 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.userspace-fips-mode.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tedude.validation} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-disabled-buildroot-disabled.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-disabled-buildroot-enabled.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-enabled-buildroot-disabled.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/ci/fips-enabled-buildroot-enabled.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..5d398f4 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,26 @@ +/fips-disabled-buildroot-disabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/openssl + name: /Plans/ci/fips-disabled-buildroot-disabled + + +/fips-disabled-buildroot-enabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/openssl + name: /Plans/ci/fips-disabled-buildroot-enabled + + +/fips-enabled-buildroot-disabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/openssl + name: /Plans/ci/fips-enabled-buildroot-disabled + + +/fips-enabled-buildroot-enabled: + plan: + import: + url: https://pkgs.devel.redhat.com/git/tests/openssl + name: /Plans/ci/fips-enabled-buildroot-enabled diff --git a/tests/simple-rsapss-test/Makefile b/tests/simple-rsapss-test/Makefile deleted file mode 100644 index 13a123d..0000000 --- a/tests/simple-rsapss-test/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /CoreOS/openssl/Sanity/simple-rsapss-test -# Description: Test if RSA-PSS signature scheme is supported -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/CoreOS/openssl/Sanity/simple-rsapss-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - --include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Hubert Kario " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test if RSA-PSS signature scheme is supported" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 1m" >> $(METADATA) - @echo "RunFor: openssl" >> $(METADATA) - @echo "Requires: openssl man man-db" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/simple-rsapss-test/PURPOSE b/tests/simple-rsapss-test/PURPOSE deleted file mode 100644 index 66848e7..0000000 --- a/tests/simple-rsapss-test/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /CoreOS/openssl/Sanity/simple-rsapss-test -Description: Test if RSA-PSS signature scheme is supported -Author: Hubert Kario diff --git a/tests/simple-rsapss-test/runtest.sh b/tests/simple-rsapss-test/runtest.sh deleted file mode 100755 index 8b60e2f..0000000 --- a/tests/simple-rsapss-test/runtest.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /CoreOS/openssl/Sanity/simple-rsapss-test -# Description: Test if RSA-PSS signature scheme is supported -# Author: Hubert Kario -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2013 Red Hat, Inc. All rights reserved. -# -# This copyrighted material is made available to anyone wishing -# to use, modify, copy, or redistribute it subject to the terms -# and conditions of the GNU General Public License version 2. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the Free -# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -PACKAGE="openssl" - -PUB_KEY="rsa_pubkey.pem" -PRIV_KEY="rsa_key.pem" -FILE="text.txt" -SIG="text.sig" - -rlJournalStart - rlPhaseStartSetup - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "openssl genrsa -out $PRIV_KEY 2048" 0 "Generate RSA key" - rlRun "openssl rsa -in $PRIV_KEY -out $PUB_KEY -pubout" 0 "Split the public key from private key" - rlRun "echo 'sign me!' > $FILE" 0 "Create file for signing" - rlAssertExists $FILE - rlAssertExists $PRIV_KEY - rlAssertExists $PUB_KEY - rlPhaseEnd - - rlPhaseStartTest "Test RSA-PSS padding mode" - set -o pipefail - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -out $SIG -sign $PRIV_KEY $FILE" 0 "Sign the file" - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -prverify $PRIV_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using the private key file" - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -sigopt rsa_pss_saltlen:32 -verify $PUB_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using public key file" - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -prverify $PRIV_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using the private key file without specifying salt length" - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -verify $PUB_KEY -signature $SIG $FILE | grep 'Verified OK'" 0 "Verify the signature using public key file without specifying salt length" - set +o pipefail - rlRun "sed -i 's/sign/Sign/' $FILE" 0 "Modify signed file" - rlRun "openssl dgst -sha256 -sigopt rsa_padding_mode:pss -verify $PUB_KEY -signature $SIG $FILE | grep 'Verification Failure'" 0 "Verify that the signature is no longer valid" - rlPhaseEnd - - rlPhaseStartTest "Documentation check" - [ -e "$(rpm -ql openssl | grep dgst)"] && rlRun "man dgst | col -b | grep -- -sigopt" 0 "Check if -sigopt option is described in man page" - rlRun "openssl dgst -help 2>&1 | grep -- -sigopt" 0 "Check if -sigopt option is present in help message" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index 4b71d56..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -# This first play always runs on the local staging system -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - - container - tests: - - simple-rsapss-test - required_packages: - - findutils # beakerlib needs find command - - man # needed by simple-rsapss-test - - man-db # needed by simple-rsapss-test - - openssl # needed by simple-rsapss-test