From 9f4499dc846e8edb913fed99fc3d082a347a298b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 25 Sep 2024 16:27:50 +0200 Subject: [PATCH] Configure c10s and RHEL-10 gating - c10s: Remove local outdated copies of downstream tests, reuse what we have in Fedora - RHEL-10: Switch from the obsolete configuration to the new one, based on TMT and testing-farm --- gating.yaml | 5 +- plans/ci.fmf | 4 +- tests/dwz-quick-test/Makefile | 63 ------------------------ tests/dwz-quick-test/PURPOSE | 3 -- tests/dwz-quick-test/cmds | 6 --- tests/dwz-quick-test/main.fmf | 15 ------ tests/dwz-quick-test/runtest.sh | 62 ----------------------- tests/dwz-quick-test/testcase.c | 21 -------- tests/dwz-testsuite/Makefile | 63 ------------------------ tests/dwz-testsuite/PURPOSE | 3 -- tests/dwz-testsuite/main.fmf | 14 ------ tests/dwz-testsuite/runtest.sh | 87 --------------------------------- 12 files changed, 5 insertions(+), 341 deletions(-) delete mode 100644 tests/dwz-quick-test/Makefile delete mode 100644 tests/dwz-quick-test/PURPOSE delete mode 100644 tests/dwz-quick-test/cmds delete mode 100644 tests/dwz-quick-test/main.fmf delete mode 100755 tests/dwz-quick-test/runtest.sh delete mode 100644 tests/dwz-quick-test/testcase.c delete mode 100644 tests/dwz-testsuite/Makefile delete mode 100644 tests/dwz-testsuite/PURPOSE delete mode 100644 tests/dwz-testsuite/main.fmf delete mode 100755 tests/dwz-testsuite/runtest.sh diff --git a/gating.yaml b/gating.yaml index f344c15..2d11c95 100644 --- a/gating.yaml +++ b/gating.yaml @@ -3,5 +3,6 @@ product_versions: - rhel-10 decision_context: osci_compose_gate rules: - - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-gating.functional} - + - !PassingTestCaseRule {test_case_name: osci.brew-build.rebuild.validation} + - !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/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..7f2fa75 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -1,6 +1,6 @@ summary: CI Gating Plan discover: how: fmf - directory: tests + url: https://src.fedoraproject.org/tests/dwz.git execute: - how: beakerlib + how: tmt diff --git a/tests/dwz-quick-test/Makefile b/tests/dwz-quick-test/Makefile deleted file mode 100644 index afd091d..0000000 --- a/tests/dwz-quick-test/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/dwz/dwz-quick-test -# Description: Quick sanity test -# Author: Miroslav Franc -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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/dwz/dwz-quick-test -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE testcase.c cmds - -.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: Miroslav Franc " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Quick sanity test" >> $(METADATA) - @echo "Type: Sanity" >> $(METADATA) - @echo "TestTime: 2m" >> $(METADATA) - @echo "RunFor: dwz" >> $(METADATA) - @echo "Requires: dwz gcc gdb glibc-debuginfo" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/dwz-quick-test/PURPOSE b/tests/dwz-quick-test/PURPOSE deleted file mode 100644 index c5b39d4..0000000 --- a/tests/dwz-quick-test/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/dwz/dwz-quick-test -Description: Quick sanity test -Author: Miroslav Franc diff --git a/tests/dwz-quick-test/cmds b/tests/dwz-quick-test/cmds deleted file mode 100644 index d4a15a0..0000000 --- a/tests/dwz-quick-test/cmds +++ /dev/null @@ -1,6 +0,0 @@ -b 19 -r -p x -p/x var -c -q diff --git a/tests/dwz-quick-test/main.fmf b/tests/dwz-quick-test/main.fmf deleted file mode 100644 index 17b1658..0000000 --- a/tests/dwz-quick-test/main.fmf +++ /dev/null @@ -1,15 +0,0 @@ -summary: Quick sanity test -description: '' -contact: Miroslav Franc -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 diff --git a/tests/dwz-quick-test/runtest.sh b/tests/dwz-quick-test/runtest.sh deleted file mode 100755 index afdac7b..0000000 --- a/tests/dwz-quick-test/runtest.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/bash -# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/dwz/dwz-quick-test -# Description: Quick sanity test -# Author: Miroslav Franc -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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 - -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 - - rlPhaseStartTest - rlRun "dwz testcase.dwz" - rlRun "BYTES_BASE_FILE=`wc -c - -void f (int x); - -int -main (int argc, char *argv[]) -{ - int a = -1; - - f(a); - - return 0; -} - -void -f (int x) -{ - static int var __attribute__ ((used)) = 42; - if(x) - puts("hello, world"); -} diff --git a/tests/dwz-testsuite/Makefile b/tests/dwz-testsuite/Makefile deleted file mode 100644 index 825cb54..0000000 --- a/tests/dwz-testsuite/Makefile +++ /dev/null @@ -1,63 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/dwz/Sanity/dwz-testsuite -# Description: dwz 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/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 " > $(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) diff --git a/tests/dwz-testsuite/PURPOSE b/tests/dwz-testsuite/PURPOSE deleted file mode 100644 index 31d7e55..0000000 --- a/tests/dwz-testsuite/PURPOSE +++ /dev/null @@ -1,3 +0,0 @@ -PURPOSE of /tools/dwz/Sanity/dwz-testsuite -Description: dwz testing by upstream testsuite -Author: Michal Kolar diff --git a/tests/dwz-testsuite/main.fmf b/tests/dwz-testsuite/main.fmf deleted file mode 100644 index 00b738f..0000000 --- a/tests/dwz-testsuite/main.fmf +++ /dev/null @@ -1,14 +0,0 @@ -summary: dwz testing by upstream testsuite -description: '' -contact: Michal Kolar -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 diff --git a/tests/dwz-testsuite/runtest.sh b/tests/dwz-testsuite/runtest.sh deleted file mode 100755 index a09341e..0000000 --- a/tests/dwz-testsuite/runtest.sh +++ /dev/null @@ -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 -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# 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