Import RHEL's regression test for #1427140

This commit is contained in:
Václav Kadlčík 2021-05-19 13:16:01 +02:00
parent 7fad3fa72c
commit fa03fb9fb0
4 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,64 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch
# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)
# Author: Michal Kolar <mkolar@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/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Michal Kolar <mkolar@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)" >> $(METADATA)
@echo "Type: Regression" >> $(METADATA)
@echo "TestTime: 30m" >> $(METADATA)
@echo "RunFor: ltrace" >> $(METADATA)
@echo "Requires: ltrace autoconf automake dejagnu elfutils-devel elfutils-libelf-devel libselinux-devel libtool scl-utils-build yum-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Bug: 1427140" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -0,0 +1,5 @@
PURPOSE of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch
Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)
Author: Michal Kolar <mkolar@redhat.com>
Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140

View File

@ -0,0 +1,27 @@
summary: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)
description: |
Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140
contact: Michal Kolar <mkolar@redhat.com>
component:
- ltrace
test: ./runtest.sh
framework: beakerlib
recommend:
- ltrace
- autoconf
- automake
- dejagnu
- elfutils-devel
- elfutils-libelf-devel
- libselinux-devel
- libtool
- scl-utils-build
- yum-utils
- koji
- rpm-build
duration: 30m
link:
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1427140
extra-summary: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch
extra-task: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch

View File

@ -0,0 +1,55 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch
# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)
# Author: Michal Kolar <mkolar@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
CMD='ltrace'
BIN=$(which --skip-alias $CMD)
PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}"
export $PACKAGE
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "koji download-build --arch=src $(rpm -q $PACKAGE)"
rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm"
rlRun "dnf builddep -y SPECS/*.spec"
rlPhaseEnd
rlPhaseStartTest
rlRun "rpmbuild -bp --define='_topdir $TmpDir' --define='_default_patch_flags -s --no-backup-if-mismatch' --quiet SPECS/*.spec"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd