diff --git a/.gcc-toolset-15-gdb.metadata b/.gcc-toolset-15-gdb.metadata new file mode 100644 index 0000000..beb0126 --- /dev/null +++ b/.gcc-toolset-15-gdb.metadata @@ -0,0 +1 @@ +ac4b56773e6abe4a5467a0708a185b4279e8faf4 SOURCES/gdb-16.3.tar.xz diff --git a/.gitignore b/.gitignore index 493e462..22a1172 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/gdb-16.2.tar.xz -/gdb-16.3.tar.xz +SOURCES/gdb-16.3.tar.xz diff --git a/README.local-patches.md b/README.local-patches.md deleted file mode 100644 index fc2eb90..0000000 --- a/README.local-patches.md +++ /dev/null @@ -1,104 +0,0 @@ -# Fedora GDB local patches policy - -In order to make things easier for the Fedora GDB maintainer, we -choose to auto-generate the local patches by making use of an upstream -git repository. Below you can find a few instructions on how to work -using this method. - -You need to run the following commands from the directory that -contains the "gdb.spec" file. - -## Importing the GDB patches into a git repository - -1) The local patches (`*.patch`) need to be imported into an upstream -git repository. For example, let's assume you cloned the repository -by doing: - -`$ git clone git://sourceware.org/git/binutils-gdb.git` - -> TIP: if you already have the repository cloned somewhere in your -> system, you can pass a "--reference " to the "git clone" -> command and it will use your local repository as much as possible -> to make the clone, speeding up things. - -2) After cloning the upstream repository, you can import your patches -by using the script "generate-git-repo-from-patches.sh": - -`$ sh generate-git-repo-from-patches.sh ` - -The script will basically cd into the repository, checkout the -revision specified in the file `_git_upstream_commit`, iterate through -the file `_patch_order` and "git-am" every patch *in that order*. -This operation should complete without errors; if you find a problem -with `git-am`, it probably means that the revision specified in the -file `_git_upstream_commit` is wrong. - -## Rebasing the patches against a newer version/release - -1) First, cd into the upstream repository. All you have to do is -choose the revision against which you plan to rebase the patches, and -`git rebase `. git will do the rest, and you will be able -to perform conflict resolution by git's algorithm, which is smarter. - -## Creating new patches - -1) Create the new patch on top of the the others, as usual. Note that -you can use `git rebase` whenever you want to reorder patch order, or -even to delete a patch. - -2) When writing the commit log, you must obey a few rules. The -subject line *must* be the filename of the patch. This line will be -used when exporting the patches from the git repository, and -(obviously) it gives the filename that should be used for this -specific patch. - -3) You can also add comments that will go into the auto-generated -`Patch:` file (see below). To do that, use the special marker `;;` at -the beginning of the line. This way, a commit log that says: - -~~~~~~~~~~~ - test-patch.patch - - ;; This is a test patch - ;; Second line -~~~~~~~~~~~ - -Will generate the following entry in the auto-generated `Patch:` file: - -~~~~~~~~~~~ - # This is a test patch - # Second line - PatchXYZ: test-patch.patch -~~~~~~~~~~~ - -## Exporting the GDB patches from the git repository - -1) When you're done working with the patches, go back to the directory -that contains the `gdb.spec` file, and from there you run: - -`$ sh generate-patches-from-git-repo.sh ` - -This will regenerate all of the `*.patch` files (excluding the ones that -were also excluded from the git repository), and also regenerate a few -control files. These control files are: - - - `_gdb.spec.Patch.include`: This file contains the `Patch:` directives. - - - `_gdb.spec.patch.include`: This file contains the `%patch` directives. - - - `_patch_order`: This file contains the patches, in the exact order - that they must be applied. It is used when importing the patches - into the git repository. - - - `_git_upstream_commit`: This file contains the last upstream commit - against which the patches were rebased. It is used when importing - the patches into the git repository. - -NOTE: If you did a rebase against a newer upstream version, you need -to specify the commit/tag/branch against which you rebased: - -`$ sh generate-patches-from-git-repo.sh ` - -For example, if you rebased against `gdb-8.1-release`: - -`$ sh generate-patches-from-git-repo.sh gdb-8.1-release` diff --git a/_gdb.spec.Patch.include b/SOURCES/_gdb.spec.Patch.include similarity index 100% rename from _gdb.spec.Patch.include rename to SOURCES/_gdb.spec.Patch.include diff --git a/_gdb.spec.patch.include b/SOURCES/_gdb.spec.patch.include similarity index 100% rename from _gdb.spec.patch.include rename to SOURCES/_gdb.spec.patch.include diff --git a/gdb-6.3-mapping-zero-inode-test.patch b/SOURCES/gdb-6.3-mapping-zero-inode-test.patch similarity index 100% rename from gdb-6.3-mapping-zero-inode-test.patch rename to SOURCES/gdb-6.3-mapping-zero-inode-test.patch diff --git a/gdb-6.3-rh-testversion-20041202.patch b/SOURCES/gdb-6.3-rh-testversion-20041202.patch similarity index 100% rename from gdb-6.3-rh-testversion-20041202.patch rename to SOURCES/gdb-6.3-rh-testversion-20041202.patch diff --git a/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch b/SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch similarity index 100% rename from gdb-6.5-bz218379-ppc-solib-trampoline-test.patch rename to SOURCES/gdb-6.5-bz218379-ppc-solib-trampoline-test.patch diff --git a/gdb-6.5-gcore-buffer-limit-test.patch b/SOURCES/gdb-6.5-gcore-buffer-limit-test.patch similarity index 100% rename from gdb-6.5-gcore-buffer-limit-test.patch rename to SOURCES/gdb-6.5-gcore-buffer-limit-test.patch diff --git a/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch b/SOURCES/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch similarity index 100% rename from gdb-6.6-bz237572-ppc-atomic-sequence-test.patch rename to SOURCES/gdb-6.6-bz237572-ppc-atomic-sequence-test.patch diff --git a/gdb-6.8-bz466901-backtrace-full-prelinked.patch b/SOURCES/gdb-6.8-bz466901-backtrace-full-prelinked.patch similarity index 100% rename from gdb-6.8-bz466901-backtrace-full-prelinked.patch rename to SOURCES/gdb-6.8-bz466901-backtrace-full-prelinked.patch diff --git a/gdb-add-index.patch b/SOURCES/gdb-add-index.patch similarity index 100% rename from gdb-add-index.patch rename to SOURCES/gdb-add-index.patch diff --git a/gdb-add-rpm-suggestion-script.patch b/SOURCES/gdb-add-rpm-suggestion-script.patch similarity index 100% rename from gdb-add-rpm-suggestion-script.patch rename to SOURCES/gdb-add-rpm-suggestion-script.patch diff --git a/gdb-archer-next-over-throw-cxx-exec.patch b/SOURCES/gdb-archer-next-over-throw-cxx-exec.patch similarity index 100% rename from gdb-archer-next-over-throw-cxx-exec.patch rename to SOURCES/gdb-archer-next-over-throw-cxx-exec.patch diff --git a/gdb-gstack.man b/SOURCES/gdb-gstack.man similarity index 100% rename from gdb-gstack.man rename to SOURCES/gdb-gstack.man diff --git a/gdb-orphanripper.c b/SOURCES/gdb-orphanripper.c similarity index 100% rename from gdb-orphanripper.c rename to SOURCES/gdb-orphanripper.c diff --git a/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch b/SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch similarity index 100% rename from gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch rename to SOURCES/gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch diff --git a/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch b/SOURCES/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch similarity index 100% rename from gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch rename to SOURCES/gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch diff --git a/gdb-rhbz1149205-catch-syscall-after-fork-test.patch b/SOURCES/gdb-rhbz1149205-catch-syscall-after-fork-test.patch similarity index 100% rename from gdb-rhbz1149205-catch-syscall-after-fork-test.patch rename to SOURCES/gdb-rhbz1149205-catch-syscall-after-fork-test.patch diff --git a/gdb-rhel-50069-support-z17.patch b/SOURCES/gdb-rhel-50069-support-z17.patch similarity index 100% rename from gdb-rhel-50069-support-z17.patch rename to SOURCES/gdb-rhel-50069-support-z17.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch diff --git a/gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch b/SOURCES/gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch similarity index 100% rename from gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch rename to SOURCES/gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch diff --git a/gdbinit b/SOURCES/gdbinit similarity index 100% rename from gdbinit rename to SOURCES/gdbinit diff --git a/gdb.spec b/SPECS/gdb.spec similarity index 100% rename from gdb.spec rename to SPECS/gdb.spec diff --git a/_git_upstream_commit b/_git_upstream_commit deleted file mode 100644 index 1e79418..0000000 --- a/_git_upstream_commit +++ /dev/null @@ -1 +0,0 @@ -140ba011c003fda0fb2f746cf2bc0f010bf4ac03 diff --git a/_patch_order b/_patch_order deleted file mode 100644 index 182771b..0000000 --- a/_patch_order +++ /dev/null @@ -1,26 +0,0 @@ -gdb-6.3-rh-testversion-20041202.patch -gdb-6.5-bz218379-ppc-solib-trampoline-test.patch -gdb-6.6-bz237572-ppc-atomic-sequence-test.patch -gdb-6.5-gcore-buffer-limit-test.patch -gdb-6.3-mapping-zero-inode-test.patch -gdb-6.8-bz466901-backtrace-full-prelinked.patch -gdb-archer-next-over-throw-cxx-exec.patch -gdb-rhbz-818343-set-solib-absolute-prefix-testcase.patch -gdb-rhbz1149205-catch-syscall-after-fork-test.patch -gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch -gdb-add-index.patch -gdb-add-rpm-suggestion-script.patch -gdb-rhel-50069-support-z17.patch -gdb-rhel-7329-vandps-clobbers-registers-1-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-2-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-3-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-4-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-5-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-6-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-7-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-8-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-9-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-10-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-11-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-12-of-13.patch -gdb-rhel-7329-vandps-clobbers-registers-13-of-13.patch diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index 3d72708..0000000 --- a/gating.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- !Policy -product_versions: - - rhel-8 -decision_context: osci_compose_gate -rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-fast-lane.functional} - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.gate-build-slow-lane.functional} diff --git a/generate-git-repo-from-patches.sh b/generate-git-repo-from-patches.sh deleted file mode 100755 index 8646c4e..0000000 --- a/generate-git-repo-from-patches.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/sh - -# Generic function to print an error message and bail out. -die () -{ - echo $1 > /dev/stderr - exit 1 -} - -# Print usage -usage () -{ - cat < - - is the directory where the rebase was performed. You -need to clone the repository first. - -Options are: - - -h: Print this message - -u: Uncommit all patches and initialize stgit repo -EOF - exit 0 -} - -test -f gdb.spec || die "This script needs to run from the same directory as gdb.spec." - -test -z $1 && die "You need to specify the repository." -test "$1" = "-h" && usage - -uncommit=0 -if [ "$1" = "-u" ]; then - command -v stg > /dev/null 2>&1 \ - || die "Cannot find stg. Is stgit installed?" - uncommit=1 - shift -fi - -git_repo=$1 -if [ ! -e $git_repo ]; then - echo "$0: repository \"$git_repo\" does not exist" - exit 1 -fi - -test -f _git_upstream_commit || die "Cannot find _git_upstream_commit file." -test -f _patch_order || die "Cannot find _patch_order file." - -last_ancestor_commit=`cat _git_upstream_commit` - -f=`pwd` -cd $1 - -git name-rev $last_ancestor_commit -test $? -eq 0 || die "Could not find $last_ancestor_commit in the repository $1. Did you run 'git fetch'?" - - -# Create a branch for the checkout if using stgit; use the distro name in -# the name of this branch. -if (($uncommit)); then - name=devel-`basename $f` - branch="-b $name" -else - branch="" -fi -git checkout $branch $last_ancestor_commit - -echo "Applying patches..." -for p in `cat $f/_patch_order` ; do - git am $f/$p - test $? -eq 0 || die "Could not apply patch '$p'." -done - -if (($uncommit)); then - echo "Uncommitting patches..." - stg init - stg uncommit -t $last_ancestor_commit -x -fi diff --git a/generate-patches-from-git-repo.sh b/generate-patches-from-git-repo.sh deleted file mode 100755 index 1937a3c..0000000 --- a/generate-patches-from-git-repo.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh - -# Generic function to print an error message and bail out. -die () -{ - echo $1 > /dev/stderr - exit 1 -} - -# Print usage -usage () -{ - cat < [] - - is the directory where the rebase was performed. - - is the commit or tag or branch against which -the rebase was performed. It generally just needs to be provided if -the file "_git_upstream_commit" doesn't exist, or if you are doing a -rebase. This script will then use 'git merge-base' to find the most -recent common ancestor between HEAD and COMMIT_OR_TAG_OR_BRANCH. - -Options are: - - -h: Print this message -EOF - exit 0 -} - -test -f gdb.spec || die "This script needs to run from the same directory as gdb.spec." - -test -z $1 && die "You need to specify the repository." -test "$1" = "-h" && usage - -commit_or_tag="`cat _git_upstream_commit`" -if test ! -z "$2" ; then - commit_or_tag="$2" -fi - -test -z $commit_or_tag && die "Because the '_git_upstream_commit' file doesn't exist, you need to specify a commit/tag/branch." - -test -d $1 || die "$1 is not a directory." - -# Remove all the current patches -for f in `cat _patch_order` ; do - git rm -f $f -done - -orig_dir=`pwd` -cd $1 - -# If patches were uncommitted when the patches were applied, -# make sure that we're sitting at the top-most patch. Otherwise -# we'll only add patches up to the current top patch. -# It's safe to just assume stgit was used -- the push will simply -# fail. -stg push --all > /dev/null 2>&1 - -git name-rev $commit_or_tag -test $? -eq 0 || die "Could not find $commit_or_tag in the repository. Did you run 'git fetch'?" - -idx=1 -common_ancestor=`git merge-base HEAD $commit_or_tag` - -test -z "$common_ancestor" && die "Could not find common ancestor between HEAD and $commit_or_tag." - -temp_PATCH_file=/tmp/_gdb.spec.Patch.include -temp_patch_file=/tmp/_gdb.spec.patch.include -temp_patch_order_file=/tmp/_patch_order - -rm -f $temp_PATCH_file $temp_patch_file $temp_patch_order_file - -for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do - fname=`git log -1 --pretty='format:%s' $c` - test -z $fname && die "Could not determine filename for commit $c." - # Because git-format-patch generates patches with the first line - # containing the commit hash, every time we do a git-format-patch - # here we will have a different .patch file from what we had - # before, even if nothing has changed. This is bad, so we replace - # the commit hash by something constant (the string - # "FEDORA_PATCHES"). - # - # Also, different users, or systems, might configure git in - # different ways (e.g. the diff.*.xfuncname setting), which can - # mean the generated diff files will change from system to system. - # Avoid this by disabling all config file reading, this relies on - # git 2.32 or later. - GIT_CONFIG_SYSTEM=/dev/null GIT_CONFIG_GLOBAL=/dev/null \ - git format-patch --no-base --no-thread --no-signature --no-stat \ - --keep-subject -1 --stdout $c \ - | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' \ - -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > $orig_dir/$fname - (cd $orig_dir && git add $fname) - - cat >> $temp_PATCH_file <> $temp_PATCH_file - printf "%%patch -p1 -P%03d\n" $idx >> $temp_patch_file - echo $fname >> $temp_patch_order_file - idx=`expr $idx + 1` -done - -cd $orig_dir -mv $temp_PATCH_file _gdb.spec.Patch.include -mv $temp_patch_file _gdb.spec.patch.include -mv $temp_patch_order_file _patch_order -echo "$common_ancestor" > _git_upstream_commit diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index 85710d6..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf - directory: tests -execute: - how: tmt diff --git a/sources b/sources deleted file mode 100644 index a86cf9b..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (gdb-16.3.tar.xz) = fffd6689c3405466a179670b04720dc825e4f210a761f63dd2b33027432f8cd5d1c059c431a5ec9e165eedd1901220b5329d73c522f9a444788888c731b29e9c diff --git a/tests/gdb-testsuite-sanity/Makefile b/tests/gdb-testsuite-sanity/Makefile deleted file mode 100644 index c74a922..0000000 --- a/tests/gdb-testsuite-sanity/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/gdb/Sanity/gdb-testsuite-sanity -# Description: gdb testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/gdb/Sanity/gdb-testsuite-sanity -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE ref - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -.SILENT: ref_file -ref_file: ./ref/gen.sh - test -x ./ref/gen.sh || chmod a+x ./ref/gen.sh - ./ref/gen.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Michal Kolar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: gdb testing by upstream testsuite" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 1h" >> $(METADATA) - @echo "RunFor: gdb" >> $(METADATA) - @echo "Requires: gdb rpm-build yum-utils dejagnu make gcc gcc-gfortran glibc" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/gdb-testsuite-sanity/PURPOSE b/tests/gdb-testsuite-sanity/PURPOSE deleted file mode 100644 index 83d868f..0000000 --- a/tests/gdb-testsuite-sanity/PURPOSE +++ /dev/null @@ -1,30 +0,0 @@ -PURPOSE of /tools/gdb/Sanity/gdb-testsuite-sanity -Description: gdb testing by upstream testsuite -Author: Michal Kolar - -By default, testsuite is executed with default options for the package that -corresponds to the gdb command by newly created ordinary user. Before -executing, the testsuite is reduced by the appropriate reference file that -defines the allowed test range. - -Executing can be modified by these variables: - * BUILD_USER -- user which will be used for building and testing gdb - * PACKAGE -- explicitly defines which rpm package should be tested - * RUNTESTFLAGS -- variable which will be forwarded to 'make check' command - and can be used to reduce the range of testing - * TESTS_COUNT_MIN -- minimum number of cases that should be tested (does not - affect the triggering of testcases, it only sets the - value of the reference comparator) - -Example: - $ BUILD_USER=root \ - PACKAGE=gdb \ - RUNTESTFLAGS='GDB=/usr/bin/gdb gdb.base/break*.exp' \ - TESTS_COUNT_MIN=32 make run - -Reference files instructions: - * path of reference file for current package, distribution and architecture - can be generated by: - $ make ref_file - or directly by: - $ ./ref/gen.sh diff --git a/tests/gdb-testsuite-sanity/main.fmf b/tests/gdb-testsuite-sanity/main.fmf deleted file mode 100644 index 7bcec74..0000000 --- a/tests/gdb-testsuite-sanity/main.fmf +++ /dev/null @@ -1,46 +0,0 @@ -summary: gdb testing by upstream testsuite -description: | - By default, testsuite is executed with default options for the package that - corresponds to the gdb command by newly created ordinary user. Before - executing, the testsuite is reduced by the appropriate reference file that - defines the allowed test range. - - Executing can be modified by these variables: - * BUILD_USER -- user which will be used for building and testing gdb - * PACKAGE -- explicitly defines which rpm package should be tested - * RUNTESTFLAGS -- variable which will be forwarded to 'make check' command - and can be used to reduce the range of testing - * TESTS_COUNT_MIN -- minimum number of cases that should be tested (does not - affect the triggering of testcases, it only sets the - value of the reference comparator) - - Example: - $ BUILD_USER=root \ - PACKAGE=gdb \ - RUNTESTFLAGS='GDB=/usr/bin/gdb gdb.base/break*.exp' \ - TESTS_COUNT_MIN=32 make run - - Reference files instructions: - * path of reference file for current package, distribution and architecture - can be generated by: - $ make ref_file - or directly by: - $ ./ref/gen.sh -contact: Michal Kolar -component: -- gdb -test: ./runtest.sh -framework: beakerlib -recommend: -- gdb -- rpm-build -- yum-utils -- dejagnu -- make -- gcc -- gcc-gfortran -- glibc -- glibc-debuginfo -duration: 1h -extra-summary: /tools/gdb/Sanity/gdb-testsuite-sanity -extra-task: /tools/gdb/Sanity/gdb-testsuite-sanity diff --git a/tests/gdb-testsuite-sanity/ref/default b/tests/gdb-testsuite-sanity/ref/default deleted file mode 100644 index 133c3dd..0000000 --- a/tests/gdb-testsuite-sanity/ref/default +++ /dev/null @@ -1,430 +0,0 @@ -gdb.base/advance-until-multiple-locations.exp -gdb.base/alias.exp -gdb.base/align-c.exp -gdb.base/annota-input-while-running.exp -gdb.base/anon.exp -gdb.base/args.exp -gdb.base/arrayidx.exp -gdb.base/attach-non-pgrp-leader.exp -gdb.base/attach-pie-noexec.exp -gdb.base/attach-twice.exp -gdb.base/attach-wait-input.exp -gdb.base/auto-load.exp -gdb.base/bang.exp -gdb.base/batch-exit-status.exp -gdb.base/bfp-test.exp -gdb.base/bg-execution-repeat.exp -gdb.base/bitfields2.exp -gdb.base/bitfields.exp -gdb.base/bitops.exp -gdb.base/bp-cmds-execution-x-script.exp -gdb.base/branch-to-self.exp -gdb.base/break-always.exp -gdb.base/break-caller-line.exp -gdb.base/break-include.exp -gdb.base/break-inline.exp -gdb.base/break-main-file-remove-fail.exp -gdb.base/break-on-linker-gcd-function.exp -gdb.base/breakpoint-shadow.exp -gdb.base/break-probes.exp -gdb.base/cached-source-file.exp -gdb.base/callexit.exp -gdb.base/call-strs.exp -gdb.base/catch-follow-exec.exp -gdb.base/catch-gdb-caused-signals.exp -gdb.base/catch-signal-fork.exp -gdb.base/catch-signal-siginfo-cond.exp -gdb.base/check-psymtab.exp -gdb.base/c-linkage-name.exp -gdb.base/code_elim.exp -gdb.base/command-line-input.exp -gdb.base/compare-sections.exp -gdb.base/complex.exp -gdb.base/comprdebug.exp -gdb.base/consecutive-step-over.exp -gdb.base/continue-all-already-running.exp -gdb.base/coredump-filter.exp -gdb.base/corefile2.exp -gdb.base/cursal.exp -gdb.base/datalib.exp -gdb.base/dcache-line-read-error.exp -gdb.base/default-args.exp -gdb.base/define.exp -gdb.base/disabled-location.exp -gdb.base/disasm-end-cu.exp -gdb.base/disasm-optim.exp -gdb.base/double-prompt-target-event-error.exp -gdb.base/dprintf-detach.exp -gdb.base/dprintf-next.exp -gdb.base/dprintf-non-stop.exp -gdb.base/dprintf-pending.exp -gdb.base/dso2dso.exp -gdb.base/dump.exp -gdb.base/dup-sect.exp -gdb.base/echo.exp -gdb.base/empty_exe.exp -gdb.base/endian.exp -gdb.base/endianity.exp -gdb.base/enumval.exp -gdb.base/environ.exp -gdb.base/eu-strip-infcall.exp -gdb.base/eval.exp -gdb.base/examine-backward.exp -gdb.base/exec-invalid-sysroot.exp -gdb.base/execution-termios.exp -gdb.base/exe-lock.exp -gdb.base/exitsignal.exp -gdb.base/expand-psymtabs.exp -gdb.base/filesym.exp -gdb.base/find-unmapped.exp -gdb.base/fixsection.exp -gdb.base/flexible-array-member.exp -gdb.base/float.exp -gdb.base/floatn.exp -gdb.base/focus-cmd-prev.exp -gdb.base/foll-exec.exp -gdb.base/foll-exec-mode.exp -gdb.base/fortran-sym-case.exp -gdb.base/frame-selection.exp -gdb.base/freebpcmd.exp -gdb.base/fullname.exp -gdb.base/fullpath-expand.exp -gdb.base/func-ptr.exp -gdb.base/gcore-buffer-overflow.exp -gdb.base/gcore-relro.exp -gdb.base/gdb1056.exp -gdb.base/gdb1090.exp -gdb.base/gdb11530.exp -gdb.base/gdb11531.exp -gdb.base/gdb1250.exp -gdb.base/gdb1555.exp -gdb.base/gdb1821.exp -gdb.base/gdbhistsize-history.exp -gdb.base/gdb-sigterm-2.exp -gdb.base/hashline2.exp -gdb.base/hashline3.exp -gdb.base/hbreak.exp -gdb.base/hbreak-unmapped.exp -gdb.base/help.exp -gdb.base/history-duplicates.exp -gdb.base/hook-stop.exp -gdb.base/huge.exp -gdb.base/hw-sw-break-same-address.exp -gdb.base/ifelse.exp -gdb.base/index-cache.exp -gdb.base/infcall-input.exp -gdb.base/infcall-nested-structs-c++.exp -gdb.base/infcall-nested-structs-c.exp -gdb.base/infnan.exp -gdb.base/infoline.exp -gdb.base/info-locals-unused-static-var.exp -gdb.base/info_minsym.exp -gdb.base/info-proc.exp -gdb.base/info-program.exp -gdb.base/info_qt.exp -gdb.base/info-shared.exp -gdb.base/info_sources.exp -gdb.base/info-target.exp -gdb.base/info-types-c++.exp -gdb.base/info-types-c.exp -gdb.base/info-var.exp -gdb.base/interact.exp -gdb.base/interrupt-daemon-attach.exp -gdb.base/interrupt-daemon.exp -gdb.base/interrupt-noterm.exp -gdb.base/jit-attach-pie.exp -gdb.base/jit-reader-exec.exp -gdb.base/jit-reader-simple.exp -gdb.base/jump.exp -gdb.base/kill-detach-inferiors-cmd.exp -gdb.base/killed-outside.exp -gdb.base/label.exp -gdb.base/label-without-address.exp -gdb.base/largecore-last-address-lock.exp -gdb.base/lineinc.exp -gdb.base/lineno-makeup.exp -gdb.base/linespecs.exp -gdb.base/line-symtabs.exp -gdb.base/list-ambiguous.exp -gdb.base/list-missing-source.exp -gdb.base/logical.exp -gdb.base/longest-types.exp -gdb.base/longjmp.exp -gdb.base/long_long.exp -gdb.base/maint-expand-symbols-header-file.exp -gdb.base/maint-target-async-off.exp -gdb.base/many-completions.exp -gdb.base/many-headers.exp -gdb.base/max-depth-c++.exp -gdb.base/max-depth-c.exp -gdb.base/max-value-size.exp -gdb.base/memattr.exp -gdb.base/mips_pro.exp -gdb.base/move-dir.exp -gdb.base/msym-lang.exp -gdb.base/nested-addr.exp -gdb.base/nextoverexit.exp -gdb.base/nodebug.exp -gdb.base/noreturn-finish.exp -gdb.base/noreturn-return.exp -gdb.base/offsets.exp -gdb.base/osabi.exp -gdb.base/overlays.exp -gdb.base/page.exp -gdb.base/paginate-after-ctrl-c-running.exp -gdb.base/paginate-bg-execution.exp -gdb.base/paginate-execution-startup.exp -gdb.base/paginate-inferior-exit.exp -gdb.base/pc-fp.exp -gdb.base/permissions.exp -gdb.base/pr10179.exp -gdb.base/pretty-print.exp -gdb.base/prologue.exp -gdb.base/prologue-include.exp -gdb.base/psym-external-decl.exp -gdb.base/psymtab.exp -gdb.base/ptr-typedef.exp -gdb.base/quit.exp -gdb.base/quit-live.exp -gdb.base/randomize.exp -gdb.base/random-signal.exp -gdb.base/readline-overflow.exp -gdb.base/reggroups.exp -gdb.base/remote-exec-file.exp -gdb.base/remote.exp -gdb.base/remotetimeout.exp -gdb.base/reread-readsym.exp -gdb.base/return.exp -gdb.base/return-nodebug.exp -gdb.base/run-after-attach.exp -gdb.base/save-bp.exp -gdb.base/sect-cmd.exp -gdb.base/sep.exp -gdb.base/sepsymtab.exp -gdb.base/server-del-break.exp -gdb.base/set-inferior-tty.exp -gdb.base/set-lang-auto.exp -gdb.base/set-noassign.exp -gdb.base/set-solib-absolute-prefix.exp -gdb.base/shell.exp -gdb.base/shreloc.exp -gdb.base/sigall.exp -gdb.base/sigchld.exp -gdb.base/signest.exp -gdb.base/sigrepeat.exp -gdb.base/skip-inline.exp -gdb.base/solib-disc.exp -gdb.base/solib-nodir.exp -gdb.base/solib-probes-nosharedlibrary.exp -gdb.base/solib-vanish.exp -gdb.base/source-execution.exp -gdb.base/source.exp -gdb.base/sss-bp-on-user-bp.exp -gdb.base/stale-infcall.exp -gdb.base/start.exp -gdb.base/startup-with-shell.exp -gdb.base/statistics.exp -gdb.base/step-resume-infcall.exp -gdb.base/step-sw-breakpoint-adjust-pc.exp -gdb.base/step-symless.exp -gdb.base/step-test.exp -gdb.base/structs2.exp -gdb.base/structs3.exp -gdb.base/style.exp -gdb.base/style-logging.exp -gdb.base/symbol-alias.exp -gdb.base/sym-file.exp -gdb.base/symfile-warn.exp -gdb.base/symlink-sourcefile.exp -gdb.base/symtab-search-order.exp -gdb.base/tab-crash.exp -gdb.base/term.exp -gdb.base/testenv.exp -gdb.base/trace-commands.exp -gdb.base/tracefork-zombie.exp -gdb.base/twice.exp -gdb.base/type-opaque.exp -gdb.base/until.exp -gdb.base/value-double-free.exp -gdb.base/vdso-warning.exp -gdb.base/vla-ptr.exp -gdb.base/warning.exp -gdb.base/watch-cond-infcall.exp -gdb.base/watch-non-mem.exp -gdb.base/watchpoint-cond-gone.exp -gdb.base/watchpoint-delete.exp -gdb.base/watchpoint-during-step.exp -gdb.base/watch-vfork.exp -gdb.base/wchar.exp -gdb.base/with.exp -gdb.base/with-mf.exp -gdb.cp/abstract-origin.exp -gdb.cp/ambiguous.exp -gdb.cp/anon-ns.exp -gdb.cp/anon-struct.exp -gdb.cp/anon-union.exp -gdb.cp/arg-reference.exp -gdb.cp/b146835.exp -gdb.cp/baseenum.exp -gdb.cp/bool.exp -gdb.cp/breakpoint-locs.exp -gdb.cp/bs15503.exp -gdb.cp/call-c.exp -gdb.cp/chained-calls.exp -gdb.cp/class2.exp -gdb.cp/cmpd-minsyms.exp -gdb.cp/converts.exp -gdb.cp/cpcompletion.exp -gdb.cp/cpexprs-debug-types.exp -gdb.cp/cplabel.exp -gdb.cp/cpsizeof.exp -gdb.cp/ctti.exp -gdb.cp/debug-expr.exp -gdb.cp/demangle.exp -gdb.cp/derivation.exp -gdb.cp/destrprint.exp -gdb.cp/disasm-func-name.exp -gdb.cp/dispcxx.exp -gdb.cp/ena-dis-br-range.exp -gdb.cp/enum-class.exp -gdb.cp/exception.exp -gdb.cp/exceptprint.exp -gdb.cp/expand-psymtabs-cxx.exp -gdb.cp/expand-sals.exp -gdb.cp/extern-c.exp -gdb.cp/formatted-ref.exp -gdb.cp/fpointer.exp -gdb.cp/gdb1355.exp -gdb.cp/hang.exp -gdb.cp/impl-this.exp -gdb.cp/infcall-dlopen.exp -gdb.cp/infcall-nodebug-c++-d0.exp -gdb.cp/infcall-nodebug-c-d0.exp -gdb.cp/infcall-nodebug-c++-d1.exp -gdb.cp/infcall-nodebug-c-d1.exp -gdb.cp/iostream.exp -gdb.cp/local-static.exp -gdb.cp/mb-inline.exp -gdb.cp/mb-templates.exp -gdb.cp/m-data.exp -gdb.cp/member-name.exp -gdb.cp/member-ptr.exp -gdb.cp/method2.exp -gdb.cp/method.exp -gdb.cp/meth-typedefs.exp -gdb.cp/namelessclass.exp -gdb.cp/namespace-enum.exp -gdb.cp/namespace.exp -gdb.cp/namespace-nested-import.exp -gdb.cp/nested-types.exp -gdb.cp/nextoverthrow.exp -gdb.cp/non-trivial-retval.exp -gdb.cp/noparam.exp -gdb.cp/nsalias.exp -gdb.cp/nsdecl.exp -gdb.cp/nsimport.exp -gdb.cp/nsnoimports.exp -gdb.cp/nsrecurs.exp -gdb.cp/nsstress.exp -gdb.cp/operator.exp -gdb.cp/overload-const.exp -gdb.cp/overload.exp -gdb.cp/ovsrch.exp -gdb.cp/paren-type.exp -gdb.cp/parse-lang.exp -gdb.cp/pass-by-ref-2.exp -gdb.cp/pass-by-ref.exp -gdb.cp/pr-1023.exp -gdb.cp/pr10687.exp -gdb.cp/pr10728.exp -gdb.cp/pr11734.exp -gdb.cp/pr12028.exp -gdb.cp/pr-1210.exp -gdb.cp/pr12273.exp -gdb.cp/pr17132.exp -gdb.cp/pr9067.exp -gdb.cp/pr9631.exp -gdb.cp/print-demangle.exp -gdb.cp/printmethod.exp -gdb.cp/psmang.exp -gdb.cp/psymtab-parameter.exp -gdb.cp/ptype-cv-cp.exp -gdb.cp/ptype-flags.exp -gdb.cp/punctuator.exp -gdb.cp/readnow-language.exp -gdb.cp/ref-params.exp -gdb.cp/re-set-overloaded.exp -gdb.cp/rtti.exp -gdb.cp/rvalue-ref-casts.exp -gdb.cp/rvalue-ref-params.exp -gdb.cp/rvalue-ref-sizeof.exp -gdb.cp/rvalue-ref-types.exp -gdb.cp/save-bp-qualified.exp -gdb.cp/scope-err.exp -gdb.cp/shadow.exp -gdb.cp/smartp.exp -gdb.cp/static-method.exp -gdb.cp/static-print-quit.exp -gdb.cp/static-typedef-print.exp -gdb.cp/stub-array-size.exp -gdb.cp/subtypes.exp -gdb.cp/try_catch.exp -gdb.cp/typedef-base.exp -gdb.cp/typedef-operator.exp -gdb.cp/typed-enum.exp -gdb.cp/userdef.exp -gdb.cp/using-crash.exp -gdb.cp/virtbase2.exp -gdb.cp/virtbase.exp -gdb.cp/virtfunc2.exp -gdb.cp/wide_char_types.exp -gdb.fortran/array-bounds.exp -gdb.fortran/array-bounds-high.exp -gdb.fortran/array-element.exp -gdb.fortran/array-slices-bad.exp -gdb.fortran/array-slices-sub-slices.exp -gdb.fortran/block-data.exp -gdb.fortran/charset.exp -gdb.fortran/class-allocatable-array.exp -gdb.fortran/common-block.exp -gdb.fortran/complex.exp -gdb.fortran/derived-type.exp -gdb.fortran/derived-type-function.exp -gdb.fortran/derived-type-striding.exp -gdb.fortran/dot-ops.exp -gdb.fortran/exprs.exp -gdb.fortran/info-modules.exp -gdb.fortran/info-types.exp -gdb.fortran/intrinsics.exp -gdb.fortran/library-module.exp -gdb.fortran/logical.exp -gdb.fortran/max-depth.exp -gdb.fortran/mixed-lang-stack.exp -gdb.fortran/module.exp -gdb.fortran/multi-dim.exp -gdb.fortran/nested-funcs-2.exp -gdb.fortran/nested-funcs.exp -gdb.fortran/pointer-to-pointer.exp -gdb.fortran/print-formatted.exp -gdb.fortran/printing-types.exp -gdb.fortran/print_type.exp -gdb.fortran/ptr-indentation.exp -gdb.fortran/ptype-on-functions.exp -gdb.fortran/short-circuit-argument-list.exp -gdb.fortran/subarray.exp -gdb.fortran/type-kinds.exp -gdb.fortran/types.exp -gdb.fortran/vla-alloc-assoc.exp -gdb.fortran/vla-datatypes.exp -gdb.fortran/vla-history.exp -gdb.fortran/vla-ptr-info.exp -gdb.fortran/vla-ptype.exp -gdb.fortran/vla-ptype-sub.exp -gdb.fortran/vla-sizeof.exp -gdb.fortran/vla-type.exp -gdb.fortran/vla-value.exp -gdb.fortran/vla-value-sub-arbitrary.exp -gdb.fortran/vla-value-sub.exp -gdb.fortran/vla-value-sub-finish.exp -gdb.fortran/whatis_type.exp -gdb.fortran/xlf-variable.exp diff --git a/tests/gdb-testsuite-sanity/ref/gen.sh b/tests/gdb-testsuite-sanity/ref/gen.sh deleted file mode 100755 index 0926a71..0000000 --- a/tests/gdb-testsuite-sanity/ref/gen.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -BIN=`which gdb` && -PACKAGE=`rpm -qf --qf='%{name}\n' ${BIN}` && -SYSTEM=`uname -r | grep -o -E 'el[0-9]+a?|fc[0-9]+'` && -ARCH=`arch` && -echo "./ref/${PACKAGE}/${SYSTEM}.${ARCH}" && -exit 0 - -echo "ERROR" >&2 -exit 1 diff --git a/tests/gdb-testsuite-sanity/runtest.sh b/tests/gdb-testsuite-sanity/runtest.sh deleted file mode 100755 index a13c66e..0000000 --- a/tests/gdb-testsuite-sanity/runtest.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/gdb/Sanity/gdb-testsuite-sanity -# Description: gdb testing by upstream testsuite -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2021 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -BUILD_USER=${BUILD_USER:-gdbbld} -export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' `which gdb`)}" -RUNTESTFLAGS=${RUNTESTFLAGS:-GDB=`rpm -ql $PACKAGE | grep -E 'bin/gdb$'`} -TESTS_COUNT_MIN=${TESTS_COUNT_MIN:-4000} -REQUIRES="$PACKAGE rpm-build dejagnu make gcc glibc" -if rlIsFedora; then - REQUIRES="$REQUIRES dnf-utils" -else - REQUIRES="$REQUIRES yum-utils" -fi - -rlJournalStart - rlPhaseStartSetup - rlShowRunningKernel - rlAssertRpm --all - rlRun "TmpDir=\$(mktemp -d)" - rlRun "cp -r ./ref $TmpDir" - rlRun "pushd $TmpDir" - rlFetchSrcForInstalled $PACKAGE - rlRun "useradd -M -N $BUILD_USER" 0,9 - [ $? -eq 0 ] && rlRun "del=yes" - rlRun "chown -R $BUILD_USER:users $TmpDir" - rlRun "cp /proc/sys/kernel/core_pattern $TmpDir/core_pattern.bckp" - rlRun "echo 'core.%p' >/proc/sys/kernel/core_pattern" - rlRun "ulimit -c unlimited" - rlPhaseEnd - - rlPhaseStartSetup "build gdb" - rlRun "su -c 'rpm -D \"_topdir $TmpDir\" -U *.src.rpm &>rpm.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/rpm.log rpm.log" - rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bs --with testsuite $TmpDir/SPECS/*.spec &>rpmbuild-bs.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/rpmbuild-bs.log rpmbuild-bs.log" - rlRun "yum-builddep -y -D \"_topdir $TmpDir\" $TmpDir/SRPMS/*.src.rpm &>$TmpDir/yum-builddep.log" 0,1; ret=$? - rlRun "rlFileSubmit $TmpDir/yum-builddep.log yum-builddep.log" - if [ $ret -ne 0 ]; then - rlLogWarning "Dependencies was not successfully installed" - rlLogInfo "Trying to install dependencies of bare SPEC file ..." - rlRun "yum-builddep -y -D \"_topdir $TmpDir\" $TmpDir/SPECS/*.spec &>$TmpDir/yum-builddep-spec.log" - rlRun "rlFileSubmit $TmpDir/yum-builddep-spec.log yum-builddep-spec.log" - fi - rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bp $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild-bp.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/rpmbuild-bp.log rpmbuild-bp.log" - rlRun "BUILD_DIR=`find $TmpDir -type f -name README | awk '{ print length, \$0 }' | sort -n -s | head -n 1 | cut -d ' ' -f 2- | sed 's|/README||'`" - if test -e $BUILD_DIR/gnulib/configure; then - rlRun "cd $BUILD_DIR/gnulib" - rlRun "su -c 'bash ./configure &>$TmpDir/configure-gnulib.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/configure-gnulib.log configure-gnulib.log" - fi - rlRun "configure_flags=\$(rpmspec -D \"_topdir $TmpDir\" -P $TmpDir/SPECS/*.spec | grep -o -E '\-\-(prefix|with\-gdb\-datadir|with\-separate\-debug\-dir|with\-python)=\S+' | tr '\n' ' ')" - rlRun "cd $BUILD_DIR/gdb" - rlRun "su -c './configure $configure_flags &>$TmpDir/configure.log' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/configure.log configure.log" - rlRun "DATADIR=`gdb -ex 'show data-directory' -batch | grep -o -E '/[^\"]+'`" - rlRun "mv data-directory data-directory.orig" - rlRun "ln -s $DATADIR ./data-directory" - rlPhaseEnd - - rlPhaseStartSetup "filter testsuite" - rlRun "system=`uname -r | grep -o -E 'el[0-9]+a?|fc[0-9]+'` && [[ ! -z \$system ]]" - rlRun "ref_file=$TmpDir/ref/$PACKAGE/$system.`arch`" - if ! test -e $ref_file; then - rlLogWarning "Reference file $ref_file not found" - rlLogInfo "Using default reference file ..." - rlRun "ref_file=$TmpDir/ref/default" - fi - rlRun "test -e $ref_file" - rlRun "cd testsuite" - rlRun "find . -regex '^./gdb\..+\.exp$' -type f -printf '%P\n' | sort >$TmpDir/test_list" - rlRun "comm -23 $TmpDir/test_list $ref_file >$TmpDir/disable_list" # disable tests that are not included in the reference file - rlLogInfo "Testcase disabling ..." - while read file; do - mv "$file" "$file.disabled" - done <$TmpDir/disable_list - rlRun "cd $BUILD_DIR/gdb" - rlPhaseEnd - - rlPhaseStartTest "run testsuite" - rlRun "su -c 'make check RUNTESTFLAGS=\"${RUNTESTFLAGS}\" |& tee $TmpDir/testsuite.log | grep -E \"^Running.+\.exp ...$\"; test \${PIPESTATUS[0]} -eq 0' $BUILD_USER" - rlRun "rlFileSubmit $TmpDir/testsuite.log testsuite.log" - rlRun "rlFileSubmit testsuite/gdb.sum gdb.sum" - rlRun "rlFileSubmit testsuite/gdb.log gdb.log" - rlLogInfo "`awk '/=== gdb Summary ===/,0' testsuite/gdb.sum`" - rlPhaseEnd - - rlPhaseStartTest "evaluate results" - rlRun "tests_count=\$(grep -E '^PASS:' testsuite/gdb.sum | wc -l)" - [ "$tests_count" -ge "$TESTS_COUNT_MIN" ] && rlLogInfo "Test counter: $tests_count" || rlFail "Test counter $tests_count should be greater than or equal to $TESTS_COUNT_MIN" - rlRun "awk 'BEGIN { RS=\"Running $BUILD_DIR/gdb/testsuite/\" } /\sERROR:|\sFAIL:|\sKPASS:|\sUNRESOLVED:|\sXPASS:/ { print \$0 }' testsuite/gdb.sum >$TmpDir/error.log" # check for errors, unresolved testcases, unexpected failures and unexpected successes - if [ -s $TmpDir/error.log ]; then - rlFail "Errors observed"; - rlRun "rlFileSubmit $TmpDir/error.log error.log" - rlRun "awk 'BEGIN { RS=\"Running $BUILD_DIR/gdb/testsuite/\" } /\sERROR:|\sFAIL:|\sKPASS:|\sUNRESOLVED:|\sXPASS:/ { print \$1 }' testsuite/gdb.sum >$TmpDir/affected_testcases.log" - rlLogInfo "`echo 'Affected testcases:';cat $TmpDir/affected_testcases.log`" - rlRun "rlFileSubmit $TmpDir/affected_testcases.log affected_testcases.log" - else - rlPass "No errors observed" - fi - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "cat $TmpDir/core_pattern.bckp >/proc/sys/kernel/core_pattern" - rlRun "popd" - rlRun "rm -r $TmpDir" - [ "$del" = "yes" ] && rlRun "userdel -f $BUILD_USER" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd