Port tests

This commit is contained in:
Miloš Prchlík 2024-01-29 13:28:59 +01:00 committed by mprchlik
commit 03a0db98eb
11 changed files with 3263 additions and 0 deletions

View file

@ -0,0 +1,9 @@
summary: Assembles a procedure with AVX-512 instructions.
link+:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1140375
contact+:
- Arjun Shankar <ashankar@redhat.com>
duration: 5m

View file

@ -0,0 +1,56 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/binutils/Regression/bz1140375-AVX-512-support-in-binutils
# Description: Assembles a procedure with AVX-512 instructions.
# Author: Arjun Shankar <ashankar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2014 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
rlJournalStart
rlPhaseStartSetup
buTestHeader
buEnterTmpDir
buCopyReproducers tst-auditmod10a.s
rlPhaseEnd
rlPhaseStartTest
rlRun "as tst-auditmod10a.s -o tst-auditmod10a.o"
rlAssertExists "tst-auditmod10a.o"
rlRun "objdump -d tst-auditmod10a.o > tst-auditmod10a.disas"
rlLog "Interesting instructions:"
rlLog "$(cat tst-auditmod10a.disas | grep zmm)"
rlAssertGrep "vmovdqa64" tst-auditmod10a.disas
rlAssertGrep "vpbroadcastq" tst-auditmod10a.disas
rlAssertGrep "vpxord" tst-auditmod10a.disas
rlPhaseEnd
rlPhaseStartCleanup
buExitTmpDir
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
summary: Backport selective allocation of PGSTE to avoid
description: |
Backport selective allocation of PGSTE to avoid global vm.allocate_pgste
link+:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1140375
duration: 15m
adjust+:
- when: arch != s390x
enabled: false

View file

@ -0,0 +1,4 @@
.text
.global fred
fred:
nop

View 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/bz1485398-Backport-selective-allocation-of-PGSTE-to-avoid
# Description: Test for BZ#1485398 (Backport selective allocation of PGSTE to avoid)
# 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/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$TMT_TREE/tests/lib.sh" || exit 1
rlJournalStart
rlPhaseStartSetup
buTestHeader
buEnterTmpDir
buCopyReproducers repr.s
rlPhaseEnd
rlPhaseStartTest
rlRun "as repr.s -o repr.o"
rlRun "ld -e 0 repr.o -o repr.no-pgste.exe"
rlRun "ld -e 0 repr.o -o repr.pgste.exe --s390-pgste"
rlRun "readelf -l repr.no-pgste.exe | grep PGSTE" 1
rlRun "readelf -l repr.pgste.exe | grep PGSTE" 0
rlPhaseEnd
rlPhaseStartCleanup
buExitTmpDir
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,10 @@
summary: ELFv2 @localentry not supported by RHEL7.1 LE
link+:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1194164
duration: 15m
adjust+:
- when: arch != ppc64le,ppc64
enabled: false

View file

@ -0,0 +1,49 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/binutils/Regression/bz1194164-ELFv2-localentry-not-supported-by-RHEL7-1-LE
# Description: Test for BZ#1194164 (ELFv2 @localentry not supported by RHEL7.1 LE)
# 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.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$TMT_TREE/tests/lib.sh" || exit 1
rlJournalStart
rlPhaseStartSetup
buTestHeader
buEnterTmpDir
rlRun "echo '.quad foo@localentry' > reproducer.s"
rlPhaseEnd
rlPhaseStartTest
rlRun "as -a64 reproducer.s"
rlPhaseEnd
rlPhaseStartCleanup
buExitTmpDir
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -0,0 +1,13 @@
summary: Checks that 'as' supports CRC32 instructions on aarch64
link+:
- verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1179810
contact+:
- Arjun Shankar <ashankar@redhat.com>
duration: 5m
adjust+:
- when: arch != aarch64
enabled: false

View file

@ -0,0 +1,5 @@
int
main (void)
{
return 0;
}

View file

@ -0,0 +1,51 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/binutils/Regression/bz1179810-aarch64-crc32-instruction-support
# Description: Checks that 'as' supports CRC32 instructions on aarch64
# Author: Arjun Shankar <ashankar@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.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
. "$TMT_TREE/tests/lib.sh" || exit 1
rlJournalStart
rlPhaseStartSetup
buTestHeader
buEnterTmpDir
buCopyReproducers minimal.c
rlPhaseEnd
rlPhaseStartTest
rlRun "gcc -Wa,-mcpu=generic+crc -o minimal minimal.c"
rlRun "./minimal" # this won't generate any CRC32 instructions, it's
# just a sanity test.
rlPhaseEnd
rlPhaseStartCleanup
buExitTmpDir
rlPhaseEnd
rlJournalPrintText
rlJournalEnd