From a6700e71379be573ba25532001ba4d60fdb79b86 Mon Sep 17 00:00:00 2001 From: Milos Malik Date: Mon, 11 Jul 2022 16:02:36 +0200 Subject: [PATCH] run Tier1 tests via TMT/FMF Use the TMT/FMF instead of STI for running tests. STI does not respect the adjust section in main.fmf files of stored tests. Related: rhbz#2107109 --- .fmf/version | 1 + plans/tests.fmf | 6 +++++ .../main.fmf | 19 +++++++++++++++ .../runtest.sh | 1 - .../main.fmf | 15 ++++++++++++ .../runtest.sh | 1 - .../main.fmf | 13 ++++++++++ .../runtest.sh | 1 - tests/Sanity/public_content/main.fmf | 24 +++++++++++++++++++ tests/Sanity/public_content/runtest.sh | 1 - tests/tests.yml | 19 --------------- 11 files changed, 78 insertions(+), 23 deletions(-) create mode 100644 .fmf/version create mode 100644 plans/tests.fmf create mode 100644 tests/Regression/Report-bugs-on-corresponding-components/main.fmf create mode 100644 tests/Regression/no-plugin-exception-during-analyses/main.fmf create mode 100644 tests/Regression/sealert-s-traceback-invalid-display/main.fmf create mode 100644 tests/Sanity/public_content/main.fmf 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/plans/tests.fmf b/plans/tests.fmf new file mode 100644 index 0000000..ec3661a --- /dev/null +++ b/plans/tests.fmf @@ -0,0 +1,6 @@ +summary: Tier 1 setroubleshoot test plan +discover: + how: fmf +execute: + how: tmt + diff --git a/tests/Regression/Report-bugs-on-corresponding-components/main.fmf b/tests/Regression/Report-bugs-on-corresponding-components/main.fmf new file mode 100644 index 0000000..d70bc2c --- /dev/null +++ b/tests/Regression/Report-bugs-on-corresponding-components/main.fmf @@ -0,0 +1,19 @@ +summary: Test for BZ#1811644 (Let setroubleshoot to report bugs on components) +contact: Vit Mojzis +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-server + - flatpak-selinux + - tpm2-abrmd-selinux + - container-selinux + - usbguard-selinux + - mysql-selinux + - fapolicyd-selinux +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1811644 +extra-summary: /CoreOS/setroubleshoot/Regression/Report-bugs-on-corresponding-components +extra-task: /CoreOS/setroubleshoot/Regression/Report-bugs-on-corresponding-components diff --git a/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh b/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh index e55a506..c3e04b9 100755 --- a/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh +++ b/tests/Regression/Report-bugs-on-corresponding-components/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot" diff --git a/tests/Regression/no-plugin-exception-during-analyses/main.fmf b/tests/Regression/no-plugin-exception-during-analyses/main.fmf new file mode 100644 index 0000000..923b8d6 --- /dev/null +++ b/tests/Regression/no-plugin-exception-during-analyses/main.fmf @@ -0,0 +1,15 @@ +summary: Does setroubleshoot report any 'Plugin Exception' during analyses? +contact: Petr Lautrbach +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-server +environment: + AVC_ERROR: +no_avc_check +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1784564 +extra-summary: /CoreOS/setroubleshoot/Regression/no-plugin-exception-during-analyses +extra-task: /CoreOS/setroubleshoot/Regression/no-plugin-exception-during-analyses diff --git a/tests/Regression/no-plugin-exception-during-analyses/runtest.sh b/tests/Regression/no-plugin-exception-during-analyses/runtest.sh index f200f49..74ea50a 100755 --- a/tests/Regression/no-plugin-exception-during-analyses/runtest.sh +++ b/tests/Regression/no-plugin-exception-during-analyses/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot" diff --git a/tests/Regression/sealert-s-traceback-invalid-display/main.fmf b/tests/Regression/sealert-s-traceback-invalid-display/main.fmf new file mode 100644 index 0000000..e6c6f7f --- /dev/null +++ b/tests/Regression/sealert-s-traceback-invalid-display/main.fmf @@ -0,0 +1,13 @@ +summary: Test for traceback when using sealert -s with display set to invalid value +contact: Vit Mojzis +component: + - setroubleshoot +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot +duration: 5m +link: + - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1574434 +extra-summary: /CoreOS/setroubleshoot/Regression/sealert-s-traceback-invalid-display +extra-task: /CoreOS/setroubleshoot/Regression/sealert-s-traceback-invalid-display diff --git a/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh b/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh index 9c5d0fa..55b0fdd 100755 --- a/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh +++ b/tests/Regression/sealert-s-traceback-invalid-display/runtest.sh @@ -26,7 +26,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot-server" diff --git a/tests/Sanity/public_content/main.fmf b/tests/Sanity/public_content/main.fmf new file mode 100644 index 0000000..f62fd6d --- /dev/null +++ b/tests/Sanity/public_content/main.fmf @@ -0,0 +1,24 @@ +summary: Does the plugin work as expected? +description: |+ + Does the plugin work as expected? + + Default value of ANALYSIS_DELAY can be overriden. + +contact: Milos Malik +component: + - setroubleshoot-plugins +test: ./runtest.sh +framework: beakerlib +recommend: + - setroubleshoot-plugins + - setroubleshoot-server + - audit + - setools-console + - psmisc + - libselinux-utils + - rsyslog +environment: + AVC_ERROR: +no_avc_check +duration: 10m +extra-summary: /CoreOS/setroubleshoot-plugins/Sanity/public_content +extra-task: /CoreOS/setroubleshoot-plugins/Sanity/public_content diff --git a/tests/Sanity/public_content/runtest.sh b/tests/Sanity/public_content/runtest.sh index e5665c8..7135a42 100755 --- a/tests/Sanity/public_content/runtest.sh +++ b/tests/Sanity/public_content/runtest.sh @@ -27,7 +27,6 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include Beaker environment -. /usr/bin/rhts-environment.sh || exit 1 . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="setroubleshoot-plugins" diff --git a/tests/tests.yml b/tests/tests.yml deleted file mode 100644 index ea433bf..0000000 --- a/tests/tests.yml +++ /dev/null @@ -1,19 +0,0 @@ -- hosts: localhost - roles: - - role: standard-test-beakerlib - tags: - - classic - tests: - - Regression/embedded-null-byte-in-audit-records - - Regression/no-plugin-exception-during-analyses - - Regression/sealert-s-traceback-invalid-display - - Regression/Report-bugs-on-corresponding-components - - Sanity/public_content - required_packages: - - setroubleshoot-server - - setroubleshoot-plugins - - audit - - setools-console - - psmisc - - libselinux-utils - - rsyslog