#11 Import 4 regression tests from RHEL
Merged 6 months ago by mcermak. Opened 6 months ago by vkadlcik.
Unknown source rawhide  into  rawhide

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

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

+ #

+ #   Makefile of /CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

+ #   Description: Test for BZ#1433075 (Rust TLS accesses are badly initialized)

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

+ #

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

+ #

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

+ #

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

+ 

+ export TEST=/CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE repr.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#1433075 (Rust TLS accesses are badly initialized)" >> $(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:    no" >> $(METADATA)

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

+ Description: Test for BZ#1433075 (Rust TLS accesses are badly initialized)

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

+ Bug summary: Rust TLS accesses are badly initialized

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

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

+ summary: Test for BZ#1433075 (Rust TLS accesses are badly initialized)

+ description: |

+     Bug summary: Rust TLS accesses are badly initialized

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

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

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ duration: 15m

+ extra-summary: /CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

+ extra-task: /CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

@@ -0,0 +1,13 @@

+ #include <stdlib.h>

+ #include <stdio.h>

+ 

+ static __thread int a;

+ static int *c;

+ 

+ int main(int argc, char *argv[])

+ {

+  a = 2;

+  c = &a;

+  printf("c=%d\n", *c);

+  return 0;

+ }

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

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /CoreOS/binutils/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized

+ #   Description: Test for BZ#1433075 (Rust TLS accesses are badly initialized)

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

+ #

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

+ #

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

+ 

+ LD="${LD:-$(which ld)}"

+ PACKAGE=$(rpm --qf '%{name}\n' -qf $(which $LD) | head -1)

+ PACKAGES=${PACKAGE}

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

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlLogInfo "LD=$LD"

+         rlLogInfo "$(type gcc)"

+         rlAssertRpm --all

+ 

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

+         rlRun "cp repr.c $TmpDir/"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gcc -o repr1 -fPIC repr.c"

+         rlRun "./repr1"

+ 

+         rlRun "gcc -o repr2 -fPIC -pie repr.c"

+         rlRun "./repr2"

+ 

+         rlRun "gcc -o repr3 -ftls-model=local-dynamic -fPIC repr.c"

+         rlRun "./repr3"

+ 

+         rlRun "gcc -o repr4 -ftls-model=local-dynamic -fPIC -pie repr.c"

+         rlRun "./repr4"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

+ #   Description: Test for BZ#1439350 ([LLNL 7.5 FEAT] RFE create an option to)

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

+ #

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

+ 

+ export TEST=/tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE main.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#1439350 ([LLNL 7.5 FEAT] RFE create an option to)" >> $(METADATA)

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

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

+ Description: Test for BZ#1439350 ([LLNL 7.5 FEAT] RFE create an option to)

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

+ Bug summary: [LLNL 7.5 FEAT] RFE create an option to permanently link in audit library into an executable (glibc)

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

@@ -0,0 +1,4 @@

+ int main(int argc, char **argv)

+ {

+   return 0;

+ }

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

+ summary: Test for BZ#1439350 ([LLNL 7.5 FEAT] RFE create an option to)

+ description: |

+     Bug summary: [LLNL 7.5 FEAT] RFE create an option to permanently link in audit library into an executable (glibc)

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

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

+ component:

+ - binutils

+ - glibc

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - glibc

+ duration: 15m

+ extra-summary: /tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

+ extra-task: /tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

@@ -0,0 +1,81 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/glibc/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to

+ #   Description: Test for BZ#1439350 ([LLNL 7.5 FEAT] RFE create an option to)

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

+ 

+ LD="${LD:-$(which ld)}"

+ PACKAGE=$(rpm --qf '%{name}\n' -qf $(which $LD) | head -1)

+ PACKAGES=${PACKAGE}

+ REQUIRES="${REQUIRES}"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlLogInfo "LD=$LD"

+         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 main.c $TmpDir/"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gcc -o main main.c -Wl,-Paudit.so.1 -z globalaudit &> gcc.out"

+         rlLogInfo "$(cat gcc.out)"

+         rlRun "egrep 'globalaudit ignored' gcc.out" 1

+         rlRun "readelf -d main | grep AUDIT &> readelf.out"

+         rlLogInfo "$(cat readelf.out)"

+         rlRun "egrep 'Dependency audit library: \[audit.so.1\]' readelf.out"

+         rlRun "egrep 'Flags: GLOBAUDIT' readelf.out"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

+ #   Description: Test for BZ#1465318 ([FJ7.4 Bug] [REG] The results of gprof command)

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

+ #

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

+ #

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

+ #

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

+ 

+ export TEST=/CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE gprof.file.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#1465318 ([FJ7.4 Bug] [REG] The results of gprof command)" >> $(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:    no" >> $(METADATA)

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

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

+ 	@echo "Releases:        RHEL7" >> $(METADATA)

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

+ Description: Test for BZ#1465318 ([FJ7.4 Bug] [REG] The results of gprof command)

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

+ Bug summary: [FJ7.4 Bug]: [REG] The results of gprof command with some options differ between RHEL7.4 beta and RHEL7.3.

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

@@ -0,0 +1,4 @@

+ static void fun2(){int i=0;}

+      void fun1(){int i=0;}

+      void fun3(){}

+      int main(){ fun1(); fun2(); return 0;}

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

+ summary: Test for BZ#1465318 ([FJ7.4 Bug] [REG] The results of gprof command)

+ description: |

+     Bug summary: [FJ7.4 Bug]: [REG] The results of gprof command with some options differ between RHEL7.4 beta and RHEL7.3.

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

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

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ - gcc

+ duration: 5m

+ extra-summary: /CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

+ extra-task: /CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

@@ -0,0 +1,77 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /CoreOS/binutils/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command

+ #   Description: Test for BZ#1465318 ([FJ7.4 Bug] [REG] The results of gprof command)

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

+ #

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

+ #

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

+ 

+ LD="${LD:-$(which ld)}"

+ PACKAGE=$(rpm --qf '%{name}\n' -qf $(which $LD) | head -1)

+ PACKAGES=${PACKAGE}

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

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlLogInfo "LD=$LD"

+         rlLogInfo "$(type gcc)"

+         rlAssertRpm --all

+ 

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

+         rlRun "cp gprof.file.c $TmpDir/"

+         rlRun "pushd $TmpDir"

+         rlRun "gcc -pg -g gprof.file.c -o gprof.file"

+         rlRun "./gprof.file"

+         rlAssertExists "gmon.out"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gprof -A gprof.file > option-large_A"

+         rlRun "gprof -C gprof.file > option-large_C"

+         rlRun "gprof -l gprof.file > option-l"

+ 

+         rlLogInfo "$(cat option-large_A)"

+         rlLogInfo "$(cat option-large_C)"

+         rlLogInfo "$(cat option-l)"

+ 

+         rlRun "grep -E '##### -> +void fun3\(\)\{\}' option-large_A"

+         rlRun "grep -E '1 -> +void fun1\(\)\{int i=0;\}' option-large_A"

+ 

+         rlRun "grep -E 'gprof.file.c:2: \(fun1:0x[0-9a-z]+\) 1 executions' option-large_C"

+ 

+         rlRun "grep -E '0.00 +0.00 +0.00 +1 +0.00 +0.00 +fun1 \(gprof.file.c:2 @ [0-9a-z]+\)' option-l"

+         rlRun "grep -E '\[1\] +0.0 +0.00 +0.00 +1 +fun1 \(gprof.file.c:2 @ [0-9a-z]+\) \[1\]' option-l"

+         rlRun "grep -E '\[1\] fun1 \(gprof.file.c:2 @ [0-9a-z]+\) \[2\] fun2 \(gprof.file.c:1 @ [0-9a-z]+\)' option-l"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/binutils/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx

+ #   Description: Test for BZ#1573872 (ld should allow "lea foo@GOT, %ecx")

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

+ #

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

+ 

+ export TEST=/tools/binutils/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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#1573872 (ld should allow \"lea foo@GOT, %ecx\")" >> $(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:    no" >> $(METADATA)

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

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

+ 	@echo "Releases:        RHEL7 RHEL8" >> $(METADATA)

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/binutils/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx

+ Description: Test for BZ#1573872 (ld should allow "lea foo@GOT, %ecx")

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

+ Bug summary: ld should allow "lea foo@GOT, %ecx"

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

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

+ summary: Test for BZ#1573872 (ld should allow "lea foo@GOT, %ecx")

+ description: |

+     Bug summary: ld should allow "lea foo@GOT, %ecx"

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

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

+ component:

+ - binutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - binutils

+ duration: 15m

+ extra-summary: /tools/binutils/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx

+ extra-task: /tools/binutils/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx

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

+ 	.text

+ 	.globl	bar

+ 	.type	bar, @function

+ bar:

+ 	call	__x86.get_pc_thunk.ax

+ 	addl	$_GLOBAL_OFFSET_TABLE_, %eax

+ 	lea	foo@GOT, %ecx

+ 	mov	(%eax,%ecx,1), %eax

+ 	ret

+ 	.section	.text.__x86.get_pc_thunk.ax,"axG",@progbits,__x86.get_pc_thunk.ax,comdat

+ 	.globl	__x86.get_pc_thunk.ax

+ 	.hidden	__x86.get_pc_thunk.ax

+ 	.type	__x86.get_pc_thunk.ax, @function

+ __x86.get_pc_thunk.ax:

+ 	movl	(%esp), %eax

+ 	ret

+ 	.section	.note.GNU-stack,"",@progbits

@@ -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/bz1573872-ld-should-allow-lea-foo-GOT-ecx

+ #   Description: Test for BZ#1573872 (ld should allow "lea foo@GOT, %ecx")

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

+ 

+ AS="${AS:-$(which as)}"

+ PACKAGE=$(rpm --qf '%{name}\n' -qf $(which $AS) | head -1)

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

+ REQUIRES="${REQUIRES:-}"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlLogInfo "PACKAGES=$PACKAGES"

+         rlLogInfo "REQUIRES=$REQUIRES"

+         rlLogInfo "COLLECTIONS=$COLLECTIONS"

+         rlLogInfo "AS=$AS"

+         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 reproducer.S $TmpDir/"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "gcc -B./ -m32 -c -o reproducer.o reproducer.S"

+         rlRun "ld -melf_i386 -shared -o libx.so reproducer.o"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

Import 4 regression tests from RHEL

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Pull-Request has been merged by mcermak

6 months ago
Metadata
Changes Summary 20
+65
file added
tests/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized/Makefile
+5
file added
tests/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized/PURPOSE
+14
file added
tests/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized/main.fmf
+13
file added
tests/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized/repr.c
+69
file added
tests/Regression/bz1433075-Rust-TLS-accesses-are-badly-initialized/runtest.sh
+64
file added
tests/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to/Makefile
+5
file added
tests/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to/PURPOSE
+4
file added
tests/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to/main.c
+16
file added
tests/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to/main.fmf
+81
file added
tests/Regression/bz1439350-LLNL-7-5-FEAT-RFE-create-an-option-to/runtest.sh
+65
file added
tests/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command/Makefile
+5
file added
tests/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command/PURPOSE
+4
file added
tests/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command/gprof.file.c
+15
file added
tests/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command/main.fmf
+77
file added
tests/Regression/bz1465318-FJ7-4-Bug-REG-The-results-of-gprof-command/runtest.sh
+65
file added
tests/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx/Makefile
+5
file added
tests/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx/PURPOSE
+14
file added
tests/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx/main.fmf
+17
file added
tests/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx/reproducer.S
+76
file added
tests/Regression/bz1573872-ld-should-allow-lea-foo-GOT-ecx/runtest.sh