diff --git a/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf new file mode 100644 index 0000000..cc81f5e --- /dev/null +++ b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/main.fmf @@ -0,0 +1,5 @@ +summary: bytecode stream in file ‘/opt/rh/gcc-toolset-13/root/usr/lib64/libbfd.a’ generated with LTO version 11.3 instead of the expected 13.0 +duration: 10m + +link+: + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2225130 diff --git a/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/test.sh b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/test.sh new file mode 100755 index 0000000..236bc72 --- /dev/null +++ b/tests/bugs/bytecode-stream-in-file-libbfd.a-generated-with-LTO-version-11.3-instead-of-the-expected-13.0/test.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k + +. /usr/share/beakerlib/beakerlib.sh || exit 1 +. "$TMT_TREE/tests/lib.sh" || exit 1 + +rlJournalStart + rlPhaseStartSetup + buTestHeader + + buEnterTmpDir + + rlRun "echo 'extern int libbfdtest (void);' > libbfdtest.h" + rlRun "echo ' +#include + +#include \"libbfdtest.h\" + +int +libbfdtest (void) +{ + bfd_set_error (bfd_error_no_error); + return bfd_get_error () == bfd_error_no_error; +}' > libbfdtest.c" + + rlPhaseEnd + + rlPhaseStartTest + rlRun "gcc -g -Wall -shared -o libbfdtest.so -fPIC libbfdtest.c -lbfd -liberty" + rlPhaseEnd + + rlPhaseStartCleanup + buExitTmpDir + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/bugs/ppc64-segv-in-libbfd/main.fmf b/tests/bugs/ppc64-segv-in-libbfd/main.fmf new file mode 100644 index 0000000..f2eaeef --- /dev/null +++ b/tests/bugs/ppc64-segv-in-libbfd/main.fmf @@ -0,0 +1,11 @@ +summary: ppc64 segv in libbfd +description: | + ppc64: segv in libbfd +require+: + - elfutils + - kernel-debuginfo + - xz +duration: 30m + +link+: + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2225130 diff --git a/tests/bugs/ppc64-segv-in-libbfd/test.sh b/tests/bugs/ppc64-segv-in-libbfd/test.sh new file mode 100755 index 0000000..93047e6 --- /dev/null +++ b/tests/bugs/ppc64-segv-in-libbfd/test.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/binutils/Regression/bz1172766-ppc64-segv-in-libbfd +# Description: Test for BZ#1172766 (ppc64 segv in libbfd) +# Author: Milos Prchlik +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# 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 + +. "$TMT_TREE/tests/lib.sh" || exit 1 + +__have_kernel_debuginfo () { + local RELEASE ARCH + rlRun "RELEASE=$(uname -r)" + rlRun "ARCH=$(uname -m)" + if ! rpm -q kernel-debuginfo-$RELEASE &>/dev/null; then + rlLogInfo 'kernel-debuginfo not present, trying to install it' + rlRun "dnf install -y --enablerepo=\*debuginfo kernel-debuginfo-$RELEASE" + fi + rlAssertRpm kernel-debuginfo-$RELEASE +} + +rlJournalStart + rlPhaseStartSetup + buTestHeader + + buEnterTmpDir + + __have_kernel_debuginfo + + rlRun "KERNEL_RELEASE=$(uname -r)" + rlRun "KMOD=/usr/lib/modules/$KERNEL_RELEASE/kernel/fs/nfsd/nfsd.ko" + rlRun "KMOD_XZ=$KMOD.xz" + rlRun "KMOD_DEBUG=/usr/lib/debug/$KMOD.debug" + rlAssertExists "$KMOD_DEBUG" + rlAssertExists "$KMOD_XZ" + [[ -e "$KMOD" ]] || rlRun "unxz -k $KMOD_XZ" + rlAssertExists "$KMOD" + rlPhaseEnd + + rlPhaseStartTest + rlRun "eu-unstrip $KMOD $KMOD_DEBUG --output=$TmpDir/unstripped.ko" + rlRun "objdump -drS $TmpDir/unstripped.ko &> /dev/null" + rlPhaseEnd + + rlPhaseStartCleanup + buExitTmpDir + rlPhaseEnd +rlJournalPrintText +rlJournalEnd