diff --git a/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/main.fmf b/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/main.fmf new file mode 100644 index 0000000..a9807e8 --- /dev/null +++ b/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/main.fmf @@ -0,0 +1,29 @@ +summary: Be modest with open files +contact: Vaclav Kadlcik +component: + - annobin +test: ${WITH_SCL:-bash} ./runtest.sh +framework: beakerlib +recommend: + - annobin-annocheck +duration: 20m +enabled: true +tag: + - CI-Tier-1 +tier: '1' +link: + - relates: https://issues.redhat.com/browse/RHEL-79256 +adjust: + - enabled: false + when: collection is not defined and distro == rhel-9 and distro ~< rhel-9.6 + continue: false + - enabled: false + when: collection is not defined and distro < rhel-9 + continue: false + - enabled: false + when: collection == devtoolset-13, gcc-toolset-13, gcc-toolset-14 + continue: false +extra-summary: /tools/annobin/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors +extra-task: /tools/annobin/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors +# extra-nitrate: TODO +# id: TODO diff --git a/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/runtest.sh b/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/runtest.sh new file mode 100755 index 0000000..62d0314 --- /dev/null +++ b/Regression/RHEL-79256_annocheck_runs_out_of_file_descriptors/runtest.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +ANNOCHECK="${ANNOCHECK:-$(type -P annocheck)}" +ANNOCHECK_RPM_NAME=$(rpm --qf '%{name}' -qf "$ANNOCHECK") + +PACKAGES="$ANNOCHECK_RPM_NAME" + +rlJournalStart + rlPhaseStartSetup + rlLogInfo "PACKAGES=$PACKAGES" + rlLogInfo "COLLECTIONS=$COLLECTIONS" + rlLogInfo "ANNOCHECK=$ANNOCHECK" + rlLogInfo "SKIP_COLLECTION_METAPACKAGE_CHECK=$SKIP_COLLECTION_METAPACKAGE_CHECK" + + # We optionally need to skip checking for the presence of the metapackage + # because that would pull in all the dependent toolset subrpms. We do not + # always want that, especially in CI. + _COLLECTIONS="$COLLECTIONS" + if ! test -z "$SKIP_COLLECTION_METAPACKAGE_CHECK"; then + for c in $SKIP_COLLECTION_METAPACKAGE_CHECK; do + rlLogInfo "ignoring metapackage check for collection $c" + export COLLECTIONS=$(shopt -s extglob && echo ${COLLECTIONS//$c/}) + done + fi + rlLogInfo "(without skipped) COLLECTIONS=$COLLECTIONS" + rlAssertRpm --all + export COLLECTIONS="$_COLLECTIONS" + + rlRun "TmpDir=\$(mktemp -d)" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun 'annocheck -n --ignore-links --ignore-unknown --skip-passes --skip-all --test-stack-prot /usr &>annocheck.out' 0,1 + for i in 'Could not open' 'system error:' 'Too many open files'; do + rlAssertNotGrep "$i" annocheck.out + done + rlAssertGrep '^Final totals' annocheck.out + rlGetPhaseState || rlFileSubmit annocheck.out annocheck.out + rlPhaseEnd + + rlPhaseStartCleanup + rlRun popd + rlRun "rm -r $TmpDir" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd