#14 Last "batch" import of RHEL's tests
Merged 5 months ago by mcermak. Opened 6 months ago by vkadlcik.
Unknown source rawhide  into  rawhide

@@ -11,7 +11,6 @@

  - binutils

  - strace

  - nscd

- - glibc-debuginfo

  duration: 15m

  extra-summary: /tools/binutils/Regression/bz1311352-objdump-S-disassembly-code-doesn-t-follow

  extra-task: /tools/binutils/Regression/bz1311352-objdump-S-disassembly-code-doesn-t-follow

@@ -39,6 +39,7 @@

          rlLogInfo "REQUIRES=$REQUIRES"

          rlLogInfo "COLLECTIONS=$COLLECTIONS"

          rlLogInfo "SKIP_COLLECTION_METAPACKAGE_CHECK=$SKIP_COLLECTION_METAPACKAGE_CHECK"

+         rlRun "ARCH=$(arch)"

  

          # We optionally need to skip checking for the presence of the metapackage

          # because that would pull in all the dependent toolset subrpms.  We do not
@@ -53,7 +54,7 @@

  

          rlLogInfo "(without skipped) COLLECTIONS=$COLLECTIONS"

  

-         rpm -q glibc-debuginfo &>/dev/null || rlRun 'debuginfo-install -y glibc'

+         rpm -q glibc-debuginfo.${ARCH} &>/dev/null || rlRun "debuginfo-install -y glibc.${ARCH}"

  

          rlAssertRpm --all

  

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

+ #   Description: ELFOSABI_LINUX is incorrectly set in a dynamic ifunc-using executable

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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/Regression/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE bar.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:     ELFOSABI_LINUX is incorrectly set in a dynamic ifunc-using executable" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils gcc" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             689829" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,3 @@

+ PURPOSE of /tools/binutils/Regression/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

+ Description: ELFOSABI_LINUX is incorrectly set in a dynamic ifunc-using executable

+ Author: Michal Nowak <mnowak@redhat.com>

@@ -0,0 +1,15 @@

+ summary: ELFOSABI_LINUX is incorrectly set in a dynamic ifunc-using executable

+ description: ''

+ contact: Michal Nowak <mnowak@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - gcc

+ duration: 5m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=689829

+ extra-summary: /tools/binutils/Regression/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

+ extra-task: /tools/binutils/Regression/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

@@ -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/bz689829-ELFOSABI_LINUX-is-incorrectly-set-in-a-dynamic-ifunc-using-executable

+ #   Description: ELFOSABI_LINUX is incorrectly set in a dynamic ifunc-using executable

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ PACKAGE="binutils"

+ 

+ # Choose the compiler.

+ GCC=${GCC:-gcc}

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"

+         rlRun "$GCC bar.c -o ${TmpDir}/bar"

+         rlRun "pushd $TmpDir"

+         rlAssertExists "bar"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         readelf -a bar | grep 'OS/ABI' > out

+         rlAssertGrep "UNIX - System V" out

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,66 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz698005-eu-unstrip-do-not-seem-to-match

+ #   Description: eu-unstrip: do not seem to match

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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/Regression/bz698005-eu-unstrip-do-not-seem-to-match

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE

+ 

+ .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:     eu-unstrip: do not seem to match" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             698005" >> $(METADATA)

+ 	@echo "Architectures:   i386 x86_64" >> $(METADATA)

+ 	@echo "Releases:        -RedHatEnterpriseLinux4 -RedHatEnterpriseLinuxServer5 -RedHatEnterpriseLinuxClient5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,3 @@

+ PURPOSE of /tools/binutils/Regression/bz698005-eu-unstrip-do-not-seem-to-match

+ Description: eu-unstrip: do not seem to match

+ Author: Michal Nowak <mnowak@redhat.com>

@@ -0,0 +1,14 @@

+ summary: 'eu-unstrip: do not seem to match'

+ description: ''

+ contact: Michal Nowak <mnowak@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ duration: 5m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=698005

+ extra-summary: /tools/binutils/Regression/bz698005-eu-unstrip-do-not-seem-to-match

+ extra-task: /tools/binutils/Regression/bz698005-eu-unstrip-do-not-seem-to-match

@@ -0,0 +1,61 @@

+ #!/bin/bash

+ # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/binutils/Regression/bz698005-eu-unstrip-do-not-seem-to-match

+ #   Description: eu-unstrip: do not seem to match

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ PACKAGE="binutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     EABI_file="$(file $(find /usr/bin /bin /sbin /usr/sbin/) | grep '(GNU/Linux)' | tail -n1 | awk '{ print $1 }' | sed 's/://g')"

+     rlPhaseStartTest

+       if [ "${EABI_file}" ]; then

+           rlLog "EABI_file = $EABI_file"

+           rlRun "cp -v $EABI_file $TmpDir" 0 "Copy file with GNU/Linux EABI"

+           local_binary="$(basename ${EABI_file})"

+           rlAssertExists ${local_binary}

+           rlRun "strip -R .comment ${local_binary}"

+           file $local_binary > out

+           rlAssertNotGrep "(SYSV)" out

+       else

+           rlDie "There's nothing to test."

+       fi

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

+ #   Description: Make sure there is .stapsdt.base field

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || 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:     Make sure there is .stapsdt.base field" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          binutils glibc systemtap" >> $(METADATA)

+ 	@echo "Requires:        binutils glibc.i386 glibc.x86_64 glibc.ppc glibc.ppc64 glibc.s390 glibc.s390x glibc.ia64 glibc.i686" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             748927" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,8 @@

+ PURPOSE of /tools/binutils/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

+ Description: Make sure there is .stapsdt.base field

+ Author: Michal Nowak <mnowak@redhat.com>

+ 

+ arch = s390,s390x && distro = rhel-7: False

+ arch = ppc64 && distro = rhel-7: False

+ arch = aarch64: False

+ arch = ppc64le: False

@@ -0,0 +1,28 @@

+ summary: Make sure there is .stapsdt.base field

+ description: |

+     arch = s390,s390x && distro = rhel-7: False

+     arch = ppc64 && distro = rhel-7: False

+     arch = aarch64: False

+     arch = ppc64le: False

+ contact: Michal Nowak <mnowak@redhat.com>

+ component:

+ - binutils

+ - glibc

+ - systemtap

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - glibc.i386

+ - glibc.x86_64

+ - glibc.ppc

+ - glibc.ppc64

+ - glibc.s390

+ - glibc.s390x

+ - glibc.ia64

+ - glibc.i686

+ duration: 5m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=748927

+ extra-summary: /tools/binutils/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

+ extra-task: /tools/binutils/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

@@ -0,0 +1,59 @@

+ #!/bin/bash

+ # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/binutils/Regression/bz748927-SystemTap-affected-by-stapsdt-base-1

+ #   Description: Make sure there is .stapsdt.base field

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ PACKAGE="binutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlCheckRpm glibc

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "pushd $TmpDir"

+         rlRun "grep -q CONFIG_UTRACE /boot/config-$( uname -r )" 0,1 || rlLogWarning "Uprobes disabled"

+     rlPhaseEnd

+ 

+ for ld in $( ls {/emul/ia32-linux,}/lib*/ld-2* 2> /dev/null); do

+     rlPhaseStartTest "${ld} from $( rpmquery -f ${ld} )"

+         filename="$( basename ${ld} ).readline"

+         rlRun "readelf -S ${ld} > $filename" 0 "[$( basename ${ld} )] Write section headers of ${ld}"

+         if ! [[ "$( rlGetArch )" == "ia64" && ! "${ld}" =~ "emul" ]]; then

+             rlAssertGrep ".stapsdt.base " $filename || rlLogError "This may be problem for SystemTap"

+         fi

+         rlAssertNotGrep ".stapsdt.base.1" $filename || rlLogError "This may be problem for SystemTap"

+     rlPhaseEnd

+ done

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

+ #   Description: Tests -pie + -fpie with __thread

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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/Regression/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE w.c

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || 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:     Tests -pie + -fpie with __thread" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils gcc" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             755872" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,3 @@

+ PURPOSE of /tools/binutils/Regression/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

+ Description: Tests -pie + -fpie with __thread

+ Author: Michal Nowak <mnowak@redhat.com>

@@ -0,0 +1,15 @@

+ summary: Tests -pie + -fpie with __thread

+ description: ''

+ contact: Michal Nowak <mnowak@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - gcc

+ duration: 5m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=755872

+ extra-summary: /tools/binutils/Regression/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

+ extra-task: /tools/binutils/Regression/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

@@ -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/bz755872-fpie-pie-does-not-appear-to-work-with-__thread-variables

+ #   Description: Tests -pie + -fpie with __thread

+ #   Author: Michal Nowak <mnowak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2011 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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ PACKAGE="binutils"

+ 

+ # Choose the compiler.

+ GCC=${GCC:-gcc}

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+ 	cp w.c $TmpDir

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+ 	rlRun "$GCC -o w -g -O2 -pie -fpie w.c" 0 "Compile __thread with -fpie -pie"

+         rlAssertExists "w"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,7 @@

+ __thread int a;

+ 

+ int

+ main(void)

+ {

+   return a;

+ }

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

+ #   Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)

+ #   Author: Milos Prchlik <mprchlik@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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ export TEST=/CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || chmod a+x runtest.sh

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

+ include /usr/share/rhts/lib/rhts-make.include

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Milos Prchlik <mprchlik@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     Test for BZ#850832 (The binutils package contains the windmc(1) manual)" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             850832" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

+ Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)

+ Author: Milos Prchlik <mprchlik@redhat.com>

+ Bug summary: The binutils package contains the windmc(1) manual page but the utility is not included

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=850832

@@ -0,0 +1,16 @@

+ summary: Test for BZ#850832 (The binutils package contains the windmc(1) manual)

+ description: |

+     Bug summary: The binutils package contains the windmc(1) manual page but the utility is not included

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=850832

+ contact: Milos Prchlik <mprchlik@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ duration: 5m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=850832

+ extra-summary: /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

+ extra-task: /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

@@ -0,0 +1,61 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /CoreOS/binutils/Regression/bz850832-The-binutils-package-contains-the-windmc-1-manual

+ #   Description: Test for BZ#850832 (The binutils package contains the windmc(1) manual)

+ #   Author: Milos Prchlik <mprchlik@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

+ 

+ PACKAGE="binutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "rpm -ql binutils | grep windmc > windmc.txt" 0,1

+         rlLogInfo "$(cat windmc.txt)"

+         rlRun "FILE_CNT=`cat windmc.txt | wc -l`"

+         if [ "$FILE_CNT" == "1" ]; then

+             rlFail "Either windmg manpage or binary is present - both options are wrong."

+         elif [ "$FILE_CNT" == "2" ]; then

+             rlLogWarning "Both windmc manpage and binary are present - this probably should not happen."

+         elif [ "$FILE_CNT" == "0" ]; then

+             rlPass "Windmc manpage nor binary are present"

+         else

+             rlLogWarning "Unexpected number of 'windmc' files present in binutils package - broken package/test?"

+         fi

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,65 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

+ #   Description: Test for BZ#872148 (PIE + __thread produce text relocations on s390(x))

+ #   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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ export TEST=/tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer6.c

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || chmod a+x runtest.sh

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

+ include /usr/share/rhts/lib/rhts-make.include

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Milos Prchlik <mprchlik@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     Test for BZ#872148 (PIE + __thread produce text relocations on s390(x))" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        15m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             872148" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,17 @@

+ PURPOSE of /tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

+ Description: Test for BZ#872148 (PIE + __thread produce text relocations on s390(x))

+ Author: Milos Prchlik <mprchlik@redhat.com>

+ Bug summary: PIE + __thread produce text relocations on s390(x)

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=872148

+ 

+ Requires systemd without a workaround:

+ 

+ # PIE is broken on s390 (#868839, #872148)

+ %ifnarch s390 s390x

+ %global _hardened_build 1

+ %endif

+ 

+ ^^ this is a workaround that makes bug disappear for this particular reproducer.

+ So, fetch systemd srpm, comment this condition out, rebuild, install, reboot, then

+ you can run this tests. One day I may make this part automatic but replacing systemd

+ wouldn't be seen as a good behaviour by other tests run after this task, so not yet.

@@ -0,0 +1,30 @@

+ summary: Test for BZ#872148 (PIE + __thread produce text relocations on s390(x))

+ description: |

+     Bug summary: PIE + __thread produce text relocations on s390(x)

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=872148

+ 

+     Requires systemd without a workaround:

+ 

+     # PIE is broken on s390 (#868839, #872148)

+     %ifnarch s390 s390x

+     %global _hardened_build 1

+     %endif

+ 

+     ^^ this is a workaround that makes bug disappear for this particular reproducer.

+     So, fetch systemd srpm, comment this condition out, rebuild, install, reboot, then

+     you can run this tests. One day I may make this part automatic but replacing systemd

+     wouldn't be seen as a good behaviour by other tests run after this task, so not yet.

+ contact: Milos Prchlik <mprchlik@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - elfutils

+ - gcc

+ duration: 15m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=872148

+ extra-summary: /tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

+ extra-task: /tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

@@ -0,0 +1,20 @@

+ /*

+ 	This reproducer is taken from https://sourceware.org/bugzilla/show_bug.cgi?id=6443

+ 	Author is Jakub Jelinek <jakub@redhat.com>

+ 

+ 	gcc -O2 -pie -fpie -o reproducer6 reproducer6.c

+ 	eu-readelf -d reproducer6 | grep TEXTREL

+ 	test $? -eq 0 && echo FAIL || echo PASS

+ */

+ 

+ __thread int a;

+ __thread int b __attribute((tls_model ("local-exec")));

+ __thread int c __attribute((tls_model ("initial-exec")));

+ __thread int d __attribute((tls_model ("local-dynamic")));

+ __thread int e __attribute((tls_model ("global-dynamic")));

+ 

+ int

+ main (void)

+ {

+   return a + b + c + d + e;

+ }

@@ -0,0 +1,76 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/binutils/Regression/bz872148-PIE-thread-produce-text-relocations-on-s390-x

+ #   Description: Test for BZ#872148 (PIE + __thread produce text relocations on s390(x))

+ #   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

+ 

+ PACKAGES="binutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlLogInfo "SKIP_COLLECTION_METAPACKAGE_CHECK=$SKIP_COLLECTION_METAPACKAGE_CHECK"

+ 

+         # We optionally need to skip checking for the presence of the metapackage

+         # because that would pull in all the dependent toolset subrpms.  We do not

+         # always want that, especially in CI.

+         _COLLECTIONS="$COLLECTIONS"

+         if ! test -z $SKIP_COLLECTION_METAPACKAGE_CHECK; then

+             for c in $SKIP_COLLECTION_METAPACKAGE_CHECK; do

+                 rlLogInfo "ignoring metapackage check for collection $c"

+                 export COLLECTIONS=$(shopt -s extglob && echo ${COLLECTIONS//$c/})

+             done

+         fi

+ 

+         rlLogInfo "(without skipped) COLLECTIONS=$COLLECTIONS"

+ 

+         rlAssertRpm --all

+ 

+         export COLLECTIONS="$_COLLECTIONS"

+ 

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "cp reproducer6.c $TmpDir/"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gcc -O2 -pie -fpie -o reproducer6 reproducer6.c"

+         rlRun "eu-readelf -d reproducer6 > elfutils.log"

+         rlRun "readelf -d reproducer6 > binutils.log"

+         rlAssertNotGrep "TEXTREL" binutils.log

+         rlAssertNotGrep "TEXTREL" elfutils.log

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd" # $TmpDir

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,66 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

+ #   Description: Test for BZ#895241 (Bogus warning about cross object references to)

+ #   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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ export TEST=/tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE t.c u.c v.c

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || chmod a+x runtest.sh

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

+ include /usr/share/rhts/lib/rhts-make.include

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Milos Prchlik <mprchlik@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     Test for BZ#895241 (Bogus warning about cross object references to)" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        15m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             895241" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 	@echo "Architectures:   x86_64" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,8 @@

+ PURPOSE of /tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

+ Description: Test for BZ#895241 (Bogus warning about cross object references to)

+ Author: Milos Prchlik <mprchlik@redhat.com>

+ Bug summary: Bogus warning about cross object references to hidden symbols in GOLD

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=895241

+ 

+ Relevancy:

+ collection = devtoolset-4: PACKAGES=devtoolset-4-binutils REQUIRES=devtoolset-4-gcc ALTERNATIVES_ROOT=/opt/rh/devtoolset-4/root

@@ -0,0 +1,20 @@

+ summary: Test for BZ#895241 (Bogus warning about cross object references to)

+ description: |

+     Bug summary: Bogus warning about cross object references to hidden symbols in GOLD

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=895241

+ 

+     Relevancy:

+     collection = devtoolset-4: PACKAGES=devtoolset-4-binutils REQUIRES=devtoolset-4-gcc ALTERNATIVES_ROOT=/opt/rh/devtoolset-4/root

+ contact: Milos Prchlik <mprchlik@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - gcc

+ duration: 15m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=895241

+ extra-summary: /tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

+ extra-task: /tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

@@ -0,0 +1,69 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/binutils/Regression/bz895241-Bogus-warning-about-cross-object-references-to

+ #   Description: Test for BZ#895241 (Bogus warning about cross object references to)

+ #   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

+ 

+ PACKAGES="${PACKAGES:-binutils}"

+ REQUIRES="${REQUIRES:-gcc}"

+ 

+ ALTERNATIVES_ROOT="${ALTERNATIVES_ROOT:-}"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlAssertRpm --all

+ 

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "cp t.c u.c v.c $TmpDir/"

+         rlRun "pushd $TmpDir"

+ 

+         rlRun "alternatives --altdir $ALTERNATIVES_ROOT/etc/alternatives/ --admindir $ALTERNATIVES_ROOT/var/lib/alternatives/ --display ld"

+         rlRun "alternatives --altdir $ALTERNATIVES_ROOT/etc/alternatives/ --admindir $ALTERNATIVES_ROOT/var/lib/alternatives/ --set ld $ALTERNATIVES_ROOT/usr/bin/ld.gold"

+         rlRun "alternatives --altdir $ALTERNATIVES_ROOT/etc/alternatives/ --admindir $ALTERNATIVES_ROOT/var/lib/alternatives/ --display ld"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gcc v.c -fPIC -shared -olibv.so"

+         rlRun "gcc u.c -fPIC -shared -olibu.so"

+         rlRun "gcc t.c -D_GNU_SOURCE -L. -lu -lv -ldl -Wl,-rpath,`pwd` &> out"

+         rlLogInfo "$(cat out)"

+         rlAssertNotGrep "warning: hidden symbol .* is referenced" out

+         rlRun "./a.out"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "alternatives --altdir $ALTERNATIVES_ROOT/etc/alternatives/ --admindir $ALTERNATIVES_ROOT/var/lib/alternatives/ --auto ld"

+         rlRun "alternatives --altdir $ALTERNATIVES_ROOT/etc/alternatives/ --admindir $ALTERNATIVES_ROOT/var/lib/alternatives/ --display ld"

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,16 @@

+ #include <stdio.h>

+ #include <dlfcn.h>

+ 

+ void foo(void) __attribute__((visibility("hidden")));

+ void foo(void) {

+     puts("In executable: foo - before forwarding to DSO");

+       ((void(*)(void))dlsym(RTLD_DEFAULT,"foo"))();

+         puts("In executable: foo - after forwarding to DSO");

+ }

+ 

+ void bar(void);

+ 

+ int main() {

+     foo();

+       bar();

+ }

@@ -0,0 +1,7 @@

+ #include <stdio.h>

+ 

+ void foo(void);

+ void bar(void) {

+     puts("In DSO: bar");

+       foo();

+ }

@@ -0,0 +1,5 @@

+ #include <stdio.h>

+ 

+ void foo(void) {

+     puts("In DSO: foo");

+ }

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/binutils/Regression/bz916214-binutils-contains-empty-man-pages

+ #   Description: Test for BZ#916214 (binutils contains empty man pages)

+ #   Author: Miroslav Franc <mfranc@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2013 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/Regression/bz916214-binutils-contains-empty-man-pages

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	test -x runtest.sh || chmod a+x runtest.sh

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

+ include /usr/share/rhts/lib/rhts-make.include

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Miroslav Franc <mfranc@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     Test for BZ#916214 (binutils contains empty man pages)" >> $(METADATA)

+ 	@echo "Type:            Regression" >> $(METADATA)

+ 	@echo "TestTime:        30m" >> $(METADATA)

+ 	@echo "RunFor:          binutils" >> $(METADATA)

+ 	@echo "Requires:        binutils man man-db" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2" >> $(METADATA)

+ 	@echo "Confidential:    no" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             916214" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/binutils/Regression/bz916214-binutils-contains-empty-man-pages

+ Description: Test for BZ#916214 (binutils contains empty man pages)

+ Author: Miroslav Franc <mfranc@redhat.com>

+ Bug summary: binutils contains empty man pages

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=916214

@@ -0,0 +1,18 @@

+ summary: Test for BZ#916214 (binutils contains empty man pages)

+ description: |

+     Bug summary: binutils contains empty man pages

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=916214

+ contact: Miroslav Franc <mfranc@redhat.com>

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - man

+ - man-db

+ duration: 30m

+ link:

+ -   relates: https://bugzilla.redhat.com/show_bug.cgi?id=916214

+ extra-summary: /tools/binutils/Regression/bz916214-binutils-contains-empty-man-pages

+ extra-task: /tools/binutils/Regression/bz916214-binutils-contains-empty-man-pages

@@ -0,0 +1,68 @@

+ #!/bin/bash

+ # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/binutils/Regression/bz916214-binutils-contains-empty-man-pages

+ #   Description: Test for BZ#916214 (binutils contains empty man pages)

+ #   Author: Miroslav Franc <mfranc@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2013 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.

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ 

+ # Include Beaker environment

+ . /usr/share/beakerlib/beakerlib.sh || exit 1

+ 

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm binutils

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+ 	rpm -qd binutils | grep 'man' | while read -r m

+         do

+ 	    rlLog "$m"

+             man "$m" | col -b > man.txt 

+ 	    rlRun "[[ $(wc -c <man.txt) -ge 2000 ]]"

+ 	    rlRun "[[ $(wc -l <man.txt) -ge 50 ]]"

+             rlAssertGrep NAME man.txt

+             rlAssertGrep SYNOPSIS man.txt

+             rlAssertGrep DESCRIPTION man.txt

+             rlAssertGrep OPTIONS man.txt

+             rlAssertGrep COPYRIGHT man.txt

+             rlAssertGrep 'Free Software Foundation' man.txt

+             rlAssertGrep binutils man.txt