Porting tests
This commit is contained in:
parent
b925f4eb45
commit
a3e66ecc54
16 changed files with 363 additions and 2 deletions
|
|
@ -0,0 +1,6 @@
|
|||
summary: "relocation truncated to fit: R_AARCH64_CALL26 (veneers not inserted)"
|
||||
duration: 15m
|
||||
|
||||
# Configurable fields
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1243559
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
void foo ();
|
||||
int main () {foo();}
|
||||
49
tests/bugs/aarch64-binutils-relocation-truncated-to-fit/test.sh
Executable file
49
tests/bugs/aarch64-binutils-relocation-truncated-to-fit/test.sh
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/binutils/Regression/bz1243559-aarch64-binutils-relocation-truncated-to-fit
|
||||
# Description: Test for BZ#1243559 ([aarch64][binutils] relocation truncated to fit)
|
||||
# Author: Milos Prchlik <mprchlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# 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, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
|
||||
buEnterTmpDir
|
||||
|
||||
buCopyReproducers reproducer.c
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -Wl,--defsym=foo=0x80000000 -o reproducer reproducer.c"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
buExitTmpDir
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
int f()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
summary: ar SEGFAULT when creating static library with lto
|
||||
duration: 15m
|
||||
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1248929
|
||||
|
||||
adjust+:
|
||||
- when: arch != x86_64
|
||||
enabled: false
|
||||
49
tests/bugs/ar-SEGFAULT-when-creating-static-library-with-lto/test.sh
Executable file
49
tests/bugs/ar-SEGFAULT-when-creating-static-library-with-lto/test.sh
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/binutils/Regression/bz1248929-ar-SEGFAULT-when-creating-static-library-with-lto
|
||||
# Description: Test for BZ#1248929 (ar SEGFAULT when creating static library with lto)
|
||||
# Author: Milos Prchlik <mprchlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
buEnterTmpDir
|
||||
buCopyReproducers a.cpp
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "g++ -march=native -O3 -flto -c a.cpp"
|
||||
rlRun "gcc-ar cq a.a a.o"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
buExitTmpDir
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
summary: binutils ld silently produces broken PIE binaries
|
||||
duration: 15m
|
||||
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1406430
|
||||
|
||||
adjust+:
|
||||
- when: arch != s390x
|
||||
enabled: false
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
return strcmp (argv[0], "string") == 0;
|
||||
}
|
||||
50
tests/bugs/binutils-ld-silently-produces-broken-PIE-binaries/test.sh
Executable file
50
tests/bugs/binutils-ld-silently-produces-broken-PIE-binaries/test.sh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/binutils/Regression/bz1406430-binutils-ld-silently-produces-broken-PIE-binaries
|
||||
# Description: Test for BZ#1406430 (binutils ld silently produces broken PIE binaries)
|
||||
# Author: Milos Prchlik <mprchlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2018 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# 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, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
buEnterTmpDir
|
||||
|
||||
buCopyReproducers "pie.c"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "gcc -c pie.c"
|
||||
rlRun "gcc -pie -o pie pie.o" 1
|
||||
rlAssertNotExists "pie"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
buExitTmpDir
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
summary: dwz applied to a dts-compiled binary complains
|
||||
contact:
|
||||
- Milos Prchlik <mprchlik@redhat.com>
|
||||
- Sergey Kolosov <skolosov@redhat.com>
|
||||
duration: 2h
|
||||
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1366145
|
||||
|
||||
adjust+:
|
||||
# DWZ is not available in RHEL-6 - unless you have collection installed,
|
||||
# then you can use (and test) dwz from collection package.
|
||||
- when: distro == rhel-6 and collection is not defined
|
||||
enabled: false
|
||||
|
||||
- when: collection is not defined
|
||||
require+:
|
||||
- dwz
|
||||
environment+:
|
||||
REQUIRES: dwz
|
||||
|
||||
- when: collection == gcc-toolset-13
|
||||
require+:
|
||||
- gcc-toolset-13-dwz
|
||||
environment+:
|
||||
REQUIRES: gcc-toolset-13-dwz
|
||||
|
||||
- when: collection == gcc-toolset-12
|
||||
require+:
|
||||
- gcc-toolset-12-dwz
|
||||
environment+:
|
||||
REQUIRES: gcc-toolset-12-dwz
|
||||
|
||||
- when: collection == gcc-toolset-11
|
||||
require+:
|
||||
- gcc-toolset-11-dwz
|
||||
environment+:
|
||||
REQUIRES: gcc-toolset-11-dwz
|
||||
|
||||
- when: collection == devtoolset-13
|
||||
require+:
|
||||
- devtoolset-13-dwz
|
||||
environment+:
|
||||
REQUIRES: devtoolset-13-dwz
|
||||
52
tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/test.sh
Executable file
52
tests/bugs/dwz-applied-to-a-dts-compiled-binary-complains/test.sh
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/binutils/Regression/bz1366145-dwz-applied-to-a-dts-compiled-binary-complains
|
||||
# Description: Test for BZ#1366145 (dwz applied to a dts-compiled binary complains)
|
||||
# Author: Sergey Kolosov <skolosov@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# 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, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
buEnterTmpDir
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "echo 'int main(void){return 0;}' > test.c" 0 "Generating simple source"
|
||||
rlRun "gcc test.c -g -o test"
|
||||
rlRun "md5sum ./test > t_before_dwz"
|
||||
rlRun "./test" 0 "Test binary is running"
|
||||
rlRun "dwz ./test" 0 "DWZ returns correct result"
|
||||
rlRun "md5sum ./test > t_after_dwz"
|
||||
rlAssertDiffer t_before_dwz t_after_dwz
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
buExitTmpDir
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
summary: objdump -S disassembly code doesn't follow
|
||||
require+:
|
||||
- strace
|
||||
- coreutils
|
||||
- glibc-debuginfo
|
||||
- coreutils-debuginfo
|
||||
duration: 15m
|
||||
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1311352
|
||||
|
||||
adjust+:
|
||||
- because: "TODO: Debuginfo repos on Fedora are weird"
|
||||
when: distro == fedora
|
||||
enabled: false
|
||||
55
tests/bugs/objdump-S-disassembly-code-doesn-t-follow/test.sh
Executable file
55
tests/bugs/objdump-S-disassembly-code-doesn-t-follow/test.sh
Executable file
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/binutils/Regression/bz1311352-objdump-S-disassembly-code-doesn-t-follow
|
||||
# Description: Test for BZ#1311352 (objdump -S disassembly code doesn't follow)
|
||||
# Author: Milos Prchlik <mprchlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2016 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# 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, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
. "$TMT_TREE/tests/lib.sh" || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
buTestHeader
|
||||
buEnterTmpDir
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "strace -e trace=open,openat -o strace.out objdump -drS /usr/bin/ls &> out"
|
||||
rlRun "grep '/usr/lib/debug' strace.out"
|
||||
|
||||
# Check whether objdump output contains source code snippets.
|
||||
# ls sources can change in time, but it's likely there always
|
||||
# will be at least one "int i;".
|
||||
rlRun "grep 'int i' out > /dev/null" 0 "Checking for source code snippets in objdump output"
|
||||
|
||||
rlLogInfo "$(head -n20 out)"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
buExitTmpDir
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
|
@ -9,3 +9,8 @@ duration: 30m
|
|||
|
||||
link+:
|
||||
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=2225130
|
||||
|
||||
adjust+:
|
||||
- because: "TODO: Debuginfo repos on Fedora are weird"
|
||||
when: distro == fedora
|
||||
enabled: false
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ function buTestHeader () {
|
|||
rlLogInfo "COLLECTION_PACKAGES=$COLLECTION_PACKAGES"
|
||||
rlLogInfo "LD=$_LD"
|
||||
rlLogInfo "GCC=$_GCC"
|
||||
rlLogInfo "ARCH=$(arch)"
|
||||
rlLogInfo "BU_TMPDIR_PARENT=$BU_TMPDIR_PARENT"
|
||||
rlLogInfo "BU_AS_TEST_USER=$BU_AS_TEST_USER"
|
||||
|
||||
|
|
@ -116,9 +117,9 @@ function buBuildSRPM () {
|
|||
if [ ! -z "$BU_AS_TEST_USER" ]; then
|
||||
username="${1:-$BU_TEST_USER}"
|
||||
|
||||
rlRun "su - $username -c 'rpmbuild -bb --define=\"_topdir $TmpDir\" $SPECFILE'"
|
||||
rlRun "su - $username -c 'rpmbuild -bc --define=\"_topdir $TmpDir\" $SPECFILE'"
|
||||
else
|
||||
rlRun " rpmbuild -bb --define=\"_topdir $TmpDir\" $SPECFILE"
|
||||
rlRun " rpmbuild -bc --define=\"_topdir $TmpDir\" $SPECFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ adjust+:
|
|||
- when: distro == fedora-rawhide and collection is not defined
|
||||
require+:
|
||||
- binutils
|
||||
- binutils-devel
|
||||
- binutils-gold
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- annobin-plugin-gcc
|
||||
|
|
@ -210,6 +212,8 @@ adjust+:
|
|||
- when: distro == fedora-39 and collection is not defined
|
||||
require+:
|
||||
- binutils
|
||||
- binutils-devel
|
||||
- binutils-gold
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- annobin-plugin-gcc
|
||||
|
|
@ -223,6 +227,8 @@ adjust+:
|
|||
- when: distro == fedora-38 and collection is not defined
|
||||
require+:
|
||||
- binutils
|
||||
- binutils-devel
|
||||
- binutils-gold
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- annobin-plugin-gcc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue