#6 Introduce CI gating tests.
Closed 3 years ago by mcermak. Opened 3 years ago by mcermak.
Unknown source rawhide  into  rawhide

file added
+1
@@ -0,0 +1,1 @@

+ 1

file added
+13
@@ -0,0 +1,13 @@

+ --- !Policy

+ product_versions:

+   - fedora-*

+ decision_context: bodhi_update_push_stable

+ subject_type: koji_build

+ rules:

+   - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

+ --- !Policy

+ product_versions:

+   - rhel-9

+ decision_context: osci_compose_gate

+ rules:

+   - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}

file added
+6
@@ -0,0 +1,6 @@

+ summary: CI Gating Plan

+ discover:

+     how: fmf

+     directory: tests

+ execute:

+     how: beakerlib

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/GNU-Attribute-notes-not-recognized

+ #   Description: GNU-Attribute-notes-not-recognized

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/GNU-Attribute-notes-not-recognized

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     GNU-Attribute-notes-not-recognized" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/GNU-Attribute-notes-not-recognized

+ Description: GNU-Attribute-notes-not-recognized

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils doesn't recognize GNU Attribute notes

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

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

+ summary: GNU-Attribute-notes-not-recognized

+ description: |

+     Bug summary: elfutils doesn't recognize GNU Attribute notes

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - bash

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/GNU-Attribute-notes-not-recognized

+ extra-task: /tools/elfutils/Regression/GNU-Attribute-notes-not-recognized

@@ -0,0 +1,43 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/GNU-Attribute-notes-not-recognized

+ #   Description: GNU-Attribute-notes-not-recognized

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# Rely on that /bin/bash is annobin-annotated per

+ 	# - https://fedoraproject.org/wiki/Toolchain/Watermark

+ 	# - https://fedoraproject.org/wiki/Changes/Annobin

+ 	# Seems to work fine with bash-4.4.19-6.el8 and elfutils-0.174-5.el8.

+ 	set -o pipefail

+ 	rlRun "eu-readelf -n /bin/bash | grep -2 '^  GA' | fgrep 'GNU Build Attribute' | tail -50"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/GNU-Property-notes-not-recognized

+ #   Description: GNU-Property-notes-not-recognized

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/GNU-Property-notes-not-recognized

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE gnu_props.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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     GNU-Property-notes-not-recognized" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/GNU-Property-notes-not-recognized

+ Description: GNU-Property-notes-not-recognized

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils doesn't recognize GNU Property notes

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

@@ -0,0 +1,45 @@

+ #define NT_GNU_PROPERTY_TYPE_0 5

+ #define GNU_PROPERTY_STACK_SIZE 1

+ #define GNU_PROPERTY_NO_COPY_ON_PROTECTED 2

+ 

+ /* Normal notes always have alignment and padding of 4 bytes,

+    but GNU Property notes use 4 byte words, with 8 byte padding

+    for ELFCLASS64.  */

+ #if __SIZEOF_PTRDIFF_T__  == 8

+ # define ALIGN 3

+ #elif __SIZEOF_PTRDIFF_T__  == 4

+ # define ALIGN 2

+ #endif

+ 

+ 	.section ".note.gnu.property", "a"

+ 	.p2align ALIGN

+ 	/* First note.  */

+ 	.long 1f - 0f			/* name length.  */

+ 	.long 4f - 2f			/* data length.  */

+ 	.long NT_GNU_PROPERTY_TYPE_0	/* note type.  */

+ 0:

+ 	.asciz "GNU"			/* vendor name.  */

+ 1:

+ 	.p2align ALIGN			/* Padding.  */

+ 2:

+ 	.long GNU_PROPERTY_STACK_SIZE	/* pr_type.  */

+ 	.long 4f - 3f			/* pr_datasz.  */

+ 3:

+ 	.dc.a 0x280000			/* Stack size.  */

+ 4:

+ 	.p2align ALIGN

+ 

+ 	/* Second note.  */

+ 	.long 6f - 5f				/* name length.  */

+ 	.long 8f - 7f				/* data length.  */

+ 	.long NT_GNU_PROPERTY_TYPE_0		/* note type.  */

+ 5:

+ 	.asciz "GNU"				/* vendor name.  */

+ 6:

+ 	.p2align ALIGN				/* Padding.  */

+ 7:

+         .long GNU_PROPERTY_NO_COPY_ON_PROTECTED /* pr_type.  */

+         .long 0					/* pr_datasz.  */

+ 	/* No data.  */

+ 8:

+ 	.p2align ALIGN

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

+ summary: GNU-Property-notes-not-recognized

+ description: |

+     Bug summary: elfutils doesn't recognize GNU Property notes

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - gcc

+ - yum

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/GNU-Property-notes-not-recognized

+ extra-task: /tools/elfutils/Regression/GNU-Property-notes-not-recognized

@@ -0,0 +1,72 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/GNU-Property-notes-not-recognized

+ #   Description: GNU-Property-notes-not-recognized

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStart FAIL Setup

+         rlAssertRpm $PACKAGE

+         rlRun "TMP=$(mktemp -d)"

+         rlRun "cp gnu_props.S $TMP"

+         rlRun "pushd $TMP"

+ 

+         # This is an attempt to set up a test environment

+         # allowing the compat arch compilation (-m3[12]) :

+         rlRun "yum -y install --skip-broken --setopt=multilib_policy=all libgcc glibc-devel"

+ 

+         set -x

+         arch_compile_flags=""

+         for i in \-m64 \-m32 \-m31; do

+             echo "int main () {}" | gcc $i -o /dev/null -xc - && arch_compile_flags="$arch_compile_flags $i"

+         done

+         set +x

+     rlPhaseEnd

+ 

+     testcnt=0

+     # gcc-8.2.1-3.4.el8.aarch64 doesn't accept -m64.  But it works as expected

+     # when this switch gets omitted.  So, on that platform we'll not have -m64

+     # within the $arch_compile_flags, but we'll still iterate over ' ' :

+     for m in ' ' $arch_compile_flags; do

+         rlPhaseStart FAIL "Test compile flag \'$m\'"

+             rlRun "gcc $m -c gnu_props.S -o gnu_props.o"

+             rlRun "eu-readelf -n ./gnu_props.o |& tee out.txt"

+             rlRun "fgrep 'STACK_SIZE 0x280000' out.txt"

+             rm gnu_props.o out.txt

+             testcnt=$((testcnt + 1))

+         rlPhaseEnd

+     done

+ 

+     rlPhaseStart FAIL Cleanup

+         test $testcnt -eq 0 && rlFail "No test was performed."

+         rlRun "popd"

+         rlRun "rm -r $TMP"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

+ #   Description: Test for BZ#1674430 (RFE support reading compressed ELF objects)

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#1674430 (RFE support reading compressed ELF objects)" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

+ Description: Test for BZ#1674430 (RFE support reading compressed ELF objects)

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: RFE: support reading compressed ELF objects

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

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

+ summary: Test for BZ#1674430 (RFE support reading compressed ELF objects)

+ description: |

+     Bug summary: RFE: support reading compressed ELF objects

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

+ extra-task: /tools/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

@@ -0,0 +1,44 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/RFE-support-reading-compressed-ELF-objects

+ #   Description: Test for BZ#1674430 (RFE support reading compressed ELF objects)

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ KOXZS_TO_TEST=20

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         # Look to see that dwelf_elf_begin is now in libdw.so

+         rlRun "eu-nm -D $(ldd $(which eu-readelf) | awk '/libdw.so/ {print $3}') | fgrep 'dwelf_elf_begin'"

+         # Also eu-readelf now takes advantage of dwelf_elf_begin() to directly read compressed ELF files.

+         for koxz in $(find /usr/lib/modules/ | fgrep '.ko.xz' | shuf -n $KOXZS_TO_TEST); do

+             rlRun "eu-readelf -n $koxz"

+         done

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

+ #   Description: SHT_X86_64_UNWIND-section-not-recognized

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     SHT_X86_64_UNWIND-section-not-recognized" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

+ Description: SHT_X86_64_UNWIND-section-not-recognized

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils doesn't recognize gold linker SHT_X86_64_UNWIND section

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

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

+ summary: SHT_X86_64_UNWIND-section-not-recognized

+ description: |

+     Bug summary: elfutils doesn't recognize gold linker SHT_X86_64_UNWIND section

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

+ extra-task: /tools/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

@@ -0,0 +1,39 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/SHT_X86_64_UNWIND-section-not-recognized

+ #   Description: SHT_X86_64_UNWIND-section-not-recognized

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	set -o pipefail

+ 	rlRun "eu-readelf -S m.o | fgrep .eh_frame | fgrep X86_64_UNWIND"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,63 @@

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

+ #

+ #   Makefile of /tools/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

+ #   Description: abrt-faf-elfutils-IO-default-xsputn

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2015 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/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE eu-readelf-n-crash.core.xz

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     abrt-faf-elfutils-IO-default-xsputn" >> $(METADATA)

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

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

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

+ 	@echo "Requires:        elfutils xz" >> $(METADATA)

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

+ Description: abrt-faf-elfutils-IO-default-xsputn

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: [abrt] [faf] elfutils: _IO_default_xsputn(): /usr/bin/eu-readelf killed by 11

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

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

+ summary: abrt-faf-elfutils-IO-default-xsputn

+ description: |

+     Bug summary: [abrt] [faf] elfutils: _IO_default_xsputn(): /usr/bin/eu-readelf killed by 11

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - xz

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

+ extra-task: /tools/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

@@ -0,0 +1,48 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/abrt-faf-elfutils-IO-default-xsputn

+ #   Description: abrt-faf-elfutils-IO-default-xsputn

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

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

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlRun "TMPD=$(mktemp -d)"

+         rlRun "cp eu-readelf-n-crash.core.xz $TMPD/"

+         rlRun "pushd $TMPD"

+         rlRun "unxz eu-readelf-n-crash.core.xz"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "eu-readelf -n ./eu-readelf-n-crash.core"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TMPD"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/add-ppc64-fallback-unwinder

+ #   Description: add-ppc64-fallback-unwinder

+ #   Author: Martin Cermak <mcermak@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=/tools/elfutils/Regression/add-ppc64-fallback-unwinder

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 output.ref

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     add-ppc64-fallback-unwinder" >> $(METADATA)

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

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

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/add-ppc64-fallback-unwinder

+ Description: add-ppc64-fallback-unwinder

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: Add ppc64 fallback unwinder to elfutils libdw

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

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

+ summary: add-ppc64-fallback-unwinder

+ description: |

+     Bug summary: Add ppc64 fallback unwinder to elfutils libdw

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - bzip2

+ duration: 10m

+ extra-summary: /tools/elfutils/Regression/add-ppc64-fallback-unwinder

+ extra-task: /tools/elfutils/Regression/add-ppc64-fallback-unwinder

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

+ PID 23727 - core

+ TID 23728:

+ #0  0x00000000100104bc raise

+ #1  0x0000000010002a1c sigusr2

+ #2  0x0000000010002a1c sigusr2

+ #3  0x0000000010002b38 stdarg

+ #4  0x0000000010002bc4 backtracegen

+ #5  0x0000000010002bf0 start

+ #6  0x0000000010004c28 start_thread

+ eu-stack: dwfl_thread_getframes tid 23728 at 0x10004c27 in /root/mjw/elfutils/tests/backtrace.ppc64le.fp.exec: (null)

+ TID 23727:

+ #0  0x0000000010006034 pthread_join

+ #1  0x00000000100025bc main

+ #2  0x00000000100025bc main

+ #3  0x00000000100123c4 generic_start_main

+ #4  0x0000000010012570 __libc_start_main

+ eu-stack: dwfl_thread_getframes tid 23727 at 0x1001256f in /root/mjw/elfutils/tests/backtrace.ppc64le.fp.exec: No DWARF information found

@@ -0,0 +1,55 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/add-ppc64-fallback-unwinder

+ #   Description: add-ppc64-fallback-unwinder

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TEMPD=\$(mktemp -d)"

+         rlRun "cp backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 output.ref $TEMPD"

+         rlRun "pushd $TEMPD"

+         rlRun "bunzip2 backtrace.ppc64le.fp.core.bz2"

+         rlRun "bunzip2 backtrace.ppc64le.fp.exec.bz2"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "eu-stack --exec backtrace.ppc64le.fp.exec --core backtrace.ppc64le.fp.core |& tee output.txt"

+         rlRun "grep '^#' output.ref > output.ref.filtered"

+         rlRun "grep '^#' output.txt > output.txt.filtered"

+         rlRun "diff output.txt.filtered output.ref.filtered"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TEMPD"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/api-break-in-libasm-h

+ #   Description: api-break-in-libasm-h

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2020 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/elfutils/Regression/api-break-in-libasm-h

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE test.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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     api-break-in-libasm-h" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils-devel" >> $(METADATA)

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/api-break-in-libasm-h

+ Description: api-break-in-libasm-h

+ Author: Martin Cermak <mcermak@redhat.com>

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

+ summary: api-break-in-libasm-h

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils-devel

+ - gcc

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/api-break-in-libasm-h

+ extra-task: /tools/elfutils/Regression/api-break-in-libasm-h

@@ -0,0 +1,39 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/api-break-in-libasm-h

+ #   Description: api-break-in-libasm-h

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2020 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         rlRun "test -f /usr/include/elfutils/libasm.h"

+         rlRun "gcc -I/usr/include/elfutils -c test.c"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,6 @@

+ #include <libelf.h>

+ #include <gelf.h>

+ #include <libasm.h>

+ 

+ 

+ 

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

+ #   Description: Test for BZ#1059897 (Support 64-bit /SYM64/ symbol table)

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2014 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/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Vaclav Kadlcik <vkadlcik@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#1059897 (Support 64-bit /SYM64/ symbol table)" >> $(METADATA)

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

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,12 @@

+ PURPOSE of /tools/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

+ Description: Test for BZ#1059897 (Support 64-bit /SYM64/ symbol table)

+ Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ Bug summary: Support 64-bit /SYM64/ symbol table

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

+ 

+ Verify that a 64-bit symbol table produced on s390x is readable by elfutils

+ tools. The test is based on Ed Santiago's examples in Bugzilla; a test file

+ (libantlr.a) is taken from antlr-C++-2.7.7-30.el7.s390x.rpm. Mark Wielaard

+ mentioned another test included in the upstream; it gets processed within

+ ../../testsuite (which runs the complete upstream testsuite) so its omission

+ here is intentional.

@@ -0,0 +1,23 @@

+ summary: Test for BZ#1059897 (Support 64-bit /SYM64/ symbol table)

+ description: |

+     Bug summary: Support 64-bit /SYM64/ symbol table

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

+ 

+     Verify that a 64-bit symbol table produced on s390x is readable by elfutils

+     tools. The test is based on Ed Santiago's examples in Bugzilla; a test file

+     (libantlr.a) is taken from antlr-C++-2.7.7-30.el7.s390x.rpm. Mark Wielaard

+     mentioned another test included in the upstream; it gets processed within

+     ../../testsuite (which runs the complete upstream testsuite) so its omission

+     here is intentional.

+ contact:

+ - Vaclav Kadlcik <vkadlcik@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - bzip2

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

+ extra-task: /tools/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

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

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz1059897-Support-64-bit-SYM64-symbol-table

+ #   Description: Test for BZ#1059897 (Support 64-bit /SYM64/ symbol table)

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2014 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="elfutils"

+ 

+ TEST_ARCHIVE_1='libantlr.a' # see PURPOSE & Bugzilla

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

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

+         rlRun "cp ${TEST_ARCHIVE_1}.bz2 $TmpDir" 0 "Copying test files"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+ 

+         rlRun "bunzip2 ${TEST_ARCHIVE_1}.bz2"

+         rlAssertExists "$TEST_ARCHIVE_1"

+ 

+         rlRun -s "eu-ar t $TEST_ARCHIVE_1" 0 "Checking eu-ar runs"

+         rlAssertExists "$rlRun_LOG"

+         rlAssertGrep '^/SYM64/$' "$rlRun_LOG"

+         rlAssertGrep '^ANTLRUtil\.o$' "$rlRun_LOG"

+ 

+         rlRun -s "eu-readelf -a $TEST_ARCHIVE_1" 0 "Checking eu-readelf runs"

+         rlAssertExists "$rlRun_LOG"

+         rlAssertGrep '^ELF Header:$' "$rlRun_LOG"

+ 

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

+ #   Description: Test for BZ#1371517 (eu-stack killed by SIGABRT processing gcore)

+ #   Author: Martin Cermak <mcermak@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=/tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#1371517 (eu-stack killed by SIGABRT processing gcore)" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

+ Description: Test for BZ#1371517 (eu-stack killed by SIGABRT processing gcore)

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: eu-stack killed by SIGABRT processing gcore created core file

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

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

+ summary: Test for BZ#1371517 (eu-stack killed by SIGABRT processing gcore)

+ description: |

+     Bug summary: eu-stack killed by SIGABRT processing gcore created core file

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - gdb

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

+ extra-task: /tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

@@ -0,0 +1,72 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore

+ #   Description: Test for BZ#1371517 (eu-stack killed by SIGABRT processing gcore)

+ #   Author: Martin Cermak <mcermak@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

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlRun "rpm -q elfutils"

+         rlRun "rpm -q gdb"

+         rlRun "TMPD=\$(mktemp -d)"

+         rlRun "pushd $TMPD"

+     rlPhaseEnd

+ 

+     rlPhaseStart FAIL "Build an unstripped binary"

+ 	# ... so that we don't need to rely on the infra providing us with

+ 	# a (coreutils-) debuginfo package.

+ 	echo -e "#include <unistd.h>\nint main () { sleep(100); return 0; }" | gcc -g -xc -o sleep100 -

+ 	rlRun "file sleep100 | fgrep 'not stripped'"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         ./sleep100 &

+         SLEEP_PID=$!

+         rlRun "gcore $SLEEP_PID"

+         # On some arches, such as aarch64, or s390x, eu-stack doesn't end at some

+         # reasonable point, when printing the trace, and goes across main, to

+         # __libc_start_main and even higher and then finally complains about

+         # "no matching address range".  But we don't want to be so strict to check

+         # for this right now.  Mark Wielaard says it is okay, so I trust him ...

+         # Following assert fails when we get SEGV, which would be bz1371517, which

+         # reproduces e.g. on f25 using elfutils-0.166-2.fc25, or on rhel-7.3

+         # using elfutils-0.166-2.el7.

+         rlRun "eu-stack --executable=./sleep100 --core=core.$SLEEP_PID > output.txt" 0,1

+         # Print the output.  Yeah, this could be done using tee or something in

+         # the above line and play games with exitcodes within a pipe chain, but

+         # this actually is https://en.wikipedia.org/wiki/KISS_principle :)

+         rlRun "cat output.txt"

+         # ... we do want to check at least that "main" was listed in the trace.

+         rlRun "awk {'print \$3'} output.txt | grep ^main$"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TMPD"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz1717349-vaguely-related-SEGV

+ #   Description: bz1717349-vaguely-related-SEGV

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Regression/bz1717349-vaguely-related-SEGV

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     bz1717349-vaguely-related-SEGV" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz1717349-vaguely-related-SEGV

+ Description: bz1717349-vaguely-related-SEGV

+ Author: Martin Cermak <mcermak@redhat.com>

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

+ summary: bz1717349-vaguely-related-SEGV

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/bz1717349-vaguely-related-SEGV

+ extra-task: /tools/elfutils/Regression/bz1717349-vaguely-related-SEGV

@@ -0,0 +1,42 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz1717349-vaguely-related-SEGV

+ #   Description: bz1717349-vaguely-related-SEGV

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         # This works with base rhel eu-strip, as well as with various SCL versions of it.  Convenience :)

+         rlRun "which eu-strip"

+         rlRun "rpm -qf `which eu-strip`"

+         # Test: SEGV is considered a FAIL (reproduces with elfutils-0.176-4.el8), whereas fixed version exists with 0)

+         rlRun "eu-strip --remove-comment --reloc-debug-sections -f qat_c3xxx.ko.debug qat_c3xxx.ko"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

+ # Makefile - bz447416-segfaults - Bugzilla(s) 447416

+ # Author: Petr Muller <pmuller@redhat.com>

+ # Location: /tools/elfutils/Regression/bz447416-segfaults/Makefile

+ 

+ # Description: Tests various ELFs on various utils, looking for segfaults

+ 

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

+  

+ 

+ 

+ TOPLEVEL_NAMESPACE=/tools

+ PACKAGE_NAME=elfutils

+ RELATIVE_PATH=Regression/bz447416-segfaults

+ 

+ export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ testcases.tar.gz:

+ 	tar cfz testcases.tar.gz binaries/*

+ 

+ FILES=$(METADATA) runtest.sh Makefile testcases.tar.gz testprog.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

+ 	@touch $(METADATA)

+ 	@echo "Owner:        Petr Muller <pmuller@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:  Tests various ELFs on various utils, looking for segfaults" >> $(METADATA)

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,10 @@

+ Test Name: bz447416-segfaults - Bugzilla(s) 447416

+ Author: Petr Muller <pmuller@redhat.com>

+ Location: /tools/elfutils/Regression/bz447416-segfaults

+ 

+ Short Description: Tests various ELFs on various utils, looking for segfaults

+ 

+ 

+ Long Description:

+ 

+ Tests various ELFs on various utils, looking for segfaults

@@ -0,0 +1,24 @@

+ summary: Tests various ELFs on various utils, looking for segfaults

+ description: |

+     Test Name: bz447416-segfaults - Bugzilla(s) 447416

+     Author: Petr Muller <pmuller@redhat.com>

+     Location: /tools/elfutils/Regression/bz447416-segfaults

+ 

+     Short Description: Tests various ELFs on various utils, looking for segfaults

+ 

+ 

+     Long Description:

+ 

+     Tests various ELFs on various utils, looking for segfaults

+ contact:

+ - Petr Muller <pmuller@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - gcc

+ - elfutils

+ duration: 20m

+ extra-summary: /tools/elfutils/Regression/bz447416-segfaults

+ extra-task: /tools/elfutils/Regression/bz447416-segfaults

@@ -0,0 +1,183 @@

+ #!/bin/bash

+ # runtest.sh - bz447416-segfaults - Bugzilla(s) 447416

+ # Author: Petr Muller <pmuller@redhat.com>

+ # Location: /tools/elfutils/Regression/bz447416-segfaults/runtest.sh

+ 

+ # Description: Tests various ELFs on various utils, looking for segfaults

+ 

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

+ 

+ test_binary(){

+   command="$1"

+   args="$2"

+   expected="$3"

+   comment="$4"

+ 

+   echo $command >> $TESTED

+   rlRun "$command $args > /dev/null" $expected "$comment"

+   excode=$?

+   if [ $excode -gt 127 ]

+   then

+     rlLog "Unusual exit code: $excode"

+   fi

+ }

+ 

+ PACKAGE=elfutils

+ 

+ . /usr/share/beakerlib/beakerlib.sh

+ 

+ rlJournalStart

+ 

+ rlPhaseStartSetup "Setting up testcases"

+   tar xfz testcases.tar.gz

+   rlAssertExists binaries

+   export TESTED=`mktemp`

+   export TOBE=`mktemp`

+ 

+   rlRun "gcc -o binaries/testprog -g testprog.c"

+ 

+   for file in $(rpm -ql `rpm -qa | grep elfutils` | grep 'bin' | grep -v '\.')

+   do

+     NAME=`basename $file`

+     if [ "$NAME" != "bin" ]

+     then

+       basename $file >> $TOBE

+     fi

+   done

+   sort $TOBE -o $TOBE

+ rlPhaseEnd

+ 

+ pushd binaries &> /dev/null

+ for arch in i386  ia64 ppc ppc64 s390 s390x x86_64

+ do

+   rlPhaseStartTest "Testing $arch binary inputs"

+     if rlIsRHEL 5 || rlIsFedora || rlIsRHEL 6 || rlIsRHEL 7 || rlIsRHEL 8 || rlIsRHEL 9

+     then

+       test_binary "eu-elfcmp" "eu-readelf-$arch eu-readelf-$arch" 0 "Testing eu-elfcmp on identical files"

+     fi

+ 

+     test_binary "eu-elflint" "eu-readelf-$arch" 0,1 "Testing elflint without --gnu-ld"

+     test_binary "eu-elflint" "eu-readelf-$arch -q --gnu-ld" 0,1 "Testing elflint with --gnu-ld"

+     test_binary "eu-nm" "eu-readelf-$arch" 1 "Testing nm"

+     test_binary "eu-nm" "-D eu-readelf-$arch" 0 "Testing nm -D"

+ 

+     if rlIsRHEL 5 || rlIsFedora || rlIsRHEL 6 || rlIsRHEL 7 || rlIsRHEL 8 || rlIsRHEL 9

+     then

+       test_binary "eu-objdump" "-ds eu-readelf-$arch" 0,1 "Testing objdump -ds"

+     fi

+ 

+     options="-A0 -d0 -h0 -I0 -l0 -n0 -r0 -s0 -S0 -V0 -w1"

+     options="-a0 $options"

+ 

+     if rlIsRHEL 5 || rlIsFedora || rlIsRHEL 6 || rlIsRHEL 7

+     then

+       options="$options -c1 -p0"

+     fi

+ 

+     for option in $options

+     do

+       opt=${option:0:2}

+       exp=${option:2}

+       test_binary "eu-readelf" "$opt eu-readelf-$arch" $exp "Testing readelf $opt"

+     done

+     test_binary "eu-size" "eu-readelf-$arch" 0 "Testing eu-size"

+     if rlIsRHEL 5 || rlIsFedora || rlIsRHEL 6 || rlIsRHEL 7 || rlIsRHEL 8 || rlIsRHEL 9

+     then

+       test_binary "eu-strings" "eu-readelf-$arch" 0 "Testing eu-strings"

+     fi

+     test_binary "eu-strip" "eu-readelf-$arch" 0 "Testing eu-strip"

+ 

+     test_binary "eu-ar" "rcs test.a eu-readelf-$arch" 0 "Testing eu-ar - creating an archive"

+     test_binary "eu-ar" "pv test.a" 0 "Testing eu-ar - print the list of modules"

+     test_binary "eu-ar" "tv test.a" 0 "Testing eu-ar - print the file table"

+ 

+     test_binary "eu-ranlib" "test.a" 0 "Testing eu-ranlib"

+ 

+     # This test should be done better - eu-make-debug-archive should do real things

+     test_binary "eu-make-debug-archive" "--kernel test.a" 0,1 "Testing eu-make-debug-archive"

+ 

+     # This test should be done better - eu-findtextrel should do real things

+     test_binary "eu-findtextrel" "eu-readelf-$arch" 0,1 "Testing eu-findtextrel"

+ 

+     test_binary "eu-addr2line" "stderr -A -f -e eu-readelf-$arch" 0 "Testing eu-addr2line"

+ 

+ 	rlRun "objcopy --only-keep-debug testprog testprog.debuginfo"

+ 	rlRun "eu-strip --strip-debug -o testprog.stripped testprog"

+     test_binary "eu-unstrip" "-o testprog.restored testprog.stripped testprog.debuginfo" 0 "Testing eu-unstrip"

+ 

+   rlPhaseEnd

+ done

+ 

+ rlPhaseStart FAIL "eu-stack specific asserts (in elfutils since 0.158)"

+     if grep -q '^eu-stack$' $TOBE

+     then

+         test_binary "eu-stack" "-p 1" 0,1 "Testing eu-stack"

+     fi

+ rlPhaseEnd

+ 

+ rlPhaseStart FAIL "eu-elfcompress specific asserts (in elfutils since 0.165)"

+     # eu-elfcompress

+     if grep -q '^eu-elfcompress$' $TOBE

+     then

+         for i in zlib zlib-gabi gnu zlib-gnu; do

+             test_binary "eu-elfcompress" "-o testprog.compressed.$i -t $i testprog" 0 "Testing eu-elfcompress ($i)"

+             rlRun "eu-elfcmp testprog testprog.compressed.$i"

+             test_binary "eu-elfcompress" "-o testprog.uncompressed -t none testprog" 0 "Testing eu-elfcompress (none)"

+             rlRun "eu-elfcmp testprog testprog.uncompressed"

+         done

+     fi

+ rlPhaseEnd

+ 

+ if grep -q '^eu-elfclassify$' $TOBE; then

+ rlPhaseStart FAIL "Test eu-elfclassify (in elfutils since 0.178)"

+     for copt in --elf --elf-file --executable --loadable --program --unstripped; do

+         test_binary "eu-elfclassify" "$copt testprog" 0 "Testing eu-elfclassify $copt"

+     done

+     for copt in --core --debug-only --elf-archive --library --linux-kernel-module --shared; do

+         test_binary "eu-elfclassify" "$copt testprog" 1 "Testing eu-elfclassify $copt"

+     done

+ rlPhaseEnd

+ fi

+ 

+ if grep -q '^debuginfod$' $TOBE; then

+ rlPhaseStart FAIL "Test debuginfod (in elfutils since 0.178)"

+     test_binary debuginfod "--help" 0 "Test debuginfod for a trivial segv"

+ rlPhaseEnd

+ fi

+ 

+ if grep -q '^debuginfod-find$' $TOBE; then

+ rlPhaseStart FAIL "Test debuginfod-find (in elfutils since 0.178)"

+     test_binary "debuginfod-find" "--help" 0 "Test debuginfod-find for a trivial segv"

+ rlPhaseEnd

+ fi

+ 

+ popd &> /dev/null

+ 

+ rlPhaseStartTest "Testing if complete elfutils were tested"

+   sort -u $TESTED -o $TESTED

+   for file in `cat $TOBE`

+   do

+     rlLog "Checking if $file was tested"

+     rlAssertGrep $file $TESTED

+   done

+ rlPhaseEnd

+ 

+ rlPhaseStartCleanup

+   rm -rf binaries $TOBE $TESTED

+   rm -f test.a testprog testprog.debuginfo testprog.stripped testprog.restored

+   rlAssertNotExists binaries

+ rlPhaseEnd

+ 

+ rlJournalPrintText

+ rlJournalEnd

empty or binary file added
@@ -0,0 +1,21 @@

+ #include <stdlib.h>

+ #include <stdio.h>

+ 

+ int addfunc(int a, int b)

+ {

+ 	return a + b;

+ }

+ 

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

+ {

+ 	int p, q, res;

+ 	

+ 	scanf("%i", &p);

+ 	scanf("%i", &q);

+ 	

+ 	res = addfunc(p, q);

+ 	

+ 	printf("%i\n", res);

+ 	

+ 	return 0;

+ }

@@ -0,0 +1,74 @@

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

+ #   Description: Tests few cases where elfutils-prelink interaction caused problems manifesting in systemtap

+ #   Author: Petr Muller <pmuller@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/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

+ 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:           Petr Muller <pmuller@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Tests few cases where elfutils-prelink interaction caused problems manifesting in systemtap" >> $(METADATA)

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

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

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

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

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

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

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

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

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

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

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

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

+ 	@echo "Requires:			  coreutils-debuginfo" >> $(METADATA)

+ 	@echo "Requires:			  findutils-debuginfo" >> $(METADATA)

+ 	@echo "Requires:				kernel-devel" >> $(METADATA)

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

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

+ 	@echo "Requires:				yum-utils" >> $(METADATA)

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

+ Description: Tests few cases where elfutils-prelink interaction caused problems manifesting in systemtap

+ Author: Petr Muller <pmuller@redhat.com>

@@ -0,0 +1,21 @@

+ summary: Tests few cases where elfutils-prelink interaction caused problems manifesting

+     in systemtap

+ description: ''

+ contact:

+ - Petr Muller <pmuller@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - gcc-debuginfo

+ - coreutils-debuginfo

+ - findutils-debuginfo

+ - kernel-devel

+ - systemtap

+ - elfutils

+ - yum-utils

+ duration: 20m

+ extra-summary: /tools/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

+ extra-task: /tools/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

@@ -0,0 +1,74 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz652858-elfutils-prelink-stap-interaction

+ #   Description: Tests few cases where elfutils-prelink interaction caused problems manifesting in systemtap

+ #   Author: Petr Muller <pmuller@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 rhts environment

+ . /usr/share/beakerlib/beakerlib.sh

+ 

+ PACKAGE="$( rpm -qf --queryformat='%{name}\n' `which eu-strip` )"

+ 

+ # work around https://github.com/psss/tmt/issues/624

+ dnf debuginfo-install -y coreutils findutils gcc gcc-c++ libstdc++ kernel-devel ||:

+ stap-prep ||:

+ export DEBUGINFOD_URLS="https://debuginfod.elfutils.org/ $DEBUGINFOD_URLS"

+ 

+ 

+ rlJournalStart

+   rlPhaseStartSetup

+     rlAssertRpm "coreutils-debuginfo"

+     rlAssertRpm "findutils-debuginfo"

+     rlAssertRpm "gcc-debuginfo"

+ 

+     LIBSTDCPP="$( ldd `which stap` | awk '/libstdc++/ {print $3}' )"

+ 

+     rlRun "touch /var/lib/misc/prelink.force"

+     test -e /etc/cron.daily/prelink && \

+         rlRun "time /etc/cron.daily/prelink"

+   rlPhaseEnd

+ 

+   rlPhaseStartTest

+     rlLog "Running libstdc++ testcase"

+     # this needs baseos gcc-debuginfo. DTS-systemtap is linked against it as well as baseos systemtap. 

+     # On rhel7 devtoolset-3-gcc-debuginfo collides with gcc-debuginfo (not on rhel6)

+     stap -e "probe process("'"'"$LIBSTDCPP"'"'').function("operator new") { next }' -c 'stap -V' -v 2>&1 | tee output

+     rlAssertGrep "System[Tt]ap translator" output

+ 

+     rlLog "Running /bin/env testcase"

+     stap -e 'probe process("/bin/env").function("main") { println(pp()) }' -c '/bin/env true' -v | tee output

+     rlAssertGrep "/bin/env" output

+ 

+ 

+     rlLog "Running `which find` testcase"

+     stap -e 'probe process("'"`which find`"'").function("main") { println(pp()) }' -c "`which find` /dev/null" -v | tee output

+     rlAssertGrep "`which find`" output

+   rlPhaseEnd

+ 

+   rlPhaseStartCleanup

+     rlRun "rm -f output"

+   rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,63 @@

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

+ #   Description: Test for BZ#806474 (eu-unstrip unwilling to reassembled corrupted)

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2014 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/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Vaclav Kadlcik <vkadlcik@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#806474 (eu-unstrip unwilling to reassembled corrupted)" >> $(METADATA)

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

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

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

+ 	@echo "Requires:        elfutils bzip2" >> $(METADATA)

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,9 @@

+ PURPOSE of /tools/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

+ Description: Test for BZ#806474 (eu-unstrip unwilling to reassembled corrupted)

+ Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ Bug summary: eu-unstrip unwilling to reassembled corrupted separate debuginfo

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

+ 

+ Make sure eu-unstrip can merge (when forced) a stripped binary and a separate

+ debuginfo in spite of the debuginfo was produced by a buggy version of binutils

+ (see BZ#698005). The test is based on Mark Wielaard's suggestion in Bugzilla.

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

+ summary: Test for BZ#806474 (eu-unstrip unwilling to reassembled corrupted)

+ description: |

+     Bug summary: eu-unstrip unwilling to reassembled corrupted separate debuginfo

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

+ 

+     Make sure eu-unstrip can merge (when forced) a stripped binary and a separate

+     debuginfo in spite of the debuginfo was produced by a buggy version of binutils

+     (see BZ#698005). The test is based on Mark Wielaard's suggestion in Bugzilla.

+ contact:

+ - Vaclav Kadlcik <vkadlcik@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - bzip2

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

+ extra-task: /tools/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

@@ -0,0 +1,74 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted

+ #   Description: Test for BZ#806474 (eu-unstrip unwilling to reassembled corrupted)

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2014 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="elfutils"

+ 

+ TEST_STRIPPED='ld' # see PURPOSE, BZ#806474, and 698005

+ TEST_DEBUGIFO='ld.debug' # ditto

+ TEST_MERGED='ld-debug'

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

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

+         rlRun "cp ${TEST_STRIPPED}.bz2 ${TEST_DEBUGIFO}.bz2 $TmpDir" 0 "Copying test files"

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+ 

+         rlRun "bunzip2 ${TEST_STRIPPED}.bz2" 0

+         rlRun "bunzip2 ${TEST_DEBUGIFO}.bz2" 0

+         rlAssertExists "$TEST_STRIPPED"

+         rlAssertExists "$TEST_DEBUGIFO"

+ 

+         rlRun -t -s "eu-unstrip -o $TEST_MERGED $TEST_STRIPPED $TEST_DEBUGIFO" 1 'unstrip with corrupted debuginfo'

+         rlAssertNotExists "$TEST_MERGED"

+         rlAssertGrep '^STDERR:.*ELF header identification.*different, use --force' "$rlRun_LOG"

+ 

+         rlRun -t -s "eu-unstrip --force -o $TEST_MERGED $TEST_STRIPPED $TEST_DEBUGIFO" 0 'Forced unstrip with corrupted debuginfo'

+         rlAssertExists "$TEST_MERGED"

+         rlAssertGrep '^STDERR:.*WARNING:.*ELF header identification.*different' "$rlRun_LOG"

+ 

+         rlRun -t -s "file $TEST_MERGED" 0 'Detecting type of merged file'

+         rlAssertGrep '^STDOUT:.*not stripped$' "$rlRun_LOG"

+ 

+         rlRun -s "eu-objdump -s $TEST_MERGED" 0 'Running objdump on merged file'

+         rlAssertGrep '^Contents of section .debug_info:' "$rlRun_LOG"

+         rlAssertGrep '^Contents of section .debug_line:' "$rlRun_LOG"

+ 

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

+ #   Description: Test for BZ#917874 ([RHDT] Assertion failure in eu-addr2line)

+ #   Author: Dagmar Prokopova <dprokopo@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/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Dagmar Prokopova <dprokopo@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#917874 ([RHDT] Assertion failure in eu-addr2line)" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

+ Description: Test for BZ#917874 ([RHDT] Assertion failure in eu-addr2line)

+ Author: Dagmar Prokopova <dprokopo@redhat.com>

+ Bug summary: [RHDT] Assertion failure in eu-addr2line

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

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

+ summary: Test for BZ#917874 ([RHDT] Assertion failure in eu-addr2line)

+ description: |

+     Bug summary: [RHDT] Assertion failure in eu-addr2line

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

+ contact:

+ - Dagmar Prokopova <dprokopo@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

+ extra-task: /tools/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

@@ -0,0 +1,60 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line

+ #   Description: Test for BZ#917874 ([RHDT] Assertion failure in eu-addr2line)

+ #   Author: Dagmar Prokopova <dprokopo@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

+ 

+ # This was fixed in devtoolset-2-elfutils-0.155-6.

+ 

+ PACKAGES=(elfutils)

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         for p in "${PACKAGES[@]}"; do

+             rlAssertRpm "$p" || yum -y install "$p"

+         done; unset p

+ 

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

+ 

+         # We need the reproducer.

+         cp -v a.out $TmpDir

+ 

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         # This should succeed without assertion fail.

+         rlRun "eu-addr2line -e a.out 0x400589" 0

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

+ #   Description: Test for BZ#927626 ([RHDT] Stack overflow in dwarf_getsrclines)

+ #   Author: Dagmar Prokopova <dprokopo@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/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Dagmar Prokopova <dprokopo@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#927626 ([RHDT] Stack overflow in dwarf_getsrclines)" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

+ Description: Test for BZ#927626 ([RHDT] Stack overflow in dwarf_getsrclines)

+ Author: Dagmar Prokopova <dprokopo@redhat.com>

+ Bug summary: [RHDT] Stack overflow in dwarf_getsrclines

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

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

+ summary: Test for BZ#927626 ([RHDT] Stack overflow in dwarf_getsrclines)

+ description: |

+     Bug summary: [RHDT] Stack overflow in dwarf_getsrclines

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

+ contact:

+ - Dagmar Prokopova <dprokopo@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - bzip2

+ - gcc

+ duration: 30m

+ extra-summary: /tools/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

+ extra-task: /tools/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

@@ -0,0 +1,56 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines

+ #   Description: Test for BZ#927626 ([RHDT] Stack overflow in dwarf_getsrclines)

+ #   Author: Dagmar Prokopova <dprokopo@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

+ 

+ # This was fixed in elfutils-0.155-7.

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

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

+         # We need the reproducer.

+         cp -v vpoolengineUS.bz2 $TmpDir

+         rlRun "pushd $TmpDir"

+         rlRun "bunzip2 vpoolengineUS.bz2"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         # No segfault should appear.

+         rlRun "eu-addr2line -e vpoolengineUS 0x6682f7" 0

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

+ #   Description: Test for BZ#967130 ([RHDT] eu-unstrip -M abort on socket line)

+ #   Author: Dagmar Prokopova <dprokopo@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/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Dagmar Prokopova <dprokopo@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#967130 ([RHDT] eu-unstrip -M abort on socket line)" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

+ Description: Test for BZ#967130 ([RHDT] eu-unstrip -M abort on socket line)

+ Author: Dagmar Prokopova <dprokopo@redhat.com>

+ Bug summary: [RHDT] eu-unstrip -M abort on socket: line

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

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

+ summary: Test for BZ#967130 ([RHDT] eu-unstrip -M abort on socket line)

+ description: |

+     Bug summary: [RHDT] eu-unstrip -M abort on socket: line

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

+ contact:

+ - Dagmar Prokopova <dprokopo@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

+ extra-task: /tools/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

@@ -0,0 +1,82 @@

+ 00400000-024aa000 r-xp 00000000 08:02 159659                             /opt/MessageRouter/bin/msgrouter_dbg

+ 026aa000-026b2000 rwxp 020aa000 08:02 159659                             /opt/MessageRouter/bin/msgrouter_dbg

+ 026b2000-026bf000 rwxp 00000000 00:00 0

+ 0335a000-03e6f000 rwxp 00000000 00:00 0                                  [heap]

+ 2b7b2d6fa000-2b7b2d71a000 r-xp 00000000 08:02 128802                     /lib64/ld-2.12.so

+ 2b7b2d71a000-2b7b2d89c000 rwxp 00000000 00:00 0

+ 2b7b2d919000-2b7b2d91a000 r-xp 0001f000 08:02 128802                     /lib64/ld-2.12.so

+ 2b7b2d91a000-2b7b2d91b000 rwxp 00020000 08:02 128802                     /lib64/ld-2.12.so

+ 2b7b2d91b000-2b7b2d91c000 rwxp 00000000 00:00 0

+ 2b7b2d91c000-2b7b2d933000 r-xp 00000000 08:02 128833                     /lib64/libpthread-2.12.so

+ 2b7b2d933000-2b7b2db32000 ---p 00017000 08:02 128833                     /lib64/libpthread-2.12.so

+ 2b7b2db32000-2b7b2db33000 r-xp 00016000 08:02 128833                     /lib64/libpthread-2.12.so

+ 2b7b2db33000-2b7b2db34000 rwxp 00017000 08:02 128833                     /lib64/libpthread-2.12.so

+ 2b7b2db34000-2b7b2db39000 rwxp 00000000 00:00 0

+ 2b7b2db39000-2b7b2db40000 r-xp 00000000 08:02 128837                     /lib64/librt-2.12.so

+ 2b7b2db40000-2b7b2dd3f000 ---p 00007000 08:02 128837                     /lib64/librt-2.12.so

+ 2b7b2dd3f000-2b7b2dd40000 r-xp 00006000 08:02 128837                     /lib64/librt-2.12.so

+ 2b7b2dd40000-2b7b2dd41000 rwxp 00007000 08:02 128837                     /lib64/librt-2.12.so

+ 2b7b2dd41000-2b7b2dd43000 r-xp 00000000 08:02 128815                     /lib64/libdl-2.12.so

+ 2b7b2dd43000-2b7b2df43000 ---p 00002000 08:02 128815                     /lib64/libdl-2.12.so

+ 2b7b2df43000-2b7b2df44000 r-xp 00002000 08:02 128815                     /lib64/libdl-2.12.so

+ 2b7b2df44000-2b7b2df45000 rwxp 00003000 08:02 128815                     /lib64/libdl-2.12.so

+ 2b7b2df45000-2b7b2e032000 r-xp 00000000 08:02 276647                     /usr/lib64/libboost_regex.so.5

+ 2b7b2e032000-2b7b2e232000 ---p 000ed000 08:02 276647                     /usr/lib64/libboost_regex.so.5

+ 2b7b2e232000-2b7b2e239000 rwxp 000ed000 08:02 276647                     /usr/lib64/libboost_regex.so.5

+ 2b7b2e239000-2b7b2e23a000 rwxp 00000000 00:00 0

+ 2b7b2e23a000-2b7b2e322000 r-xp 00000000 08:02 260385                     /usr/lib64/libstdc++.so.6.0.13

+ 2b7b2e322000-2b7b2e522000 ---p 000e8000 08:02 260385                     /usr/lib64/libstdc++.so.6.0.13

+ 2b7b2e522000-2b7b2e529000 r-xp 000e8000 08:02 260385                     /usr/lib64/libstdc++.so.6.0.13

+ 2b7b2e529000-2b7b2e52b000 rwxp 000ef000 08:02 260385                     /usr/lib64/libstdc++.so.6.0.13

+ 2b7b2e52b000-2b7b2e540000 rwxp 00000000 00:00 0

+ 2b7b2e540000-2b7b2e5c3000 r-xp 00000000 08:02 128817                     /lib64/libm-2.12.so

+ 2b7b2e5c3000-2b7b2e7c2000 ---p 00083000 08:02 128817                     /lib64/libm-2.12.so

+ 2b7b2e7c2000-2b7b2e7c3000 r-xp 00082000 08:02 128817                     /lib64/libm-2.12.so

+ 2b7b2e7c3000-2b7b2e7c4000 rwxp 00083000 08:02 128817                     /lib64/libm-2.12.so

+ 2b7b2e7c4000-2b7b2e7da000 r-xp 00000000 08:02 136724                     /lib64/libgcc_s-4.4.6-20110824.so.1

+ 2b7b2e7da000-2b7b2e9d9000 ---p 00016000 08:02 136724                     /lib64/libgcc_s-4.4.6-20110824.so.1

+ 2b7b2e9d9000-2b7b2e9da000 rwxp 00015000 08:02 136724                     /lib64/libgcc_s-4.4.6-20110824.so.1

+ 2b7b2e9da000-2b7b2e9db000 rwxp 00000000 00:00 0

+ 2b7b2e9db000-2b7b2eb72000 r-xp 00000000 08:02 128809                     /lib64/libc-2.12.so

+ 2b7b2eb72000-2b7b2ed72000 ---p 00197000 08:02 128809                     /lib64/libc-2.12.so

+ 2b7b2ed72000-2b7b2ed76000 r-xp 00197000 08:02 128809                     /lib64/libc-2.12.so

+ 2b7b2ed76000-2b7b2ed77000 rwxp 0019b000 08:02 128809                     /lib64/libc-2.12.so

+ 2b7b2ed77000-2b7b2ed7c000 rwxp 00000000 00:00 0

+ 2b7b2ed7c000-2b7b2eebb000 r-xp 00000000 08:02 276645                     /usr/lib64/libicuuc.so.42.1

+ 2b7b2eebb000-2b7b2f0bb000 ---p 0013f000 08:02 276645                     /usr/lib64/libicuuc.so.42.1

+ 2b7b2f0bb000-2b7b2f0cc000 rwxp 0013f000 08:02 276645                     /usr/lib64/libicuuc.so.42.1

+ 2b7b2f0cc000-2b7b2f0ce000 rwxp 00000000 00:00 0

+ 2b7b2f0ce000-2b7b2f256000 r-xp 00000000 08:02 276635                     /usr/lib64/libicui18n.so.42.1

+ 2b7b2f256000-2b7b2f456000 ---p 00188000 08:02 276635                     /usr/lib64/libicui18n.so.42.1

+ 2b7b2f456000-2b7b2f463000 rwxp 00188000 08:02 276635                     /usr/lib64/libicui18n.so.42.1

+ 2b7b2f463000-2b7b2f465000 rwxp 00000000 00:00 0

+ 2b7b2f465000-2b7b303aa000 r-xp 00000000 08:02 276633                     /usr/lib64/libicudata.so.42.1

+ 2b7b303aa000-2b7b305a9000 ---p 00f45000 08:02 276633                     /usr/lib64/libicudata.so.42.1

+ 2b7b305a9000-2b7b305aa000 rwxp 00f44000 08:02 276633                     /usr/lib64/libicudata.so.42.1

+ 2b7b305aa000-2b7b313f5000 rwxp 00000000 00:00 0

+ 2b7b313f5000-2b7b313f6000 ---p 00000000 00:00 0

+ 2b7b313f6000-2b7b31df6000 rwxp 00000000 00:00 0

+ 2b7b31df6000-2b7b31df7000 ---p 00000000 00:00 0

+ 2b7b31df7000-2b7b327f7000 rwxp 00000000 00:00 0

+ 2b7b34000000-2b7b34021000 rwxp 00000000 00:00 0

+ 2b7b34021000-2b7b38000000 ---p 00000000 00:00 0

+ 2b7b38000000-2b7b38282000 rwxp 00000000 00:00 0

+ 2b7b38282000-2b7b38302000 rwxs 00000000 00:06 493872                     socket:[493872]

+ 2b7b38302000-2b7b38312000 rwxs 00000000 00:06 493872                     socket:[493872]

+ 2b7b38312000-2b7b38b12000 r-xs 00000000 00:06 493872                     socket:[493872]

+ 2b7b38b12000-2b7b38b22000 rwxs 00000000 00:06 493872                     socket:[493872]

+ 2b7b38b22000-2b7b39322000 rwxs 00000000 00:06 493872                     socket:[493872]

+ 2b7b39322000-2b7b39323000 ---p 00000000 00:00 0

+ 2b7b39323000-2b7b39d23000 rwxp 00000000 00:00 0

+ 2b7b3c000000-2b7b3c021000 rwxp 00000000 00:00 0

+ 2b7b3c021000-2b7b40000000 ---p 00000000 00:00 0

+ 2b7b40000000-2b7b40021000 rwxp 00000000 00:00 0

+ 2b7b40021000-2b7b44000000 ---p 00000000 00:00 0

+ 2b7b44010000-2b7b4401c000 r-xp 00000000 08:02 128825                     /lib64/libnss_files-2.12.so

+ 2b7b4401c000-2b7b4421c000 ---p 0000c000 08:02 128825                     /lib64/libnss_files-2.12.so

+ 2b7b4421c000-2b7b4421d000 r-xp 0000c000 08:02 128825                     /lib64/libnss_files-2.12.so

+ 2b7b4421d000-2b7b4421e000 rwxp 0000d000 08:02 128825                     /lib64/libnss_files-2.12.so

+ 2b7b4439f000-2b7b45ea1000 rwxp 00000000 00:00 0

+ 7fff26cf7000-7fff26d0c000 rwxp 00000000 00:00 0                          [stack]

+ 7fff26dff000-7fff26e00000 r-xp 00000000 00:00 0                          [vdso]

+ ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

@@ -0,0 +1,53 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line

+ #   Description: Test for BZ#967130 ([RHDT] eu-unstrip -M abort on socket line)

+ #   Author: Dagmar Prokopova <dprokopo@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

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

+         # We need a reproducer.

+         cp -v proc_maps.txt $TmpDir

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         #No Abort here.

+         rlRun "eu-unstrip -n -M proc_maps.txt " 0

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

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

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

+ #   Description: elfutils-default-yama-scope-scriptlet-failed

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     elfutils-default-yama-scope-scriptlet-failed" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils-default-yama-scope" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

+ Description: elfutils-default-yama-scope-scriptlet-failed

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: warning: %post(elfutils-default-yama-scope-0.170-2.el7.noarch) scriptlet failed, exit status 127

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

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

+ summary: elfutils-default-yama-scope-scriptlet-failed

+ description: |

+     Bug summary: warning: %post(elfutils-default-yama-scope-0.170-2.el7.noarch) scriptlet failed, exit status 127

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils-default-yama-scope

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

+ extra-task: /tools/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

@@ -0,0 +1,44 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/elfutils-default-yama-scope-scriptlet-failed

+ #   Description: elfutils-default-yama-scope-scriptlet-failed

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         if rlIsRHEL 6; then

+             rlLogInfo "RHEL6: Irrelevant env."

+         else

+ 	    rlRun "grep  'warning.*elfutils-default-yama-scope' /var/log/anaconda/packaging.log" 1

+         fi

+ 	# The above record gets generated by anaconda.  The ability of this test to

+ 	# catch the bug depends on how it is run.

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

+ #   Description: elfutils-segmentation-fault-in-elf64-xlatetom-in

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     elfutils-segmentation-fault-in-elf64-xlatetom-in" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

+ Description: elfutils-segmentation-fault-in-elf64-xlatetom-in

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils: segmentation fault in elf64_xlatetom in libelf/elf32_xlatetom.c [rhdts-8]

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

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

+ summary: elfutils-segmentation-fault-in-elf64-xlatetom-in

+ description: |

+     Bug summary: elfutils: segmentation fault in elf64_xlatetom in libelf/elf32_xlatetom.c [rhdts-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

+ extra-task: /tools/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

@@ -0,0 +1,39 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in

+ #   Description: elfutils-segmentation-fault-in-elf64-xlatetom-in

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# failure is 139 - SEGV, 2 is okay

+ 	rlRun "eu-stack --core=POC2" 2

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

+ #   Description: Test for BZ#1724350 (eu-readelf reports machine type is <unknown>)

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#1724350 (eu-readelf reports machine type is <unknown>)" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils linux-firmware" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

+ Description: Test for BZ#1724350 (eu-readelf reports machine type is <unknown>)

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: eu-readelf reports machine type is <unknown> on firmware blobs

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

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

+ summary: Test for BZ#1724350 (eu-readelf reports machine type is <unknown>)

+ description: |

+     Bug summary: eu-readelf reports machine type is <unknown> on firmware blobs

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - linux-firmware

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

+ extra-task: /tools/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

@@ -0,0 +1,50 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/eu-readelf-reports-machine-type-is-unknown

+ #   Description: Test for BZ#1724350 (eu-readelf reports machine type is <unknown>)

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ __showgreenlight ()

+ {

+     rlJournalStart

+     rlPhaseStartTest

+         rlRun "echo \"Irrelevant for $X_SCLS\""

+     rlPhaseEnd

+     rlJournalEnd

+     exit 0

+ }

+ 

+ echo $X_SCLS | fgrep -q gcc-toolset-9 && __showgreenlight

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         rlRun "find /usr/lib/firmware/ -name '*.nffw' | xargs eu-readelf -h | awk '/Machine/ {print \$NF}' | fgrep '<unknown>'" 1

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/eu-strip-generates-empty-output-if

+ #   Description: eu-strip-generates-empty-output-if

+ #   Author: Martin Cermak <mcermak@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=/tools/elfutils/Regression/eu-strip-generates-empty-output-if

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     eu-strip-generates-empty-output-if" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/eu-strip-generates-empty-output-if

+ Description: eu-strip-generates-empty-output-if

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: eu-strip generates empty output if there is nothing to do

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

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

+ summary: eu-strip-generates-empty-output-if

+ description: |

+     Bug summary: eu-strip generates empty output if there is nothing to do

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/eu-strip-generates-empty-output-if

+ extra-task: /tools/elfutils/Regression/eu-strip-generates-empty-output-if

@@ -0,0 +1,52 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/eu-strip-generates-empty-output-if

+ #   Description: eu-strip-generates-empty-output-if

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "tmp=\$(mktemp -d)"

+         rlRun "pushd $tmp"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+ 	rlRun "echo 'int main() { return 1; }' > test.c"

+ 	rlRun "gcc test.c"

+ 	rlRun "eu-strip -g -o test ./a.out"

+ 	rlRun "test $(stat --format='%s' test) -gt 0"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $tmp"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ #   Description: eu-strip-invalid-section-alignment-while

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2016 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/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE testprog.c testprog2.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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     eu-strip-invalid-section-alignment-while" >> $(METADATA)

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

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

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

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

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

+ 	@echo "Requires:        libaio-devel" >> $(METADATA)

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ Description: eu-strip-invalid-section-alignment-while

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: eu-strip: invalid section alignment while stripping debuginfo from executables

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

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

+ summary: eu-strip-invalid-section-alignment-while

+ description: |

+     Bug summary: eu-strip: invalid section alignment while stripping debuginfo from executables

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - gcc

+ - libaio-devel

+ duration: 5m

+ extra-summary: /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ extra-task: /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

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

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ #   Description: eu-strip-invalid-section-alignment-while

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2016 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         for p in gcc eu-strip; do

+             rlRun "which $p"

+             rlRun "rpm -qf $( which $p )"

+         done

+         rlRun "tmp=$(mktemp -d)"

+         rlRun "cp testprog.c testprog2.c $tmp" 

+         rlRun "pushd $tmp"

+     rlPhaseEnd

+ 

+     if rpm -q libaio-devel; then

+         rlPhaseStart FAIL customer-testcase

+             # https://bugzilla.redhat.com/show_bug.cgi?id=1304870

+             rlRun "gcc testprog.c -laio -g -o testprog"

+             rlRun "eu-strip testprog"

+         rlPhaseEnd

+     fi

+ 

+     rlPhaseStart FAIL upstream-testcase

+         rlRun "gcc -g testprog2.c -o testprog2"

+         # Testcase for this fix should at some point reach the upstream and

+         # the rhel package too. After that this QE testcase should be obsoleted.

+         # Please, refer to:

+         # https://lists.fedorahosted.org/archives/list/elfutils-devel@lists.fedorahosted.org/message/OP6AXOW5PF6GPB4KN7XQZSZ5JY6RK52U/

+         rlRun "eu-strip testprog2"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $tmp"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

+ Owner:           Martin Cermak <mcermak@redhat.com>

+ Name:            /tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ TestVersion:     1.0

+ Path:            /mnt/tests/tools/elfutils/Regression/eu-strip-invalid-section-alignment-while

+ Description:     eu-strip-invalid-section-alignment-while

+ Type:            Regression

+ TestTime:        1d

+ RunFor:          elfutils

+ Requires:        elfutils

+ Requires:        gcc

+ Requires:        libaio-devel

+ Priority:        Normal

+ License:         GPLv2+

+ Confidential:    no

+ Destructive:     no

+ Bug:             1303845

@@ -0,0 +1,115 @@

+ /*

+  *   aio-dio-subblock-eof-read - test AIO read of last block of DIO file

+  *   Copyright (C) 2005 Jeff Moyer

+  *

+  *   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, write to the Free Software

+  *   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

+  */

+  

+ /*

+  *  Code taken from an example posted to linux-aio at kvack.org

+  *  http://marc.info/?l=linux-aio&m=112263621431161&w=2

+  *  Original Author: Drangon Zhou

+  *  Munged & rewritten by Jeff Moyer.

+  *

+  *  Description:  This source code implements a test to ensure that an AIO

+  *  read of the last block in a file opened with O_DIRECT returns the proper

+  *  amount of data.  In the past, there was a bug that resulted in a return

+  *  value of the requested block size, when in fact there was only a fraction

+  *  of that data available.  Thus, if the last data block contained 300 bytes

+  *  worth of data, and the user issued a 4k read, we want to ensure that

+  *  the return value is 300, not 4k.

+  */

+ #define _GNU_SOURCE

+ #include <stdio.h>

+ #include <stdlib.h>

+ #include <libaio.h>

+ #include <fcntl.h>

+ #include <unistd.h>

+ #include <errno.h>

+ 

+ /* Create a file of a size that is not a multiple of block size */

+ #define FILE_SIZE 300

+ 

+ #define fail(fmt , args...) \

+ do {\

+ printf(fmt , ##args);\

+ exit(1);\

+ } while (0)

+ 

+ static unsigned char buffer[4096] __attribute((aligned (4096)));

+ 

+ int

+ main(int argc, char **argv)

+ {

+ int ret;

+ int fd;

+ const char *filename;

+ struct iocb myiocb;

+ struct iocb *cb = &myiocb;

+ io_context_t ioctx;

+ struct io_event ie;

+     

+ if (argc != 2)

+ fail("only arg should be file name");

+ 

+ filename = argv[1];

+ fd = open(filename, O_CREAT|O_RDWR|O_DIRECT, 0600);

+ if (fd < 0)

+ fail("open returned error %d\n", errno);

+ 

+ ret = ftruncate(fd, FILE_SIZE);

+ if (ret < 0)

+ fail("truncate returned error %d\n", errno);

+ 

+ /* <1> use normal disk read, this should be ok */

+ ret = read(fd, buffer, 4096);

+ if (ret != FILE_SIZE)

+ fail("buffered read returned %d, should be 300\n", ret);

+ 

+ /* <2> use AIO disk read, it sees error. */

+ memset(&myiocb, 0, sizeof(myiocb));

+ cb->data = 0;

+ cb->key = 0;

+ cb->aio_lio_opcode = IO_CMD_PREAD;

+ cb->aio_reqprio = 0; 

+ cb->aio_fildes = fd; 

+ cb->u.c.buf = buffer;

+ cb->u.c.nbytes = 4096;

+ cb->u.c.offset = 0;

+     

+ ret = io_queue_init(1, &ioctx);

+ if (ret != 0)

+ fail("io_queue_init returned error %d\n", ret);

+ 

+ ret = io_submit(ioctx, 1, &cb);

+ if (ret != 1)

+ fail("io_submit returned error %d\n", ret);

+ 

+ ret = io_getevents(ioctx, 1, 1, &ie, NULL);

+ if (ret != 1)

+ fail("io_getevents returned %d\n", ret);

+ 

+ /*

+  *  If all goes well, we should see 300 bytes read.  If things

+  *  are broken, we may very well see a result of 4k.

+  */

+ if (ie.res != FILE_SIZE)

+ fail("AIO read of last block in file returned %ld bytes, "

+      "expected %d\n", ie.res, FILE_SIZE);

+ 

+ printf("AIO read of last block in file succeeded.\n");

+ return 0;

+ }

+ 

@@ -0,0 +1,12 @@

+ static unsigned char buffer[4096] __attribute((aligned (4096)));

+ char

+ f (int i)

+ {

+     return buffer[i];

+ }

+ 

+ int

+ main (int argc, char **argv)

+ {

+     return buffer[argc] == 0;

+ }

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

+ #   Description: initial-DWARF5-support-in-eu-readelf

+ #   Author: Martin Cermak <mcermak@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=/tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE test3-clang.o

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     initial-DWARF5-support-in-eu-readelf" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

+ Description: initial-DWARF5-support-in-eu-readelf

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: DWARF5 support in eu-readelf

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

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

+ summary: initial-DWARF5-support-in-eu-readelf

+ description: |

+     Bug summary: DWARF5 support in eu-readelf

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

+ extra-task: /tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

@@ -0,0 +1,36 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/initial-DWARF5-support-in-eu-readelf

+ #   Description: initial-DWARF5-support-in-eu-readelf

+ #   Author: Martin Cermak <mcermak@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

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	rlRun "eu-readelf --debug-dump=info test3-clang.o | fgrep '???'" 1

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/require-compression-libraries

+ #   Description: require-compression-libraries

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2020 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/elfutils/Regression/require-compression-libraries

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE t.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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     require-compression-libraries" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/require-compression-libraries

+ Description: require-compression-libraries

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: gcc-toolset-10-elfutils-devel doesn't have Requires and/or links against all supported compression libraries for libdw

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

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

+ summary: require-compression-libraries

+ description: |

+     Bug summary: gcc-toolset-10-elfutils-devel doesn't have Requires and/or links against all supported compression libraries for libdw

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - gcc

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/require-compression-libraries

+ extra-task: /tools/elfutils/Regression/require-compression-libraries

@@ -0,0 +1,38 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/require-compression-libraries

+ #   Description: require-compression-libraries

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2020 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+         rlRun "gcc -o t t.c -ldw"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

+ #include <elfutils/libdwelf.h>

+ 

+ int main () { dwelf_elf_begin (0); }

+ 

+ 

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

+ #   Description: Test for BZ#1593328 (Robustify elfutils 0.172 against bad DWARF5 data)

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     Test for BZ#1593328 (Robustify elfutils 0.172 against bad DWARF5 data)" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

+ Description: Test for BZ#1593328 (Robustify elfutils 0.172 against bad DWARF5 data)

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: Robustify elfutils 0.172 against bad DWARF5 data

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

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

+ summary: Test for BZ#1593328 (Robustify elfutils 0.172 against bad DWARF5 data)

+ description: |

+     Bug summary: Robustify elfutils 0.172 against bad DWARF5 data

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

+ extra-task: /tools/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

@@ -0,0 +1,44 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data

+ #   Description: Test for BZ#1593328 (Robustify elfutils 0.172 against bad DWARF5 data)

+ #   Author: Martin Cermak <mcermak@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

+ 

+ _sections="abbrev addr aranges decodedaranges frame gdb_index info info+ loc \

+ line decodedline ranges pubnames str macinfo macro exception"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	for _data in crashes/*; do

+ 	    for _section in $_sections; do

+ 		# 0 and 1 are expected exitcodes:

+ 		rlRun "timeout 7 eu-readelf --debug-dump=$_section $_data >/dev/null" 0,1

+ 	    done

+ 	done

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,70 @@

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

+ #

+ #   Makefile of /tools/elfutils/Regression/rpmtests

+ #   Description: runs relevant parts of the RPM testsuite

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Regression/rpmtests

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

+ 

+ 

+ requires = audit-libs-devel automake binutils-devel bzip2-devel dbus-devel \

+ elfutils-devel elfutils-libelf-devel file-devel gawk gcc gettext-devel \

+ ima-evm-utils-devel libacl-devel libarchive-devel libcap-devel libdb-devel \

+ libselinux-devel libtool lua-devel make ncurses-devel openssl-devel popt-devel \

+ python3-devel readline-devel redhat-rpm-config xz-devel zlib-devel rpm-build \

+ 

+ 

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

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     runs relevant parts of the RPM testsuite" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	$(foreach  package, $(requires), echo "Requires:        $(package)" >> $(METADATA);)

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/rpmtests

+ Description: runs relevant parts of the RPM testsuite

+ Author: Martin Cermak <mcermak@redhat.com>

@@ -0,0 +1,41 @@

+ summary: runs relevant parts of the RPM testsuite

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - audit-libs-devel

+ - automake

+ - binutils-devel

+ - bzip2-devel

+ - dbus-devel

+ - elfutils-devel

+ - elfutils-libelf-devel

+ - file-devel

+ - gawk

+ - gcc

+ - gettext-devel

+ - ima-evm-utils-devel

+ - libacl-devel

+ - libarchive-devel

+ - libcap-devel

+ - libdb-devel

+ - libselinux-devel

+ - libtool

+ - lua-devel

+ - make

+ - ncurses-devel

+ - openssl-devel

+ - popt-devel

+ - python3-devel

+ - readline-devel

+ - redhat-rpm-config

+ - xz-devel

+ - zlib-devel

+ - rpm-build

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/rpmtests

+ extra-task: /tools/elfutils/Regression/rpmtests

@@ -0,0 +1,71 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/rpmtests

+ #   Description: runs relevant parts of the RPM testsuite

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

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

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlRun "TMP=$(mktemp -d)"

+         rlRun "pushd $TMP"

+ 

+         rlAssertRpm rpm

+         rlFetchSrcForInstalled rpm

+         # Deps involve rpmbuild and other stuff coming from the buildroot compose:

+         rlRun "dnf builddep --allowerasing --nobest -y *src.rpm"

+         rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm"

+ 

+         # See what toolchain do we use

+         rlRun "which gcc as"

+ 

+         # RPM fails to build with gcc-toolset-10-gcc

+         # https://gcc.gnu.org/gcc-10/porting_to.html#common

+         # Work it around:

+         if echo $X_SCLS | fgrep gcc-toolset-10; then

+                 sed -i 's/^CFLAGS="\(.*\)"/CFLAGS="\1 -fcommon"/' SPECS/rpm.spec

+                 rlRun "fgrep CFLAGS SPECS/rpm.spec"

+         fi

+ 

+         rlRun "PYTHON=python3 rpmbuild --define='_topdir $TMP' -bc SPECS/rpm.spec"

+         rlRun "pushd BUILD/rpm-*"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         # make check calls ./rpmtests which provides useful --help .

+         # TESTSUITEFLAGS is a way to pass arguments to it through make

+         rlRun "TESTSUITEFLAGS='-k debuginfo' make check"

+         rlRun "TESTSUITEFLAGS='-k buildid' make check"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd; popd"

+         rlRun "rm -r $TMP"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

+ 

+ 

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

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

+ #

+ #   Makefile of /tools/elfutils/Regression/static-relocations-not-known-to-older-linkers

+ #   Description: static-relocations-not-known-to-older-linkers

+ #   Author: Martin Cermak <mcermak@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/elfutils/Regression/static-relocations-not-known-to-older-linkers

+ 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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     static-relocations-not-known-to-older-linkers" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils-devel" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Regression/static-relocations-not-known-to-older-linkers

+ Description: static-relocations-not-known-to-older-linkers

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: Need to rebuild rpm in order to remove static relocations not known to older linkers

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

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

+ summary: static-relocations-not-known-to-older-linkers

+ description: |

+     Bug summary: Need to rebuild rpm in order to remove static relocations not known to older linkers

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils-devel

+ duration: 48h

+ extra-summary: /tools/elfutils/Regression/static-relocations-not-known-to-older-linkers

+ extra-task: /tools/elfutils/Regression/static-relocations-not-known-to-older-linkers

@@ -0,0 +1,47 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Regression/static-relocations-not-known-to-older-linkers

+ #   Description: static-relocations-not-known-to-older-linkers

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	relocs=$(mktemp)

+ 	for i in `rpm -ql elfutils-devel`; do readelf -r -W $i; done > $relocs

+ 	# The above is expected to complain about some files not being ELF files,

+ 	# such as *.h files or directories ... ;-)

+ 	rlRun "grep -e GOTPCRELX -e GOT32X $relocs" 1

+ 	# for elfutils-devel-0.170-1.el7.x86_64.rpm, the unwanted relocation is

+ 	# (only) in /usr/lib64/libebl.a

+ 	# readelf -r -W /usr/lib64/libebl.a | grep -e GOTPCRELX -e GOT32X

+ 	# 00000000000001ef  000000250000002a R_X86_64_REX_GOTPCRELX 0000000000000000 stdout - 4

+ 	rm $relocs

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Sanity/elfutils-debuginfod

+ #   Description: elfutils-debuginfod

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Sanity/elfutils-debuginfod

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE body.sh sshpass-debuginfo-1.06-2.el8.x86_64.rpm

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

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

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

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

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

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     elfutils-debuginfod" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

+ 	@echo "Requires:        elfutils-debuginfod elfutils-debuginfod-client" >> $(METADATA)

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Sanity/elfutils-debuginfod

+ Description: elfutils-debuginfod

+ Author: Martin Cermak <mcermak@redhat.com>

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

+ #!/bin/bash

+ 

+ set -xeo pipefail

+ 

+ # Initial cleanup

+ systemctl stop debuginfod

+ rm -rf ~/.cache/debuginfod_client

+ rm -rf /usr/src/my_extra_rpms $HOME/.debuginfod_client_cache

+ 

+ STARTTIME=$(date '+%Y-%m-%d %H:%M')

+ 

+ # Set up a delay.  A delay of 3 worked for me reliably for manual testing.

+ DELAY=120

+ 

+ # Clean up after possible previous failed (=> unfinished) run of this testcase

+ rm -rf /usr/src/my_extra_rpms $HOME/.debuginfod_client_cache

+ 

+ # Check the config file is there

+ cat /etc/sysconfig/debuginfod

+ 

+ # Make sure the config file doesn't contain unwanted relicts

+ # from possible previous failed run of this testcase

+ fgrep DEBUGINFOD_PATHS /etc/sysconfig/debuginfod | (! fgrep /usr/src/my_extra_rpms)

+ 

+ # Add some directory to the DEBUGINFOD_PATH and configure it

+ # within /etc/sysconfig/debuginfod

+ mkdir -p /usr/src/my_extra_rpms

+ sed -i 's/DEBUGINFOD_PATHS="[^"]*/\0\ \/usr\/src\/my_extra_rpms/' /etc/sysconfig/debuginfod

+ fgrep DEBUGINFOD_PATHS /etc/sysconfig/debuginfod | fgrep /usr/src/my_extra_rpms

+ 

+ # Note the DEBUGINFOD_PORT in the sysconfig file

+ # and use it to export the server URL for the client to use

+ source /etc/sysconfig/debuginfod

+ export DEBUGINFOD_URLS="localhost:$DEBUGINFOD_PORT"

+ 

+ # Get the build-id from some installed binary and make sure

+ # it isn't found

+ buildid=$(eu-unstrip -n -e /usr/bin/true | cut -f2 -d\ | cut -f1 -d@)

+ ! debuginfod-find executable $buildid

+ 

+ # Start the service

+ systemctl start debuginfod

+ 

+ # Give it some time to index

+ sleep $DELAY

+ 

+ # Now the binary should be found

+ debuginfod-find executable $buildid

+ 

+ # Take a small debuginfo rpm and make sure you know the buildid of

+ # some .debug file in to the directory you created and added to

+ # the DEBUGINFO_PATH in the config file.

+ cp sshpass-debuginfo-1.06-2.el8.x86_64.rpm /usr/src/my_extra_rpms

+ 

+ # Make sure the denuginfo can't be found yet

+ ! debuginfod-find debuginfo 17ea386087f263827e0cb57fd0d888feb3035d3d

+ 

+ # Tell debuginfod to start indexing immediately

+ debuginfod_pid=$(systemctl status debuginfod | fgrep PID | grep -Po '\d+')

+ kill -SIGUSR1 $debuginfod_pid

+ 

+ # Give it some time to index

+ sleep $DELAY

+ 

+ # Try to find the debug file with the known buildid

+ debuginfod-find debuginfo 17ea386087f263827e0cb57fd0d888feb3035d3d

+ 

+ # Stop the service

+ systemctl stop debuginfod

+ 

+ # Kill the logger

+ # kill -HUP $logger

+ echo '======= vvvvvvv ======= LOG ======= vvvvvvv ======='

+ journalctl -g debuginfod -S "$STARTTIME"

+ echo '======= ^^^^^^^ ======= LOG ======= ^^^^^^^ ======='

+ 

+ # Clean up

+ rm -rf /usr/src/my_extra_rpms $HOME/.debuginfod_client_cache

+ 

+ pstree -p  $$

+ wait

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

+ summary: elfutils-debuginfod

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - elfutils-debuginfod

+ - elfutils-debuginfod-client

+ duration: 48h

+ extra-summary: /tools/elfutils/Sanity/elfutils-debuginfod

+ extra-task: /tools/elfutils/Sanity/elfutils-debuginfod

+ # fails in rawhide ci infrastructure although locally works

+ # investigation in progress

+ enabled: false

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

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Sanity/elfutils-debuginfod

+ #   Description: elfutils-debuginfod

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ __showgreenlight ()

+ {

+     rlJournalStart

+     rlPhaseStartTest

+         rlRun "echo \"Irrelevant for $X_SCLS\""

+     rlPhaseEnd

+     rlJournalEnd

+     exit 0

+ }

+ 

+ echo $X_SCLS | fgrep -q toolset && __showgreenlight

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         for p in elfutils-debuginfod elfutils-debuginfod-client; do

+             rlAssertRpm $p

+         done

+         rlRun "TMPD=$(mktemp -d)"

+         rlRun "cp body.sh sshpass-debuginfo-1.06-2.el8.x86_64.rpm $TMPD"

+         rlRun "pushd $TMPD"

+         rlFileBackup /etc/sysconfig/debuginfod

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         rlRun "./body.sh"

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlFileRestore

+         rlRun "popd"

+         rlRun "rm -r $TMPD"

+         rlRun "pstree -p $$"

+         wait

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Sanity/yama-scope

+ #   Description: yama-scope

+ #   Author: Martin Cermak <mcermak@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=/tools/elfutils/Sanity/yama-scope

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE ptrace-scope-test.sh

+ 

+ .PHONY: all install download clean

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

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

+ 	cp ptrace-scope-test.sh /tmp/

+ 	test -x /tmp/ptrace-scope-test.sh || chmod a+x /tmp/ptrace-scope-test.sh

+ 

+ clean:

+ 	rm -f *~ $(BUILT_FILES)

+ 

+ 

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

+ 

+ $(METADATA): Makefile

+ 	@echo "Owner:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     yama-scope" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Sanity/yama-scope

+ Description: yama-scope

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: Enable provide_yama_scope for rhel >= 7.4

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

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

+ summary: yama-scope

+ description: |

+     Bug summary: Enable provide_yama_scope for rhel >= 7.4

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Sanity/yama-scope

+ extra-task: /tools/elfutils/Sanity/yama-scope

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

+ #!/bin/bash

+ 

+ RETVAL=0

+ OUT=$(mktemp)

+ eu-stack -p $$ |& tee $OUT

+ grep -i 'operation not permitted' $OUT && RETVAL=1

+ rm $OUT

+ exit $RETVAL

@@ -0,0 +1,101 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Sanity/yama-scope

+ #   Description: yama-scope

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ MY_USER="ptrace_scope_testuser"

+ TESTCASE="/tmp/ptrace-scope-test.sh"

+ PROCFILE='/proc/sys/kernel/yama/ptrace_scope'

+ 

+ test_root()

+ {

+     $TESTCASE

+ }

+ 

+ test_user()

+ {

+     su - $MY_USER -c $TESTCASE

+ }

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ # 0 - Default attach security permissions.

+ # 1 - Restricted attach. Only child processes plus normal permissions.

+ # 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.

+ # 3 - No attach. No process may call ptrace at all. Irrevocable.

+ 

+ # echo 0 > /proc/sys/kernel/yama/ptrace_scope

+ 

+ # With 0, strace works against any process with your uid. For example, strace -p 2190.

+ # With 1, strace errors when doing the same as in 0: strace: attach: ptrace(PTRACE_SEIZE, 3180):

+ #         Operation not permitted. However, you can strace any program you run from strace,

+ #         "strace /bin/ls" or example.

+ # With 2, you can only strace from the root account. You can no longer strace commands run from strace.

+ # With 3, even root cannot strace.

+ 

+             rlRun "useradd $MY_USER" 0,9

+ 

+             rlRun "cp -f ptrace-scope-test.sh /tmp/"

+             rlRun "chmod -f a+x /tmp/ptrace-scope-test.sh"

+ 

+             rlRun "ORIGVAL=$( cat $PROCFILE )"

+ 

+             # First, test the default behaviour, which is "no restriction"

+             # from the ptrace perspective. Here we assume that

+             # elfutils-default-yama-scope.rpm is installed and so the default

+             # yama policy is set to 0 instead of 1 which would otherwise be set

+             # as a kernel default (security/yama/yama_lsm.c ---> YAMA_SCOPE_RELATIONAL)

+             rlRun test_root

+             rlRun test_user

+ 

+             rlRun "echo 0 > $PROCFILE"

+             rlRun test_root

+             rlRun test_user

+             rlRun "echo 1 > $PROCFILE"

+             rlRun test_root

+             rlRun test_user 1

+             rlRun "echo 2 > $PROCFILE"

+             rlRun test_root

+             rlRun test_user 1

+             # Following subtest would be irrevertible (till next reboot)

+             # rlRun "echo 3 > $PROCFILE"

+             # rlRun test_root 1

+             # rlRun test_user 1

+ 

+             rlRun "userdel -f $MY_USER"

+ 

+ # This testcase could be more complex - using child and non-child processes and

+ # performing reboots.  But let's keep this simple, since we are not testing the

+ # kernel facility, but merely an elfutils "plugin" for it, whose purpose is to

+ # set the default yama policy as such.

+ 

+             rlRun "echo $ORIGVAL > $PROCFILE"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ #   Description: CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE addr2line-buffer-over-flow1

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-16062-elfutils-Heap-based-buffer-over-read" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ Description: CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 2 elfutils: Heap-based buffer over-read in libdw/dwarf_getaranges.c:dwarf_getaranges() via crafted file [rhel-7]

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

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

+ summary: CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ description: |

+     Bug summary: 2 elfutils: Heap-based buffer over-read in libdw/dwarf_getaranges.c:dwarf_getaranges() via crafted file [rhel-7]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ extra-task: /tools/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

@@ -0,0 +1,39 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ #   Description: CVE-2018-16062-elfutils-Heap-based-buffer-over-read

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# Reproduced with elfutils-0.172-2.el7.x86_64 valgrind-3.13.0-13.el7.x86_64

+ 	rlRun "valgrind -q --error-exitcode=99 eu-addr2line -e addr2line-buffer-over-flow1 -- 500 50 10 -1000"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

+ #   Description: CVE-2018-16402-double-free-due-to-double-decompression

+ #   Author: Martin Cermak <mcermak@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/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE Double-free-libelf

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-16402-double-free-due-to-double-decompression" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

+ Description: CVE-2018-16402-double-free-due-to-double-decompression

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 2 elfutils: Double-free due to double decompression of sections in crafted ELF causes crash [rhel-8]

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

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

+ summary: CVE-2018-16402-double-free-due-to-double-decompression

+ description: |

+     Bug summary: 2 elfutils: Double-free due to double decompression of sections in crafted ELF causes crash [rhel-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - nothing

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

+ extra-task: /tools/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

@@ -0,0 +1,42 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-16402-double-free-due-to-double-decompression

+ #   Description: CVE-2018-16402-double-free-due-to-double-decompression

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	TMP=$(mktemp)

+ 	rlRun "valgrind -q eu-readelf -S ./Double-free-libelf |& tee $TMP"

+ 	rlRun "fgrep 'Invalid free()' $TMP" 1

+ 	rlRun "fgrep 'Section Headers:' $TMP"

+ 	rm -f $TMP

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ #   Description: CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ #   Author: Martin Cermak <mcermak@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/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE Buffer-over-readelf bz1532205.supp

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ Description: CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 3 elfutils: Heap-based buffer over-read in libdw/dwarf_getabbrev.c and libwd/dwarf_hasattr.c causes crash [rhel-8]

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

@@ -0,0 +1,25 @@

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_explode_name

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_make_l10nflist

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Addr4

+    fun:_nl_make_l10nflist

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Addr4

+    fun:new_composite_name

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_explode_name

+ }

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

+ summary: CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ description: |

+     Bug summary: 3 elfutils: Heap-based buffer over-read in libdw/dwarf_getabbrev.c and libwd/dwarf_hasattr.c causes crash [rhel-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - nothing

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ extra-task: /tools/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

@@ -0,0 +1,43 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ #   Description: CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	arch | grep -q ppc64le && VGSUPP='--suppressions=bz1532205.supp' || VGSUPP=''

+ 	TMP=$(mktemp)

+ 	rlRun "valgrind $VGSUPP -q eu-readelf --debug-dump=abbrev ./Buffer-over-readelf |& tee $TMP"

+ 	rlRun "fgrep 'Invalid read of size' $TMP" 1

+ 	rlRun "fgrep 'Abbreviation section at offset' $TMP"

+ 	rm -f $TMP

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ #   Description: CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18310-elfutils-invalid-memory-address-dereference" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ Description: CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 0 elfutils: invalid memory address dereference was discovered in dwfl_segment_report_module.c in libdwfl [rhdts-8]

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

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

+ summary: CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ description: |

+     Bug summary: 0 elfutils: invalid memory address dereference was discovered in dwfl_segment_report_module.c in libdwfl [rhdts-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ extra-task: /tools/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

@@ -0,0 +1,39 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ #   Description: CVE-2018-18310-elfutils-invalid-memory-address-dereference

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# Expect exitcode 2, unfixed package segfaults (139)

+ 	rlRun "eu-stack --core=POC-stack" 2

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

+ #   Description: CVE-2018-18310-invalid-memory-address-dereference

+ #   Author: Martin Cermak <mcermak@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/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE POC-stack bz1532205.supp

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18310-invalid-memory-address-dereference" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

+ Description: CVE-2018-18310-invalid-memory-address-dereference

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 0 elfutils: invalid memory address dereference was discovered in dwfl_segment_report_module.c in libdwfl [rhel-8]

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

@@ -0,0 +1,25 @@

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_explode_name

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_make_l10nflist

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Addr4

+    fun:_nl_make_l10nflist

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Addr4

+    fun:new_composite_name

+ }

+ {

+    <insert_a_suppression_name_here>

+    Memcheck:Cond

+    fun:_nl_explode_name

+ }

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

+ summary: CVE-2018-18310-invalid-memory-address-dereference

+ description: |

+     Bug summary: 0 elfutils: invalid memory address dereference was discovered in dwfl_segment_report_module.c in libdwfl [rhel-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - nothing

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

+ extra-task: /tools/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

@@ -0,0 +1,42 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18310-invalid-memory-address-dereference

+ #   Description: CVE-2018-18310-invalid-memory-address-dereference

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	arch | grep -q ppc64le && VGSUPP='--suppressions=bz1532205.supp' || VGSUPP=''

+ 	TMP=$(mktemp)

+ 	rlRun "valgrind $VGSUPP -q eu-stack --core=./POC-stack |& tee $TMP"

+ 	rlRun "fgrep 'Invalid read of size' $TMP" 1

+ 	rm -f $TMP

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ #   Description: CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ Description: CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ Author: Martin Cermak <mcermak@redhat.com>

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

+ summary: CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ extra-task: /tools/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

@@ -0,0 +1,38 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ #   Description: CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	rlRun "eu-size POC1"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ #   Description: CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ #   Author: Martin Cermak <mcermak@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/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ Description: CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 0 elfutils: eu-size cannot handle recursive ar files [rhel-8]

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

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

+ summary: CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ description: |

+     Bug summary: 0 elfutils: eu-size cannot handle recursive ar files [rhel-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ extra-task: /tools/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

@@ -0,0 +1,42 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ #   Description: CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	TMP=$(mktemp)

+ 	rlRun "valgrind -q eu-size ./POC2 |& tee $TMP"

+ 	rlRun "fgrep 'Process terminating with default action of signal 11' $TMP" 1

+ 	rm -f $TMP

+ 	rlRun "eu-size ./POC2"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18521-divide-by-zero

+ #   Description: CVE-2018-18521-divide-by-zero

+ #   Author: Martin Cermak <mcermak@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/elfutils/Security/CVE-2018-18521-divide-by-zero

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18521-divide-by-zero" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

empty or binary file added
@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18521-divide-by-zero

+ Description: CVE-2018-18521-divide-by-zero

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 1 elfutils: Divide-by-zero in arlib_add_symbols function in arlib.c [rhel-8]

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

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

+ summary: CVE-2018-18521-divide-by-zero

+ description: |

+     Bug summary: 1 elfutils: Divide-by-zero in arlib_add_symbols function in arlib.c [rhel-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18521-divide-by-zero

+ extra-task: /tools/elfutils/Security/CVE-2018-18521-divide-by-zero

@@ -0,0 +1,43 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18521-divide-by-zero

+ #   Description: CVE-2018-18521-divide-by-zero

+ #   Author: Martin Cermak <mcermak@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

+ 

+ PACKAGE="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# This doesn't reproduce on ppach64 and ppc64le.

+ 	TMP=$(mktemp)

+ 	rlRun "valgrind -q eu-ranlib ./POC2 |& tee $TMP"

+ 	rlRun "fgrep 'Process terminating with default action of signal 8' $TMP" 1

+ 	rm -f $TMP

+ 	rlRun "eu-ranlib ./POC2"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ #   Description: CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

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

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

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

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

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

+ 

+ 	rhts-lint $(METADATA)

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

+ PURPOSE of /tools/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ Description: CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: 1 elfutils: Divide-by-zero in arlib_add_symbols function in arlib.c [rhdts-8]

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

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

+ summary: CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ description: |

+     Bug summary: 1 elfutils: Divide-by-zero in arlib_add_symbols function in arlib.c [rhdts-8]

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

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ extra-task: /tools/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

@@ -0,0 +1,38 @@

+ #!/bin/bash

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

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

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ #   Description: CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	rlRun "eu-ranlib POC2"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

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

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

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2019-7146

+ #   Description: CVE-2019-7146

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

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

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2019-7146

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

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

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

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

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

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

+ 	@echo "Description:     CVE-2019-7146" >> $(METADATA)

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

+ 	@echo "TestTime:        48h" >> $(METADATA)

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

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

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

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,3 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2019-7146

+ Description: CVE-2019-7146

+ Author: Martin Cermak <mcermak@redhat.com>

@@ -0,0 +1,14 @@

+ summary: CVE-2019-7146

+ description: ''

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2019-7146

+ extra-task: /tools/elfutils/Security/CVE-2019-7146

empty or binary file added
@@ -0,0 +1,41 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2019-7146

+ #   Description: CVE-2019-7146

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+        # https://svn.devel.redhat.com/repos/srtvulns/trunk/components/elfutils/CVE-2019-7146/

+        # Expected Output

+        # An error instead of segfault.

+        rlRun "valgrind -q --error-exitcode=99 eu-readelf -a ./poc" 1

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ #   Description: CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE POC1

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     CVE-2019-7149-elfutils-heap-based-buffer-over-read" >> $(METADATA)

+ 	@echo "Type:            Security" >> $(METADATA)

+ 	@echo "TestTime:        48h" >> $(METADATA)

+ 	@echo "RunFor:          elfutils" >> $(METADATA)

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    no" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             1680056" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ Description: CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils: heap-based buffer over-read in read_srclines in dwarf_getsrclines.c in libdw [rhdts-8]

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1680056

@@ -0,0 +1,16 @@

+ summary: CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ description: |

+     Bug summary: elfutils: heap-based buffer over-read in read_srclines in dwarf_getsrclines.c in libdw [rhdts-8]

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1680056

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ extra-task: /tools/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

@@ -0,0 +1,43 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ #   Description: CVE-2019-7149-elfutils-heap-based-buffer-over-read

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	rlRun "which valgrind eu-nm"

+ 	# With RHEL I saw the invalid read of size 1 on aarch64 and ppc64le

+ 	# using devtoolset-7-elfutils-0.170-5.el7.  I also saw it on x86_64

+ 	# with base rhel elfutils-0.172-2.el7.x86_64.

+ 	# IOW - It doesn't reproduce "everywhere".

+ 	rlRun "valgrind -q --error-exitcode=99 eu-nm -C POC1"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ #   Description: CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE POC2

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     CVE-2019-7150-segmentation-fault-in-elf64_xlatetom" >> $(METADATA)

+ 	@echo "Type:            Security" >> $(METADATA)

+ 	@echo "TestTime:        48h" >> $(METADATA)

+ 	@echo "RunFor:          elfutils" >> $(METADATA)

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    no" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             1680046" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ Description: CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils: segmentation fault in elf64_xlatetom in libelf/elf32_xlatetom.c [rhel-7]

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1680046

@@ -0,0 +1,16 @@

+ summary: CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ description: |

+     Bug summary: elfutils: segmentation fault in elf64_xlatetom in libelf/elf32_xlatetom.c [rhel-7]

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1680046

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ extra-task: /tools/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

@@ -0,0 +1,40 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ #   Description: CVE-2019-7150-segmentation-fault-in-elf64_xlatetom

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# An error is expected (2), but a SEGV is not (139).

+ 	# Reproduced with elfutils-0.172-2.el7, verified with elfutils-0.176-1.el7

+ 	rlRun "valgrind -q --error-exitcode=99 eu-stack --core=POC2" 2

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ #   Description: CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE POC

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note" >> $(METADATA)

+ 	@echo "Type:            Security" >> $(METADATA)

+ 	@echo "TestTime:        48h" >> $(METADATA)

+ 	@echo "RunFor:          elfutils" >> $(METADATA)

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    no" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             1679071" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ Description: CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils: Out of bound write in elf_cvt_note in libelf/note_xlate.h [rhel-7]

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1679071

@@ -0,0 +1,16 @@

+ summary: CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ description: |

+     Bug summary: elfutils: Out of bound write in elf_cvt_note in libelf/note_xlate.h [rhel-7]

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1679071

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ extra-task: /tools/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

@@ -0,0 +1,40 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ #   Description: CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# Reproduced with elfutils-0.174-5.fc28.x86_64

+ 	# This is expected to fail (1), but not to segfault (139).

+ 	rlRun "valgrind -q --error-exitcode=99 eu-elflint -d POC" 1

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,64 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ #   Description: CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE POC2

+ 

+ .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:           Martin Cermak <mcermak@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom" >> $(METADATA)

+ 	@echo "Type:            Security" >> $(METADATA)

+ 	@echo "TestTime:        48h" >> $(METADATA)

+ 	@echo "RunFor:          elfutils" >> $(METADATA)

+ 	@echo "Requires:        elfutils valgrind" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    no" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             1679078" >> $(METADATA)

+ 	@echo "Releases:        -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ Description: CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ Author: Martin Cermak <mcermak@redhat.com>

+ Bug summary: elfutils: heap-based buffer over-read in function elf32_xlatetom in elf32_xlatetom.c [rhel-7]

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1679078

@@ -0,0 +1,16 @@

+ summary: CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ description: |

+     Bug summary: elfutils: heap-based buffer over-read in function elf32_xlatetom in elf32_xlatetom.c [rhel-7]

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1679078

+ contact:

+ - Martin Cermak <mcermak@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ - valgrind

+ duration: 48h

+ extra-summary: /tools/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ extra-task: /tools/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

@@ -0,0 +1,41 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ #   Description: CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom

+ #   Author: Martin Cermak <mcermak@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2019 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="elfutils"

+ 

+ rlJournalStart

+     rlPhaseStartTest

+ 	# We expect 1, but not 99 ...

+ 	# Reproduced with valgrind-3.13.0-13.el7 and elfutils-0.172-2.el7

+ 	# Verified with valgrind-3.14.0-16.el7 and elfutils-0.176-1.el7

+ 	rlRun "valgrind -q --error-exitcode=99 eu-readelf -a POC2" 1

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,63 @@

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Makefile of /tools/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

+ #   Description: CVE-2014-0172 elfutils: integer overflow, leading to a heap-based buffer overflow in libdw

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2014 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/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

+ export TESTVERSION=1.0

+ 

+ BUILT_FILES=

+ 

+ FILES=$(METADATA) runtest.sh Makefile PURPOSE dwz-overflow.elf

+ 

+ .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:           Vaclav Kadlcik <vkadlcik@redhat.com>" > $(METADATA)

+ 	@echo "Name:            $(TEST)" >> $(METADATA)

+ 	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)

+ 	@echo "Path:            $(TEST_DIR)" >> $(METADATA)

+ 	@echo "Description:     CVE-2014-0172 elfutils: integer overflow, leading to a heap-based buffer overflow in libdw" >> $(METADATA)

+ 	@echo "Type:            Security" >> $(METADATA)

+ 	@echo "TestTime:        5m" >> $(METADATA)

+ 	@echo "RunFor:          elfutils" >> $(METADATA)

+ 	@echo "Requires:        elfutils" >> $(METADATA)

+ 	@echo "Priority:        Normal" >> $(METADATA)

+ 	@echo "License:         GPLv2+" >> $(METADATA)

+ 	@echo "Confidential:    yes" >> $(METADATA)

+ 	@echo "Destructive:     no" >> $(METADATA)

+ 	@echo "Bug:             1139128" >> $(METADATA)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,5 @@

+ PURPOSE of /tools/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

+ Description: CVE-2014-0172 elfutils: integer overflow, leading to a heap-based buffer overflow in libdw

+ Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ Bug summary: elfutils: integer overflow, leading to a heap-based buffer overflow in libdw [rhel-6.6]

+ Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1139128

@@ -0,0 +1,16 @@

+ summary: 'CVE-2014-0172 elfutils: integer overflow, leading to a heap-based buffer

+     overflow in libdw'

+ description: |

+     Bug summary: elfutils: integer overflow, leading to a heap-based buffer overflow in libdw [rhel-6.6]

+     Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1139128

+ contact:

+ - Vaclav Kadlcik <vkadlcik@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - elfutils

+ duration: 5m

+ extra-summary: /tools/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

+ extra-task: /tools/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

@@ -0,0 +1,57 @@

+ #!/bin/bash

+ # vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   runtest.sh of /tools/elfutils/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow

+ #   Description: CVE-2014-0172 elfutils: integer overflow, leading to a heap-based buffer overflow in libdw

+ #   Author: Vaclav Kadlcik <vkadlcik@redhat.com>

+ #

+ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ #

+ #   Copyright (c) 2014 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="elfutils"

+ 

+ # Reproducer by Florian Weimer, confidential.

+ # That is why this test has Confidential: yes.

+ REPRODUCING_FILE=dwz-overflow.elf

+ 

+ rlJournalStart

+     rlPhaseStartSetup

+         rlAssertRpm $PACKAGE

+         rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"

+         rlRun "cp $REPRODUCING_FILE $TmpDir" 0

+         rlRun "pushd $TmpDir"

+     rlPhaseEnd

+ 

+     rlPhaseStartTest

+         # eu-readelf since 0.153 was vulnerable.

+         # The following crashed with "Segmentation fault"

+         # and exit value 139.

+         rlRun "eu-readelf -w $REPRODUCING_FILE" 0,1 'eu-readelf should not crash'

+     rlPhaseEnd

+ 

+     rlPhaseStartCleanup

+         rlRun "popd"

+         rlRun "rm -r $TmpDir" 0 "Removing tmp directory"

+     rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

@@ -0,0 +1,48 @@

+ TOPLEVEL_NAMESPACE=/tools

+ PACKAGE_NAME=elfutils

+ RELATIVE_PATH=testsuite

+ 

+ export TESTVERSION=2.0

+ export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH)

+ 

+ .PHONY: all install download clean

+ 

+ FILES=$(METADATA) runtest.sh PURPOSE Makefile

+ 

+ run: $(FILES) build

+ 	./runtest.sh

+ 

+ build: $(BUILT_FILES)

+ 	chmod a+x ./runtest.sh

+ 

+ clean:

+ 

+ # Include Common Makefile

+ include /usr/share/rhts/lib/rhts-make.include

+ 

+ requires = autoconf automake bison bzip2 bzip2-devel cvs elfutils flex gcc \

+            gcc-c++ gettext glibc-headers libstdc++ libstdc++-devel nfs-utils \

+ 	   pkgconfig(libarchive) pkgconfig(libcurl) pkgconfig(libmicrohttpd) \

+ 	   pkgconfig(sqlite3) rpm-build xz-devel yum-utils zlib-devel

+ 

+ # https://mojo.redhat.com/docs/DOC-1072127

+ dtsver = $(shell seq -s, 9 14)

+ dtsreq = $(shell echo {dev,gcc-}toolset-{$(dtsver)}-{elfutils{,-devel},gcc{,-c++,-libstdc++,-libstdc++-devel},binutils{,-devel}})

+ 

+ # Generate the testinfo.desc here:

+ $(METADATA): Makefile

+ 	@touch $(METADATA)

+ 	@echo "Owner:		Petr Muller <pmuller@redhat.com>" > $(METADATA)

+ 	@echo "Name:		$(TEST)" >> $(METADATA)

+ 	@echo "Path:		$(TEST_DIR)"	>> $(METADATA)

+ 	@echo "TestVersion:	$(TESTVERSION)"	>> $(METADATA)

+ 	@echo "Description:	This test runs upstream testsuite for elfutils" >> $(METADATA)

+ 	@echo "TestTime:	99m" >> $(METADATA)

+ 	@echo "RunFor:		elfutils" >> $(METADATA)

+ 	@echo "Priority:	Normal" >> $(METADATA)

+ 	@echo "License:		GPL" >> $(METADATA)

+ 	$(foreach  package, $(requires) $(dtsreq), \

+ 		echo "Requires:        $(package)" >> $(METADATA); \

+ 	)

+ 

+ 	rhts-lint $(METADATA)

@@ -0,0 +1,2 @@

+ Testsuite encapsulating upstream tests for elfutils, which are included in elfutils src.rpm package.

+ This test always fetches (from /mnt/redhat/) appropriate version of that src.rpm for installed elfutils.

@@ -0,0 +1,133 @@

+ summary: This test runs upstream testsuite for elfutils

+ description: |

+     Testsuite encapsulating upstream tests for elfutils, which are included in elfutils src.rpm package.

+     This test always fetches (from /mnt/redhat/) appropriate version of that src.rpm for installed elfutils.

+ contact:

+ - Petr Muller <pmuller@redhat.com>

+ component:

+ - elfutils

+ test: ./runtest.sh

+ framework: beakerlib

+ recommend:

+ - autoconf

+ - automake

+ - bison

+ - bzip2

+ - bzip2-devel

+ - cvs

+ - elfutils

+ - flex

+ - gcc

+ - gcc-c++

+ - gettext

+ - glibc-headers

+ - libstdc++

+ - libstdc++-devel

+ - nfs-utils

+ - pkgconfig(libarchive)

+ - pkgconfig(libcurl)

+ - pkgconfig(libmicrohttpd)

+ - pkgconfig(sqlite3)

+ - rpm-build

+ - xz-devel

+ - yum-utils

+ - zlib-devel

+ - devtoolset-9-elfutils

+ - devtoolset-9-elfutils-devel

+ - devtoolset-9-gcc

+ - devtoolset-9-gcc-c++

+ - devtoolset-9-gcc-libstdc++

+ - devtoolset-9-gcc-libstdc++-devel

+ - devtoolset-9-binutils

+ - devtoolset-9-binutils-devel

+ - devtoolset-10-elfutils

+ - devtoolset-10-elfutils-devel

+ - devtoolset-10-gcc

+ - devtoolset-10-gcc-c++

+ - devtoolset-10-gcc-libstdc++

+ - devtoolset-10-gcc-libstdc++-devel

+ - devtoolset-10-binutils

+ - devtoolset-10-binutils-devel

+ - devtoolset-11-elfutils

+ - devtoolset-11-elfutils-devel

+ - devtoolset-11-gcc

+ - devtoolset-11-gcc-c++

+ - devtoolset-11-gcc-libstdc++

+ - devtoolset-11-gcc-libstdc++-devel

+ - devtoolset-11-binutils

+ - devtoolset-11-binutils-devel

+ - devtoolset-12-elfutils

+ - devtoolset-12-elfutils-devel

+ - devtoolset-12-gcc

+ - devtoolset-12-gcc-c++

+ - devtoolset-12-gcc-libstdc++

+ - devtoolset-12-gcc-libstdc++-devel

+ - devtoolset-12-binutils

+ - devtoolset-12-binutils-devel

+ - devtoolset-13-elfutils

+ - devtoolset-13-elfutils-devel

+ - devtoolset-13-gcc

+ - devtoolset-13-gcc-c++

+ - devtoolset-13-gcc-libstdc++

+ - devtoolset-13-gcc-libstdc++-devel

+ - devtoolset-13-binutils

+ - devtoolset-13-binutils-devel

+ - devtoolset-14-elfutils

+ - devtoolset-14-elfutils-devel

+ - devtoolset-14-gcc

+ - devtoolset-14-gcc-c++

+ - devtoolset-14-gcc-libstdc++

+ - devtoolset-14-gcc-libstdc++-devel

+ - devtoolset-14-binutils

+ - devtoolset-14-binutils-devel

+ - gcc-toolset-9-elfutils

+ - gcc-toolset-9-elfutils-devel

+ - gcc-toolset-9-gcc

+ - gcc-toolset-9-gcc-c++

+ - gcc-toolset-9-gcc-libstdc++

+ - gcc-toolset-9-gcc-libstdc++-devel

+ - gcc-toolset-9-binutils

+ - gcc-toolset-9-binutils-devel

+ - gcc-toolset-10-elfutils

+ - gcc-toolset-10-elfutils-devel

+ - gcc-toolset-10-gcc

+ - gcc-toolset-10-gcc-c++

+ - gcc-toolset-10-gcc-libstdc++

+ - gcc-toolset-10-gcc-libstdc++-devel

+ - gcc-toolset-10-binutils

+ - gcc-toolset-10-binutils-devel

+ - gcc-toolset-11-elfutils

+ - gcc-toolset-11-elfutils-devel

+ - gcc-toolset-11-gcc

+ - gcc-toolset-11-gcc-c++

+ - gcc-toolset-11-gcc-libstdc++

+ - gcc-toolset-11-gcc-libstdc++-devel

+ - gcc-toolset-11-binutils

+ - gcc-toolset-11-binutils-devel

+ - gcc-toolset-12-elfutils

+ - gcc-toolset-12-elfutils-devel

+ - gcc-toolset-12-gcc

+ - gcc-toolset-12-gcc-c++

+ - gcc-toolset-12-gcc-libstdc++

+ - gcc-toolset-12-gcc-libstdc++-devel

+ - gcc-toolset-12-binutils

+ - gcc-toolset-12-binutils-devel

+ - gcc-toolset-13-elfutils

+ - gcc-toolset-13-elfutils-devel

+ - gcc-toolset-13-gcc

+ - gcc-toolset-13-gcc-c++

+ - gcc-toolset-13-gcc-libstdc++

+ - gcc-toolset-13-gcc-libstdc++-devel

+ - gcc-toolset-13-binutils

+ - gcc-toolset-13-binutils-devel

+ - gcc-toolset-14-elfutils

+ - gcc-toolset-14-elfutils-devel

+ - gcc-toolset-14-gcc

+ - gcc-toolset-14-gcc-c++

+ - gcc-toolset-14-gcc-libstdc++

+ - gcc-toolset-14-gcc-libstdc++-devel

+ - gcc-toolset-14-binutils

+ - gcc-toolset-14-binutils-devel

+ duration: 99m

+ extra-summary: /tools/elfutils/testsuite

+ extra-task: /tools/elfutils/testsuite

@@ -0,0 +1,47 @@

+ #!/bin/bash

+ 

+ . /usr/share/beakerlib/beakerlib.sh

+ . /usr/bin/rhts_environment.sh

+ 

+ rlJournalStart

+   rlPhaseStartSetup

+     rlRun "which gcc as"

+     rlRun "BIN=`which eu-strip`"

+     rlRun "RPM=`rpm --queryformat='%{name}\n' -qf $BIN`"

+     rlRun "TMP=$(mktemp -d)"

+     rlRun "pushd $TMP"

+ 

+     rlFetchSrcForInstalled $RPM

+     rlRun "rpm --define='_topdir $TMP' -Uhv *elfutils*.src.rpm"

+     rlRun "yum-builddep -y $TMP/SPECS/elfutils.spec"

+     rlRun "rpmbuild --define='_topdir $TMP' -bc SPECS/elfutils.spec"

+     rlRun "pushd BUILD/elfutils-*"

+ 

+     rlRun "useradd elfutilstest" 0,9

+     rlRun "chown -R elfutilstest $TMP"

+   rlPhaseEnd

+ 

+   rlPhaseStartTest

+     wd=$(pwd)

+     rlRun "su - elfutilstest -c \"make -C $wd check\" |& tee $wd/test.log"

+ 

+     rlRun "PASSED=$(grep -c "^PASS" test.log )"

+     rlRun "FAILED=$(grep -c "^FAIL" test.log )"

+ 

+     rlRun "[[ $PASSED -gt 0 ]]"

+     rlRun "[[ $FAILED -eq 0 ]]"

+ 

+     # Archive artifacts

+     tarball='/tmp/artifacts.tar.xz'

+     rlRun "rm -rf $tarball"

+     rlRun "tar cfJ $tarball $TMP"

+     rlFileSubmit "$tarball"

+   rlPhaseEnd

+ 

+   rlPhaseStartCleanup

+     rlRun "popd"

+     rlRun "rm -r $TMP $tarball"

+   rlPhaseEnd

+ rlJournalPrintText

+ rlJournalEnd

+ 

Introduce CI gating tests.

1 new commit added

  • Drop the RHEL-8 related section of gating.yaml
3 years ago

This is an attempt to "upstream" internal RHEL tests and make them available for Fedora. A testcase is run by executing the runtest.sh. Some of the other files are testcase requirements, such as various reproducer files. The main.fmf file keeps some of the testcase metadata, such as the RPM requirements of the tests that need to be installed before the test can run. The included Makefiles are legacy, and are kept for backwards compatibility with older RHEL test harness. The purpose of main.fmf and a Makefile is very close. The PURPOSE files are also legacy. Technically they could be dropped. The .fmf and plans folders are configuration files that tell the Fedora CI infrastructure how to run the provided tests. The gating.yaml file basically sets this whole set of provided testcases a mandatory gating step called fedora-ci.koji-build.tier0.functional.

1 new commit added

  • Testing change that might hopefully help triggering the tests.
3 years ago

1 new commit added

  • Testcase updates
3 years ago

1 new commit added

  • [citest]
3 years ago

1 new commit added

  • Debuginfod: nicely stop and clean up.
3 years ago

1 new commit added

  • Another attempt to avoid stall in Sanity/elfutils-debuginfod.
3 years ago

1 new commit added

  • Try to fix Sanity/elfutils-debuginfod and Regression/bz652858-elfutils-prelink-stap-interaction
3 years ago

1 new commit added

  • Disable Sanity/elfutils-debuginfod temporarily
3 years ago

Pull-Request has been closed by mcermak

3 years ago
Metadata
Changes Summary 227
+1
file added
.fmf/version
+13
file added
gating.yaml
+6
file added
plans/ci.fmf
+65
file added
tests/Regression/GNU-Attribute-notes-not-recognized/Makefile
+5
file added
tests/Regression/GNU-Attribute-notes-not-recognized/PURPOSE
+16
file added
tests/Regression/GNU-Attribute-notes-not-recognized/main.fmf
+43
file added
tests/Regression/GNU-Attribute-notes-not-recognized/runtest.sh
+66
file added
tests/Regression/GNU-Property-notes-not-recognized/Makefile
+5
file added
tests/Regression/GNU-Property-notes-not-recognized/PURPOSE
+45
file added
tests/Regression/GNU-Property-notes-not-recognized/gnu_props.S
+17
file added
tests/Regression/GNU-Property-notes-not-recognized/main.fmf
+72
file added
tests/Regression/GNU-Property-notes-not-recognized/runtest.sh
+64
file added
tests/Regression/RFE-support-reading-compressed-ELF-objects/Makefile
+5
file added
tests/Regression/RFE-support-reading-compressed-ELF-objects/PURPOSE
+15
file added
tests/Regression/RFE-support-reading-compressed-ELF-objects/main.fmf
+44
file added
tests/Regression/RFE-support-reading-compressed-ELF-objects/runtest.sh
+64
file added
tests/Regression/SHT_X86_64_UNWIND-section-not-recognized/Makefile
+5
file added
tests/Regression/SHT_X86_64_UNWIND-section-not-recognized/PURPOSE
+0
file added
tests/Regression/SHT_X86_64_UNWIND-section-not-recognized/m.o
+15
file added
tests/Regression/SHT_X86_64_UNWIND-section-not-recognized/main.fmf
+39
file added
tests/Regression/SHT_X86_64_UNWIND-section-not-recognized/runtest.sh
+63
file added
tests/Regression/abrt-faf-elfutils-IO-default-xsputn/Makefile
+5
file added
tests/Regression/abrt-faf-elfutils-IO-default-xsputn/PURPOSE
+0
file added
tests/Regression/abrt-faf-elfutils-IO-default-xsputn/eu-readelf-n-crash.core.xz
+16
file added
tests/Regression/abrt-faf-elfutils-IO-default-xsputn/main.fmf
+48
file added
tests/Regression/abrt-faf-elfutils-IO-default-xsputn/runtest.sh
+65
file added
tests/Regression/add-ppc64-fallback-unwinder/Makefile
+5
file added
tests/Regression/add-ppc64-fallback-unwinder/PURPOSE
+0
file added
tests/Regression/add-ppc64-fallback-unwinder/backtrace.ppc64le.fp.core.bz2
+0
file added
tests/Regression/add-ppc64-fallback-unwinder/backtrace.ppc64le.fp.exec.bz2
+16
file added
tests/Regression/add-ppc64-fallback-unwinder/main.fmf
+17
file added
tests/Regression/add-ppc64-fallback-unwinder/output.ref
+55
file added
tests/Regression/add-ppc64-fallback-unwinder/runtest.sh
+65
file added
tests/Regression/api-break-in-libasm-h/Makefile
+3
file added
tests/Regression/api-break-in-libasm-h/PURPOSE
+14
file added
tests/Regression/api-break-in-libasm-h/main.fmf
+39
file added
tests/Regression/api-break-in-libasm-h/runtest.sh
+6
file added
tests/Regression/api-break-in-libasm-h/test.c
+64
file added
tests/Regression/bz1059897-Support-64-bit-SYM64-symbol-table/Makefile
+12
file added
tests/Regression/bz1059897-Support-64-bit-SYM64-symbol-table/PURPOSE
+0
file added
tests/Regression/bz1059897-Support-64-bit-SYM64-symbol-table/libantlr.a.bz2
+23
file added
tests/Regression/bz1059897-Support-64-bit-SYM64-symbol-table/main.fmf
+64
file added
tests/Regression/bz1059897-Support-64-bit-SYM64-symbol-table/runtest.sh
+65
file added
tests/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore/Makefile
+5
file added
tests/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore/PURPOSE
+16
file added
tests/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore/main.fmf
+72
file added
tests/Regression/bz1371517-eu-stack-killed-by-SIGABRT-processing-gcore/runtest.sh
+64
file added
tests/Regression/bz1717349-vaguely-related-SEGV/Makefile
+3
file added
tests/Regression/bz1717349-vaguely-related-SEGV/PURPOSE
+13
file added
tests/Regression/bz1717349-vaguely-related-SEGV/main.fmf
+0
file added
tests/Regression/bz1717349-vaguely-related-SEGV/qat_c3xxx.ko
+42
file added
tests/Regression/bz1717349-vaguely-related-SEGV/runtest.sh
+66
file added
tests/Regression/bz447416-segfaults/Makefile
+10
file added
tests/Regression/bz447416-segfaults/PURPOSE
+24
file added
tests/Regression/bz447416-segfaults/main.fmf
+183
file added
tests/Regression/bz447416-segfaults/runtest.sh
+0
file added
tests/Regression/bz447416-segfaults/testcases.tar.gz
+21
file added
tests/Regression/bz447416-segfaults/testprog.c
+74
file added
tests/Regression/bz652858-elfutils-prelink-stap-interaction/Makefile
+3
file added
tests/Regression/bz652858-elfutils-prelink-stap-interaction/PURPOSE
+21
file added
tests/Regression/bz652858-elfutils-prelink-stap-interaction/main.fmf
+74
file added
tests/Regression/bz652858-elfutils-prelink-stap-interaction/runtest.sh
+63
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/Makefile
+9
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/PURPOSE
+0
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/ld.bz2
+0
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/ld.debug.bz2
+20
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/main.fmf
+74
file added
tests/Regression/bz806474-eu-unstrip-unwilling-to-reassembled-corrupted/runtest.sh
+64
file added
tests/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line/Makefile
+5
file added
tests/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line/PURPOSE
+0
file added
tests/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line/a.out
+15
file added
tests/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line/main.fmf
+60
file added
tests/Regression/bz917874-RHDT-Assertion-failure-in-eu-addr2line/runtest.sh
+64
file added
tests/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines/Makefile
+5
file added
tests/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines/PURPOSE
+17
file added
tests/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines/main.fmf
+56
file added
tests/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines/runtest.sh
+0
file added
tests/Regression/bz927626-RHDT-Stack-overflow-in-dwarf-getsrclines/vpoolengineUS.bz2
+64
file added
tests/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line/Makefile
+5
file added
tests/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line/PURPOSE
+15
file added
tests/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line/main.fmf
+82
file added
tests/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line/proc_maps.txt
+53
file added
tests/Regression/bz967130-RHDT-eu-unstrip-M-abort-on-socket-line/runtest.sh
+64
file added
tests/Regression/elfutils-default-yama-scope-scriptlet-failed/Makefile
+5
file added
tests/Regression/elfutils-default-yama-scope-scriptlet-failed/PURPOSE
+15
file added
tests/Regression/elfutils-default-yama-scope-scriptlet-failed/main.fmf
+44
file added
tests/Regression/elfutils-default-yama-scope-scriptlet-failed/runtest.sh
+64
file added
tests/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in/Makefile
+0
file added
tests/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in/POC2
+5
file added
tests/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in/PURPOSE
+15
file added
tests/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in/main.fmf
+39
file added
tests/Regression/elfutils-segmentation-fault-in-elf64-xlatetom-in/runtest.sh
+64
file added
tests/Regression/eu-readelf-reports-machine-type-is-unknown/Makefile
+5
file added
tests/Regression/eu-readelf-reports-machine-type-is-unknown/PURPOSE
+16
file added
tests/Regression/eu-readelf-reports-machine-type-is-unknown/main.fmf
+50
file added
tests/Regression/eu-readelf-reports-machine-type-is-unknown/runtest.sh
+64
file added
tests/Regression/eu-strip-generates-empty-output-if/Makefile
+5
file added
tests/Regression/eu-strip-generates-empty-output-if/PURPOSE
+15
file added
tests/Regression/eu-strip-generates-empty-output-if/main.fmf
+52
file added
tests/Regression/eu-strip-generates-empty-output-if/runtest.sh
+65
file added
tests/Regression/eu-strip-invalid-section-alignment-while/Makefile
+5
file added
tests/Regression/eu-strip-invalid-section-alignment-while/PURPOSE
+17
file added
tests/Regression/eu-strip-invalid-section-alignment-while/main.fmf
+66
file added
tests/Regression/eu-strip-invalid-section-alignment-while/runtest.sh
+16
file added
tests/Regression/eu-strip-invalid-section-alignment-while/testinfo.desc
+115
file added
tests/Regression/eu-strip-invalid-section-alignment-while/testprog.c
+12
file added
tests/Regression/eu-strip-invalid-section-alignment-while/testprog2.c
+64
file added
tests/Regression/initial-DWARF5-support-in-eu-readelf/Makefile
+5
file added
tests/Regression/initial-DWARF5-support-in-eu-readelf/PURPOSE
+15
file added
tests/Regression/initial-DWARF5-support-in-eu-readelf/main.fmf
+36
file added
tests/Regression/initial-DWARF5-support-in-eu-readelf/runtest.sh
+0
file added
tests/Regression/initial-DWARF5-support-in-eu-readelf/test3-clang.o
+64
file added
tests/Regression/require-compression-libraries/Makefile
+5
file added
tests/Regression/require-compression-libraries/PURPOSE
+16
file added
tests/Regression/require-compression-libraries/main.fmf
+38
file added
tests/Regression/require-compression-libraries/runtest.sh
+5
file added
tests/Regression/require-compression-libraries/t.c
+64
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/Makefile
+5
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/PURPOSE
+0
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/crashes/id_000001,sig_11,src_001936,op_flip1,pos_1100
+0
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/crashes/id_000001,sig_11,src_002816,op_int16,pos_370,val_+1024
+0
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/crashes/id_000002,src_001890,op_flip4,pos_371
+0
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/crashes/id_000006,src_001890,op_arith8,pos_371,val_+14
+0
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/crashes/id_000011,src_001899,op_flip1,pos_371
+15
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/main.fmf
+44
file added
tests/Regression/robustify-elfutils-0-172-against-bad-DWARF5-data/runtest.sh
+70
file added
tests/Regression/rpmtests/Makefile
+3
file added
tests/Regression/rpmtests/PURPOSE
+41
file added
tests/Regression/rpmtests/main.fmf
+71
file added
tests/Regression/rpmtests/runtest.sh
+64
file added
tests/Regression/static-relocations-not-known-to-older-linkers/Makefile
+5
file added
tests/Regression/static-relocations-not-known-to-older-linkers/PURPOSE
+15
file added
tests/Regression/static-relocations-not-known-to-older-linkers/main.fmf
+47
file added
tests/Regression/static-relocations-not-known-to-older-linkers/runtest.sh
+65
file added
tests/Sanity/elfutils-debuginfod/Makefile
+3
file added
tests/Sanity/elfutils-debuginfod/PURPOSE
+81
file added
tests/Sanity/elfutils-debuginfod/body.sh
+18
file added
tests/Sanity/elfutils-debuginfod/main.fmf
+68
file added
tests/Sanity/elfutils-debuginfod/runtest.sh
+0
file added
tests/Sanity/elfutils-debuginfod/sshpass-debuginfo-1.06-2.el8.x86_64.rpm
+66
file added
tests/Sanity/yama-scope/Makefile
+5
file added
tests/Sanity/yama-scope/PURPOSE
+15
file added
tests/Sanity/yama-scope/main.fmf
+8
file added
tests/Sanity/yama-scope/ptrace-scope-test.sh
+101
file added
tests/Sanity/yama-scope/runtest.sh
+64
file added
tests/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read/Makefile
+5
file added
tests/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read/PURPOSE
+0
file added
tests/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read/addr2line-buffer-over-flow1
+16
file added
tests/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read/main.fmf
+39
file added
tests/Security/CVE-2018-16062-elfutils-Heap-based-buffer-over-read/runtest.sh
+0
file added
tests/Security/CVE-2018-16402-double-free-due-to-double-decompression/Double-free-libelf
+65
file added
tests/Security/CVE-2018-16402-double-free-due-to-double-decompression/Makefile
+5
file added
tests/Security/CVE-2018-16402-double-free-due-to-double-decompression/PURPOSE
+16
file added
tests/Security/CVE-2018-16402-double-free-due-to-double-decompression/main.fmf
+42
file added
tests/Security/CVE-2018-16402-double-free-due-to-double-decompression/runtest.sh
+0
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/Buffer-over-readelf
+65
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/Makefile
+5
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/PURPOSE
+25
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/bz1532205.supp
+16
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/main.fmf
+43
file added
tests/Security/CVE-2018-16403-heap-based-buffer-over-read-in-libdw-dwarf_getabbrev-c/runtest.sh
+64
file added
tests/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference/Makefile
+0
file added
tests/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference/POC-stack
+5
file added
tests/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference/PURPOSE
+15
file added
tests/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference/main.fmf
+39
file added
tests/Security/CVE-2018-18310-elfutils-invalid-memory-address-dereference/runtest.sh
+64
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/Makefile
+0
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/POC-stack
+5
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/PURPOSE
+25
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/bz1532205.supp
+16
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/main.fmf
+42
file added
tests/Security/CVE-2018-18310-invalid-memory-address-dereference/runtest.sh
+64
file added
tests/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files/Makefile
+0
file added
tests/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files/POC1
+3
file added
tests/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files/PURPOSE
+13
file added
tests/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files/main.fmf
+38
file added
tests/Security/CVE-2018-18520-elfutils-eu-size-cannot-handle-recursive-ar-files/runtest.sh
+64
file added
tests/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files/Makefile
+0
file added
tests/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files/POC2
+5
file added
tests/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files/PURPOSE
+16
file added
tests/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files/main.fmf
+42
file added
tests/Security/CVE-2018-18520-eu-size-cannot-handle-recursive-ar-files/runtest.sh
+64
file added
tests/Security/CVE-2018-18521-divide-by-zero/Makefile
+0
file added
tests/Security/CVE-2018-18521-divide-by-zero/POC2
+5
file added
tests/Security/CVE-2018-18521-divide-by-zero/PURPOSE
+16
file added
tests/Security/CVE-2018-18521-divide-by-zero/main.fmf
+43
file added
tests/Security/CVE-2018-18521-divide-by-zero/runtest.sh
+64
file added
tests/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c/Makefile
+0
file added
tests/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c/POC2
+5
file added
tests/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c/PURPOSE
+15
file added
tests/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c/main.fmf
+38
file added
tests/Security/CVE-2018-18521-elfutils-Divide-by-zero-in-arlib_add_symbols-function-in-arlib-c/runtest.sh
+64
file added
tests/Security/CVE-2019-7146/Makefile
+3
file added
tests/Security/CVE-2019-7146/PURPOSE
+14
file added
tests/Security/CVE-2019-7146/main.fmf
+0
file added
tests/Security/CVE-2019-7146/poc
+41
file added
tests/Security/CVE-2019-7146/runtest.sh
+64
file added
tests/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read/Makefile
+0
file added
tests/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read/POC1
+5
file added
tests/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read/PURPOSE
+16
file added
tests/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read/main.fmf
+43
file added
tests/Security/CVE-2019-7149-elfutils-heap-based-buffer-over-read/runtest.sh
+64
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/Makefile
+0
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/POC1
+0
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/POC2
+5
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/PURPOSE
+16
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/main.fmf
+40
file added
tests/Security/CVE-2019-7150-segmentation-fault-in-elf64_xlatetom/runtest.sh
+64
file added
tests/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note/Makefile
+0
file added
tests/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note/POC
+5
file added
tests/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note/PURPOSE
+16
file added
tests/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note/main.fmf
+40
file added
tests/Security/CVE-2019-7664-Out-of-bound-write-in-elf_cvt_note/runtest.sh
+64
file added
tests/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom/Makefile
+0
file added
tests/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom/POC2
+5
file added
tests/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom/PURPOSE
+16
file added
tests/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom/main.fmf
+41
file added
tests/Security/CVE-2019-7665-heap-based-buffer-over-read-in-function-elf32_xlatetom/runtest.sh
+63
file added
tests/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow/Makefile
+5
file added
tests/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow/PURPOSE
+0
file added
tests/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow/dwz-overflow.elf
+16
file added
tests/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow/main.fmf
+57
file added
tests/Security/bz1139128-CVE-2014-0172-elfutils-integer-overflow/runtest.sh
+48
file added
tests/testsuite/Makefile
+2
file added
tests/testsuite/PURPOSE
+133
file added
tests/testsuite/main.fmf
+47
file added
tests/testsuite/runtest.sh