From 250db92462e43571e433383583613a2ac3f75c18 Mon Sep 17 00:00:00 2001 From: Václav Kadlčík Date: Jan 24 2023 14:05:19 +0000 Subject: [PATCH 1/3] Adapt to TMT 1.19+ The Fedora testing farm was updated to TMT 1.19 in December. "how: beakerlib" in our test metadata is no longer supported, this commit fixes it. --- diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..85710d6 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -3,4 +3,4 @@ discover: how: fmf directory: tests execute: - how: beakerlib + how: tmt From bc0466b88d24c1118209f3835d4acf35b3de635a Mon Sep 17 00:00:00 2001 From: Václav Kadlčík Date: Jan 24 2023 14:09:53 +0000 Subject: [PATCH 2/3] Make requirements in gating tests more explicit Make requirements stricter (required packages instead of recommended packages) and remove requirements that are no longer needed. The previous requirements caused failures in manual testing and possibly some gating failures as well. --- diff --git a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf index 435d7ff..e0cbc5d 100644 --- a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf +++ b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/main.fmf @@ -8,9 +8,11 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: +require: - annobin-annocheck +- annobin-plugin-gcc - gcc +- redhat-rpm-config duration: 48h extra-summary: /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check extra-task: /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check diff --git a/tests/Regression/identify/main.fmf b/tests/Regression/identify/main.fmf index a10e87d..674544e 100644 --- a/tests/Regression/identify/main.fmf +++ b/tests/Regression/identify/main.fmf @@ -7,15 +7,8 @@ component: test: ./runtest.sh framework: beakerlib recommend: -- annobin -- devtoolset-10 -- devtoolset-10-annocheck -- devtoolset-11 -- devtoolset-11-annocheck -- gcc-toolset-10 -- gcc-toolset-10-annocheck -- gcc-toolset-11 -- gcc-toolset-11-annocheck +- annobin-plugin-gcc +- annobin-annocheck duration: 48h extra-summary: /tools/annobin/Regression/identify extra-task: /tools/annobin/Regression/identify diff --git a/tests/Regression/lto-preprocessor-options/main.fmf b/tests/Regression/lto-preprocessor-options/main.fmf index 03e6b88..2a3e56a 100644 --- a/tests/Regression/lto-preprocessor-options/main.fmf +++ b/tests/Regression/lto-preprocessor-options/main.fmf @@ -6,11 +6,12 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- gcc -- annobin +require: +- annobin-plugin-gcc - annobin-annocheck - redhat-rpm-config +- gcc +- redhat-rpm-config duration: 48h extra-summary: /tools/annobin/Regression/lto-preprocessor-options extra-task: /tools/annobin/Regression/lto-preprocessor-options diff --git a/tests/Regression/missing-check-for-x86-property-note-content/main.fmf b/tests/Regression/missing-check-for-x86-property-note-content/main.fmf index a7afb11..b4ab7fd 100644 --- a/tests/Regression/missing-check-for-x86-property-note-content/main.fmf +++ b/tests/Regression/missing-check-for-x86-property-note-content/main.fmf @@ -7,8 +7,8 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- annobin +require: +- annobin-annocheck duration: 48h link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1991931 diff --git a/tests/Regression/processing-params-in-reverse-order/main.fmf b/tests/Regression/processing-params-in-reverse-order/main.fmf index 19b497d..99adc08 100644 --- a/tests/Regression/processing-params-in-reverse-order/main.fmf +++ b/tests/Regression/processing-params-in-reverse-order/main.fmf @@ -7,8 +7,8 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- annobin +require: +- annobin-annocheck duration: 48h link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1988714 diff --git a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf b/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf index bd8362f..07395fa 100644 --- a/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf +++ b/tests/Regression/segv-when-processing-multiple-params-incl-symlink/main.fmf @@ -7,8 +7,9 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- annobin +require: +- annobin-plugin-gcc +- annobin-annocheck - libstdc++ duration: 48h link: diff --git a/tests/Regression/testsuite/main.fmf b/tests/Regression/testsuite/main.fmf index 7352f78..f117f62 100644 --- a/tests/Regression/testsuite/main.fmf +++ b/tests/Regression/testsuite/main.fmf @@ -6,23 +6,19 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- annobin +require: +- annobin-plugin-gcc - annobin-annocheck - binutils-devel -- gcc -- gcc-c++ +- bzip2-devel +- dnf - elfutils - elfutils-devel +- gcc-c++ +- gcc-plugin-devel - make - rpm-build - rpm-devel -- gcc-plugin-devel -- yum -- dnf -- yum-utils -- bzip2-devel -- rpm-build duration: 48h extra-summary: /tools/annobin/Regression/testsuite extra-task: /tools/annobin/Regression/testsuite diff --git a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf index 9aea593..9ece622 100644 --- a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf +++ b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/main.fmf @@ -7,8 +7,9 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: -- annobin +require: +- annobin-plugin-gcc +- annobin-annocheck duration: 48h link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=1973981 diff --git a/tests/Sanity/smoke/main.fmf b/tests/Sanity/smoke/main.fmf index 49d2862..fca8ae4 100644 --- a/tests/Sanity/smoke/main.fmf +++ b/tests/Sanity/smoke/main.fmf @@ -6,11 +6,11 @@ component: - annobin test: ./runtest.sh framework: beakerlib -recommend: +require: +- annobin-plugin-gcc +- annobin-annocheck - man-db - gcc -- annobin -- annobin-annocheck duration: 48h extra-summary: /tools/annobin/Sanity/smoke extra-task: /tools/annobin/Sanity/smoke From f45bd71eb38d48872e9706c6eafeaa89a23e95e4 Mon Sep 17 00:00:00 2001 From: Václav Kadlčík Date: Jan 24 2023 14:15:39 +0000 Subject: [PATCH 3/3] Adapt test scripts to newest annobin versions --- diff --git a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh index 41312a4..91fa544 100755 --- a/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh +++ b/tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh @@ -28,13 +28,10 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="annobin" - rlJournalStart rlPhaseStartSetup rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" - rlRun "rpm -q annobin-annocheck gcc" rlPhaseEnd rlPhaseStartTest @@ -43,7 +40,7 @@ rlJournalStart rlRun "gcc `rpm --eval %build_cflags` -fpic -c f1.c" rlRun "gcc `rpm --eval %build_cflags` -fpic -c f2.c" rlRun "gcc `rpm --eval %build_ldflags` -shared f1.o f2.o" - rlRun "annocheck -v a.out" + rlRun "annocheck -v --skip-lto a.out" rlPhaseEnd rlPhaseStartCleanup diff --git a/tests/Regression/testsuite/runtest.sh b/tests/Regression/testsuite/runtest.sh index c8016ad..1507c45 100755 --- a/tests/Regression/testsuite/runtest.sh +++ b/tests/Regression/testsuite/runtest.sh @@ -62,7 +62,7 @@ rlJournalStart rlRun "pushd $TMP" rlFetchSrcForInstalled $PACKAGE - rlRun "yum-builddep -y *src.rpm" + rlRun "dnf builddep -y *src.rpm" rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/annobin.spec" rlPhaseEnd diff --git a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh index ca991af..bb1a436 100755 --- a/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh +++ b/tests/Sanity/annocheck-silently-ignores-any-file-parameter/runtest.sh @@ -28,8 +28,6 @@ # Include Beaker environment . /usr/share/beakerlib/beakerlib.sh || exit 1 -PACKAGE="annobin" - rlJournalStart rlPhaseStartSetup rlRun "TMP=$(mktemp -d)" @@ -41,7 +39,10 @@ rlJournalStart samplecnt=$(ls *.sample | wc -l) testcnt=$(ls *.sample | \ xargs annocheck |& \ - fgrep '.sample: is not an ELF format file' | wc -l) + grep -F \ + -e '.sample: unable to read magic number' \ + -e '.sample: is not an ELF format file' \ + | wc -l) rlRun "test $samplecnt -eq 300" rlRun "test $testcnt -eq 300" rlPhaseEnd