CI testing: Add test covering rhbz1969584
This commit is contained in:
parent
f1a1007e43
commit
a9360e73d9
@ -0,0 +1,16 @@
|
||||
summary: Test for BZ#1958954 (annobin fails to skip endbr64 entry point check)
|
||||
description: |
|
||||
Bug summary: annobin fails to skip endbr64 entry point check for shared objects
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1958954
|
||||
contact:
|
||||
- Martin Cermak <mcermak@redhat.com>
|
||||
component:
|
||||
- annobin
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- annobin-annocheck
|
||||
- gcc
|
||||
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
|
54
tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh
Executable file
54
tests/Regression/annobin-fails-to-skip-endbr64-entry-point-check/runtest.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/annobin/Regression/annobin-fails-to-skip-endbr64-entry-point-check
|
||||
# Description: Test for BZ#1958954 (annobin fails to skip endbr64 entry point check)
|
||||
# Author: Martin Cermak <mcermak@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2021 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
|
||||
|
||||
PACKAGE="annobin"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir"
|
||||
rlRun "rpm -q annobin-annocheck gcc"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "echo 'void f1(void) {}' > f1.c"
|
||||
rlRun "echo 'void f2(void) {}' > f2.c"
|
||||
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"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
Loading…
x
Reference in New Issue
Block a user