Import RHEL's regression test for #509124
This commit is contained in:
parent
14a74d027d
commit
ba92017b68
59
tests/Regression/509124-holes-in-debuginfo/Makefile
Normal file
59
tests/Regression/509124-holes-in-debuginfo/Makefile
Normal file
@ -0,0 +1,59 @@
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
export TEST=/tools/binutils/Regressions/readelf/509124-holes-in-debuginfo
|
||||
export TESTVERSION=1.0
|
||||
|
||||
BUILT_FILES=
|
||||
|
||||
FILES=$(METADATA) runtest.sh Makefile PURPOSE ascend.C test.c
|
||||
|
||||
.PHONY: all install download clean
|
||||
|
||||
run: $(FILES) build
|
||||
./runtest.sh
|
||||
|
||||
build: $(BUILT_FILES)
|
||||
chmod a+x ./runtest.sh
|
||||
|
||||
clean:
|
||||
rm -f *~ $(BUILT_FILES)
|
||||
|
||||
|
||||
include /usr/share/rhts/lib/rhts-make.include
|
||||
|
||||
$(METADATA): Makefile
|
||||
@echo "Owner: Michal Nowak <mnowak@redhat.com>" > $(METADATA)
|
||||
@echo "Name: $(TEST)" >> $(METADATA)
|
||||
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
|
||||
@echo "Path: $(TEST_DIR)" >> $(METADATA)
|
||||
@echo "Description: holes in debuginfo" >> $(METADATA)
|
||||
@echo "Type: Regression" >> $(METADATA)
|
||||
@echo "TestTime: 15m" >> $(METADATA)
|
||||
@echo "RunFor: binutils" >> $(METADATA)
|
||||
@echo "Requires: binutils gcc44 gcc gcc44-c++ gcc-c++" >> $(METADATA)
|
||||
@echo "Priority: Normal" >> $(METADATA)
|
||||
@echo "License: GPLv2" >> $(METADATA)
|
||||
@echo "Confidential: no" >> $(METADATA)
|
||||
@echo "Destructive: no" >> $(METADATA)
|
||||
@echo "Bug: 509124 499164" >> $(METADATA)
|
||||
@echo "Releases: -RHEL4 -RHEL5" >> $(METADATA)
|
||||
|
||||
rhts-lint $(METADATA)
|
14
tests/Regression/509124-holes-in-debuginfo/PURPOSE
Normal file
14
tests/Regression/509124-holes-in-debuginfo/PURPOSE
Normal file
@ -0,0 +1,14 @@
|
||||
(1) readelf fix now posted upstream:
|
||||
http://sourceware.org/ml/binutils/2009-07/msg00123.html
|
||||
QA: New testcase: binutils-all/testranges.s
|
||||
|
||||
(2) gcc has been fixed based on this bugreport by Jakub upstream:
|
||||
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40713
|
||||
gcc44 backport request for RHEL-5.5 is: Bug 510958
|
||||
|
||||
(3) Going to be backported for RHEL-5.5 readelf.
|
||||
It has been already fixed by Nick Clifton upstream:
|
||||
http://sourceware.org/ml/binutils/2009-06/msg00418.html
|
||||
http://sourceware.org/ml/binutils-cvs/2009-06/msg00158.html
|
||||
QA: RHEL-only new testcase: binutils-all/testloc.S
|
||||
as a part of binutils-all/readelf.exp (not shown when PASSing)
|
15
tests/Regression/509124-holes-in-debuginfo/ascend.C
Executable file
15
tests/Regression/509124-holes-in-debuginfo/ascend.C
Executable file
@ -0,0 +1,15 @@
|
||||
class A {
|
||||
public:
|
||||
A();
|
||||
void f(){}
|
||||
};
|
||||
|
||||
class C {
|
||||
C();
|
||||
};
|
||||
|
||||
C::C() {
|
||||
A* p = new A;
|
||||
p->f();
|
||||
}
|
||||
|
25
tests/Regression/509124-holes-in-debuginfo/main.fmf
Normal file
25
tests/Regression/509124-holes-in-debuginfo/main.fmf
Normal file
@ -0,0 +1,25 @@
|
||||
summary: holes in debuginfo
|
||||
description: "(1) readelf fix now posted upstream:\n http://sourceware.org/ml/binutils/2009-07/msg00123.html\n\
|
||||
QA: New testcase: binutils-all/testranges.s\n\n(2) gcc has been fixed based on\
|
||||
\ this bugreport by Jakub upstream:\n http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40713\n\
|
||||
\ gcc44 backport request for RHEL-5.5 is: Bug 510958\n\n(3) Going to be backported\
|
||||
\ for RHEL-5.5 readelf.\n It has been already fixed by Nick Clifton upstream:\n\
|
||||
\ http://sourceware.org/ml/binutils/2009-06/msg00418.html\n http://sourceware.org/ml/binutils-cvs/2009-06/msg00158.html\n\
|
||||
QA: RHEL-only new testcase: binutils-all/testloc.S\n as a part of binutils-all/readelf.exp\
|
||||
\ (not shown when PASSing) \n"
|
||||
contact: Michal Nowak <mnowak@redhat.com>
|
||||
component:
|
||||
- binutils
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- binutils
|
||||
- gcc44
|
||||
- gcc
|
||||
- gcc44-c++
|
||||
- gcc-c++
|
||||
duration: 15m
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=509124
|
||||
extra-summary: /tools/binutils/Regressions/readelf/509124-holes-in-debuginfo
|
||||
extra-task: /tools/binutils/Regressions/readelf/509124-holes-in-debuginfo
|
73
tests/Regression/509124-holes-in-debuginfo/runtest.sh
Executable file
73
tests/Regression/509124-holes-in-debuginfo/runtest.sh
Executable file
@ -0,0 +1,73 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2009 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# Author: Michal Nowak <mnowak@redhat.com>
|
||||
#
|
||||
# Include rhts environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="binutils"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup Setup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlShowPackageVersion $PACKAGE
|
||||
rlShowRunningKernel
|
||||
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
cp ascend.C test.c $TmpDir
|
||||
rlRun "pushd $TmpDir"
|
||||
rlPhaseEnd
|
||||
|
||||
for gcc in $( ls /usr/bin/gcc{,44} 2> /dev/null ); do
|
||||
for opt in s $( seq 0 3 ); do
|
||||
rlPhaseStartTest "ascend.C: gcc=$gcc opt=$opt"
|
||||
rlRun "$gcc -O${opt} ascend.C -c -g"
|
||||
rlAssertExists "ascend.o"
|
||||
# kinda weird running readelf on .o file, but...
|
||||
rlRun "readelf -a -w -W ./ascend.o > /dev/less 2> readelf.errout.g++" 0 "[gcc] Generating readelf output"
|
||||
rlLog "$( cat readelf.errout.g++ )"
|
||||
rlAssertNotGrep "readelf" readelf.errout.g++
|
||||
rm -f ./ascend.o
|
||||
rlPhaseEnd
|
||||
done
|
||||
done
|
||||
|
||||
for gcc in $( ls /usr/bin/gcc{,44} 2> /dev/null ); do
|
||||
for opt in s $( seq 0 3 ); do
|
||||
rlPhaseStartTest "test.c: gcc=$gcc opt=$opt"
|
||||
rlRun "$gcc -O${opt} test.c -c -g"
|
||||
rlAssertExists "test.o"
|
||||
# kinda weird running readelf on .o file, but...
|
||||
rlRun "readelf -a -w -W ./test.o > /dev/less 2> readelf.errout.g++" 0 "[gcc] Generating readelf output"
|
||||
rlLog "$( cat readelf.errout.g++ )"
|
||||
rlAssertNotGrep "readelf" readelf.errout.g++
|
||||
rm -f ./test.o
|
||||
rlPhaseEnd
|
||||
done
|
||||
done
|
||||
|
||||
rlPhaseStartCleanup Cleanup
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
14
tests/Regression/509124-holes-in-debuginfo/test.c
Normal file
14
tests/Regression/509124-holes-in-debuginfo/test.c
Normal file
@ -0,0 +1,14 @@
|
||||
void f(int i) {
|
||||
k(i);
|
||||
}
|
||||
|
||||
void g(int i) {
|
||||
int j[65537];
|
||||
l(i,j);
|
||||
}
|
||||
|
||||
struct s {
|
||||
void (*m)(int i);
|
||||
void (*n)(int i);
|
||||
} t={f,g};
|
||||
|
Loading…
Reference in New Issue
Block a user