Compare commits

..

1 Commits
rawhide ... f28

Author SHA1 Message Date
Florian Weimer 7092c35e5b Use LDFLAGS from redhat-rpm-config 2018-02-23 13:40:03 +01:00
21 changed files with 65 additions and 489 deletions

View File

@ -1 +0,0 @@
1

7
.gitignore vendored
View File

@ -1,4 +1,3 @@
/dwz
/dwz-0.3.tar.bz2
/dwz-0.4.tar.bz2
/dwz-0.5.tar.bz2
@ -9,9 +8,3 @@
/dwz-0.10.tar.bz2
/dwz-0.11.tar.bz2
/dwz-0.12.tar.bz2
/dwz-0.13.tar.xz
/dwz-20210118.tar.xz
/dwz-20210121.tar.xz
/dwz-20210122.tar.xz
/dwz-0.14.tar.xz
/dwz-0.15.tar.xz

View File

@ -1,80 +0,0 @@
commit b1f26dc76158e1f3364836d8b540b17a7a1ccb3d
Author: Tom de Vries <tdevries@suse.de>
Date: Sat Mar 20 09:37:31 2021 +0100
[testsuite] Handle readelf following links by default
Since binutils commit c46b706620e "Change the readelf and objdump programs so
that they will automatically follow links to separate debug info files" there
are a few FAILs in the dwz testsuite.
This is just due to changing the default behaviour for readelf.
Fix this by testing whether the new -Wn readelf flag is supported,
and if so, adding it to the readelf call.
2021-03-20 Tom de Vries <tdevries@suse.de>
PR dwz/27592
* testsuite/dwz.tests/odr-struct-multifile.sh: Call readelf with -wN
if supported.
* testsuite/dwz.tests/cycle.sh: Same.
diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh
index cc462c9..20b682b 100644
--- a/testsuite/dwz.tests/odr-struct-multifile.sh
+++ b/testsuite/dwz.tests/odr-struct-multifile.sh
@@ -2,6 +2,11 @@ if ! $execs/dwz-for-test --odr -v 2>/dev/null; then
exit 77
fi
+readelf_flags=""
+if readelf -h 2>&1 | grep -q "\-wN,"; then
+ readelf_flags=-wN
+fi
+
cp $execs/odr-struct 1
cp 1 2
@@ -41,12 +46,12 @@ done
for name in aaa bbb ccc; do
- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true)
+ cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true)
[ $cnt -eq 0 ]
done
for name in member_one member_two member_three member_four; do
- cnt=$(readelf -wi 1 | grep -c "DW_AT_name.*:.*$name" || true)
+ cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true)
[ $cnt -eq 0 ]
done
commit 2b3711fef3438ca83db8eabed3715b6c45924511
Author: Lv Ying via Dwz <dwz@sourceware.org>
Date: Thu Jan 13 05:29:44 2022 +0800
fix Handle readelf following links by default(b1f26dc76158e)
The two testcases still failed when using newer readelf(binutils commit c46b706620e):
testsuite/dwz.tests/odr-struct-multifile.sh
testsuite/dwz.tests/cycle.sh
fix the new -Wn readelf flag test
Signed-off-by: Lv Ying <lvying6@huawei.com>
diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh
index 20b682b..159cbc3 100644
--- a/testsuite/dwz.tests/odr-struct-multifile.sh
+++ b/testsuite/dwz.tests/odr-struct-multifile.sh
@@ -3,7 +3,7 @@ if ! $execs/dwz-for-test --odr -v 2>/dev/null; then
fi
readelf_flags=""
-if readelf -h 2>&1 | grep -q "\-wN,"; then
+if readelf -h 2>&1 | grep -q "\-wN"; then
readelf_flags=-wN
fi

View File

@ -1,16 +0,0 @@
diff --git a/testsuite/dwz.tests/odr-struct-multifile.sh b/testsuite/dwz.tests/odr-struct-multifile.sh
old mode 100644
new mode 100755
index 159cbc3..5961abf
--- a/testsuite/dwz.tests/odr-struct-multifile.sh
+++ b/testsuite/dwz.tests/odr-struct-multifile.sh
@@ -44,6 +44,9 @@ for name in member_one member_two member_three member_four; do
[ $cnt -eq 1 ]
done
+# Even with -wN readelf 2.38-15.fc37 follows and prints the contents
+# of the alt file. So make sure it cannot do that by removing it.
+rm 3
for name in aaa bbb ccc; do
cnt=$(readelf -wi $readelf_flags 1 | grep -c "DW_AT_name.*:.*$name" || true)

View File

@ -1,26 +0,0 @@
commit 5cb60631fad2827d5d337fce0c1cd03c894d6f8c
Author: Mark Wielaard <mark@klomp.org>
Date: Sat Jul 2 00:57:38 2022 +0200
Redirect stder in gdb-add-index.sh test
gdb-add-index might produce an error message on stderr when trying to
disable debuginfod support. Any message to stderr makes the testcase
fail. This looks like a gdb bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=29316
But it is easy to workaround by redirecting stderr to stdout.
diff --git a/testsuite/dwz.tests/gdb-add-index.sh b/testsuite/dwz.tests/gdb-add-index.sh
index 5a91b23..3095efb 100644
--- a/testsuite/dwz.tests/gdb-add-index.sh
+++ b/testsuite/dwz.tests/gdb-add-index.sh
@@ -1,6 +1,8 @@
cp $execs/hello 1
-gdb-add-index 1
+# Redirect gdb-add-index stderr to stdout.
+# https://sourceware.org/bugzilla/show_bug.cgi?id=29316
+gdb-add-index 1 2>&1
readelf -S 1 | grep -q '\.gdb_index'

View File

@ -1,34 +0,0 @@
commit a57177980a05f0f84bf290ab7b68f73c0f78053f
Author: Martin Liška <mliska@suse.cz>
Date: Wed Sep 7 21:55:03 2022 +0200
Use grep -E instead of egrep.
egrep is obsoleted starting with GNU Grep 3.8.
diff --git a/contrib/bytes-per-die.sh b/contrib/bytes-per-die.sh
index 969f733..fda8998 100755
--- a/contrib/bytes-per-die.sh
+++ b/contrib/bytes-per-die.sh
@@ -3,7 +3,7 @@
f="$1"
size=$(readelf -WS "$f" \
- | egrep "[ \t]\.debug_info" \
+ | grep -E "[ \t]\.debug_info" \
| sed 's/.*\.debug_info//' \
| awk '{print $4}')
size=$((16#$size))
diff --git a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
index a3395a7..ee31359 100644
--- a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
+++ b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh
@@ -7,7 +7,7 @@
1 2 \
2> dwz.err
-if egrep -q "Compressing (1|2)$" dwz.err; then
+if grep -Eq "Compressing (1|2)$" dwz.err; then
exit 1
fi

100
dwz.spec
View File

@ -1,14 +1,14 @@
Summary: DWARF optimization and duplicate removal tool
Name: dwz
Version: 0.15
Release: 2%{?dist}
Version: 0.12
Release: 7%{?dist}
License: GPLv2+ and GPLv3+
URL: https://sourceware.org/dwz/
Source: https://sourceware.org/ftp/dwz/releases/%{name}-%{version}.tar.xz
BuildRequires: gcc, gcc-c++, gdb, elfutils-libelf-devel, dejagnu
BuildRequires: make elfutils xxhash-devel
# Patches
Group: Development/Tools
# git archive --format=tar --remote=git://sourceware.org/git/dwz.git \
# --prefix=%{name}-%{version}/ %{name}-%{version} \
# | bzip2 -9 > %{name}-%{version}.tar.bz2
Source: %{name}-%{version}.tar.bz2
BuildRequires: elfutils-libelf-devel%{?_isa}
%description
The dwz package contains a program that attempts to optimize DWARF
@ -20,98 +20,24 @@ DW_TAG_partial_unit compilation units (CUs) for duplicated information
and using DW_TAG_imported_unit to import it into each CU that needs it.
%prep
%autosetup -p1 -n dwz
%setup -q
%build
%make_build CFLAGS='%{optflags}' LDFLAGS='%{build_ldflags}' \
make %{?_smp_mflags} CFLAGS='%{optflags}' LDFLAGS='%{build_ldflags}' \
prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir}
%install
rm -rf %{buildroot}
%make_install prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir}
%check
CFLAGS="" LDFLAGS="" make check
make DESTDIR=%{buildroot} prefix=%{_prefix} mandir=%{_mandir} bindir=%{_bindir} \
install
%files
%defattr(-,root,root)
%license COPYING COPYING3 COPYING.RUNTIME
%{_bindir}/dwz
%{_mandir}/man1/dwz.1*
%changelog
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Thu Nov 3 2022 Mark Wielaard <mjw@fedoraproject.org> 0.15-1
- update to a new upstream release
* Tue Oct 25 2022 Mark Wielaard <mjw@fedoraproject.org> 0.14-9
- Add dwz-0.14-grep-E.patch
* Tue Oct 25 2022 William Cohen <wcohen@redhat.com> 0.14-8
- Added URL and complete path to source tarball to dwz.spec.
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 1 2022 Mark Wielaard <mjw@fedoraproject.org> 0.14-6
- Add dwz-0.14-gdb-add-index.patch
* Wed Jun 29 2022 Mark Wielaard <mjw@fedoraproject.org> 0.14-5
- Add dwz-0.14-binutils-readelf-alt.patch
- BuildRequires elfutils (for tests)
* Sun Jun 26 2022 Mark Wielaard <mjw@fedoraproject.org> 0.14-4
- Add dwz-0.14-binutils-Wn.patch
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 09 2021 Jakub Jelinek <jakub@redhat.com> 0.14-1
- update to a new upstream release
* Fri Jan 22 2021 Mark Wielaard <mjw@fedoraproject.org> 0.13-7
- Don't crash on DWARF5 .debug_line table with zero files (#1919243)
* Thu Jan 21 2021 Jakub Jelinek <jakub@redhat.com> 0.13-6
- DW_FORM_implicit_const handling fixes (sw#27212, sw#27213)
- temporarily build odr tests with -gdwarf-4 as they are incompatible with
DWARF 5
* Mon Jan 18 2021 Jakub Jelinek <jakub@redhat.com> 0.13-5
- update to latest git snapshot
- DWARF5 support
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 0.13-3
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Dec 11 2019 Jakub Jelinek <jakub@redhat.com> 0.13-1
- update to a new upstream release
- add make check
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 19 2018 Marek Polacek <polacek@redhat.com> 0.12-9
- remove %{?_isa} from BuildRequires (#1545173)
- add gcc to BuildRequires
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.12-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 23 2018 Florian Weimer <fweimer@redhat.com> - 0.12-7
- Use LDFLAGS from redhat-rpm-config

View File

@ -1,21 +0,0 @@
--- !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-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional
osci.brew-build.tier0.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional
osci.brew-build.tier0.functional}

View File

@ -1,6 +0,0 @@
summary: CI Gating Plan
discover:
how: fmf
directory: tests
execute:
how: beakerlib

View File

@ -1 +1 @@
SHA512 (dwz-0.15.tar.xz) = 43eb4b08c1f529859dc3466697d5ad7e172d6efbf21409530a67a2492ae4acc3734d5134bbd6e07c089ecc358d915871b13e22f6e4f1dd4c3af19ef804f8fcc5
1624afa75b94633e03c6e1bb952fb348 dwz-0.12.tar.bz2

View File

@ -29,7 +29,7 @@ export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE testcase.c cmds
FILES=$(METADATA) runtest.sh Makefile PURPOSE something.c cmd.txt
.PHONY: all install download clean

View File

@ -1,5 +1,6 @@
b 19
b f
r
s
p x
p/x var
c

View File

@ -1,15 +0,0 @@
summary: Quick sanity test
description: ''
contact: Miroslav Franc <mfranc@redhat.com>
component:
- dwz
test: ./runtest.sh
framework: beakerlib
recommend:
- dwz
- gcc
- gdb
- glibc-debuginfo
duration: 2m
extra-summary: /tools/dwz/dwz-quick-test
extra-task: /tools/dwz/dwz-quick-test

View File

@ -29,34 +29,32 @@
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
export PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' `which dwz`)}"
REQUIRES="$PACKAGE gcc glibc gdb"
rlJournalStart
rlPhaseStartSetup
rlShowRunningKernel
rlAssertRpm --all
rlRun "TmpDir=\$(mktemp -d)"
rlRun "cp -r testcase.c cmds $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -g -O0 -o testcase testcase.c"
rlRun "cp testcase testcase.dwz"
rlPhaseEnd
rlPhaseStartSetup
rlAssertRpm gcc
rlAssertRpm gdb
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
rlRun "cp something.c cmd.txt $TmpDir"
rlRun "pushd $TmpDir"
rlRun "gcc -g -O2 something.c -o something.out"
rlRun "cp something.out something.dwz"
rlPhaseEnd
rlPhaseStartTest
rlRun "dwz testcase.dwz"
rlRun "BYTES_BASE_FILE=`wc -c <testcase`"
rlRun "BYTES_DWZED_FILE=`wc -c <testcase.dwz`"
[ $BYTES_DWZED_FILE -gt $BYTES_BASE_FILE ] && rlFail "DWZed file should not be greater than the original file."
rlRun "gdb --command=cmds --quiet --batch testcase.dwz |& tee $TmpDir/testcase.log; test \${PIPESTATUS[0]} -eq 0"
rlRun "grep 'hello, world' $TmpDir/testcase.log"
rlRun "grep '\$1 = -1' $TmpDir/testcase.log"
rlRun "grep '\$2 = 0x2a' $TmpDir/testcase.log"
rlPhaseEnd
rlPhaseStartTest "no crash + saved space"
rlRun "dwz something.dwz"
rlRun "[[ $(wc -c <something.out) -gt $(wc -c <something.dwz) ]]"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir"
rlPhaseEnd
rlPhaseStartTest "can we debug it?"
rlRun "gdb -x cmd.txt -batch -q ./something.dwz > log 2>&1"
rlRun "[[ $(grep -c 'hello, world' log) -eq 2 ]]"
rlAssertGrep '$1 = -1' log
rlAssertGrep '$2 = 0x2a' log
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View File

@ -1,63 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /tools/dwz/Sanity/dwz-testsuite
# Description: dwz testing by upstream testsuite
# Author: Michal Kolar <mkolar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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/dwz/Sanity/dwz-testsuite
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: dwz testing by upstream testsuite" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 1h" >> $(METADATA)
@echo "RunFor: dwz" >> $(METADATA)
@echo "Requires: dwz rpm-build yum-utils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2+" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -RHEL4 -RHELClient5 -RHELServer5 -RHEL6 -RHEL7 -RHEL8" >> $(METADATA)
rhts-lint $(METADATA)

View File

@ -1,3 +0,0 @@
PURPOSE of /tools/dwz/Sanity/dwz-testsuite
Description: dwz testing by upstream testsuite
Author: Michal Kolar <mkolar@redhat.com>

View File

@ -1,14 +0,0 @@
summary: dwz testing by upstream testsuite
description: ''
contact: Michal Kolar <mkolar@redhat.com>
component:
- dwz
test: ./runtest.sh
framework: beakerlib
recommend:
- dwz
- rpm-build
- yum-utils
duration: 1h
extra-summary: /tools/dwz/Sanity/dwz-testsuite
extra-task: /tools/dwz/Sanity/dwz-testsuite

View File

@ -1,87 +0,0 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /tools/dwz/Sanity/dwz-testsuite
# Description: dwz testing by upstream testsuite
# Author: Michal Kolar <mkolar@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 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:-dwzbld}
TESTS_COUNT_MIN=${TESTS_COUNT_MIN:-20}
PACKAGE="dwz"
REQUIRES="$PACKAGE rpm-build"
if rlIsFedora; then
REQUIRES="$REQUIRES dnf-utils"
else
REQUIRES="$REQUIRES yum-utils"
fi
rlJournalStart
rlPhaseStartSetup
rlShowRunningKernel
rlAssertRpm --all
rlRun "TmpDir=`mktemp -d`"
rlRun "pushd $TmpDir"
rlFetchSrcForInstalled $PACKAGE
rlRun "useradd -M -N $BUILD_USER" 0,9
[ "$?" == "0" ] && rlRun "del=yes"
rlRun "chown -R $BUILD_USER:users $TmpDir"
rlPhaseEnd
rlPhaseStartSetup "build dwz"
rlRun "rpm -D \"_topdir $TmpDir\" -U *.src.rpm"
rlRun "dnf builddep -y $TmpDir/SPECS/*.spec"
rlRun "su -c 'rpmbuild -D \"_topdir $TmpDir\" -bp $TmpDir/SPECS/*.spec &>$TmpDir/rpmbuild.log' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/rpmbuild.log"
rlRun "cd $TmpDir/BUILD/dwz"
rlRun "su -c './configure &>$TmpDir/configure.log' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/configure.log"
rlRun "su -c 'make &>$TmpDir/make.log' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/make.log"
rlRun "ln -fs `which dwz` . && touch dwz"
# workaround
[ -f testsuite/dwz.tests/pr24468.sh ] && rlRun "mv testsuite/dwz.tests/pr24468.sh testsuite/dwz.tests/pr24468.sh~" 0 "Disabling pr24468.sh due to bz1893921"
rlPhaseEnd
rlPhaseStartTest "run testsuite"
rlRun "su -c 'make check RUNTESTFLAGS=-a |& tee $TmpDir/testsuite.log; test \${PIPESTATUS[0]} -eq 0' $BUILD_USER"
rlRun "rlFileSubmit $TmpDir/testsuite.log"
rlLogInfo "`awk '/=== dwz Summary ===/,0' dwz.sum`"
rlPhaseEnd
rlPhaseStartTest "evaluate results"
rlRun "grep -E '^FAIL:' dwz.sum" 1 "There should be no failure"
rlRun "tests_count=\$(grep -E '^PASS:' dwz.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"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir"
[ "$del" == "yes" ] && rlRun "userdel -f $BUILD_USER"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

4
tests/inventory Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
export TEST_DOCKER_EXTRA_ARGS="--cap-add=SYS_PTRACE"
exec merge-standard-inventory "$@"

20
tests/tests.yml Normal file
View File

@ -0,0 +1,20 @@
- hosts: localhost
tags:
- classic
- container # needs SYS_PTRACE
pre_tasks:
- name: Install deguginfo-install
shell: dnf -y install "dnf-command(debuginfo-install)"
- name: Install debuginfo for packages
shell: dnf -y debuginfo-install --best {{item}}
with_items:
- glibc
roles:
- role: standard-test-beakerlib
tests:
- dwz-quick-test
required_packages:
- dwz
- gcc
- gdb
- glibc-debuginfo