diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4fab4ec --- /dev/null +++ b/gating.yaml @@ -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} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..1ad2c12 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,6 @@ +summary: CI Gating Plan +discover: + how: fmf + directory: tests +execute: + how: beakerlib diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..bf13c2b --- /dev/null +++ b/tests/README @@ -0,0 +1,2 @@ +The test's Makefiles are not used in Fedora CI infrastructure. But are kept here + for backward compatibility with traditional beakerlib test harness in RHEL. diff --git a/tests/Sanity/broken-binary-handling/Makefile b/tests/Sanity/broken-binary-handling/Makefile new file mode 100644 index 0000000..c7ef76f --- /dev/null +++ b/tests/Sanity/broken-binary-handling/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Sanity/broken-binary-handling +# Description: Try to trace broken binary by ltrace +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# 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/ltrace/Sanity/broken-binary-handling +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE broken.bin.gz + +.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: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Try to trace broken binary by ltrace" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace gzip" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: yes" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/broken-binary-handling/PURPOSE b/tests/Sanity/broken-binary-handling/PURPOSE new file mode 100644 index 0000000..e6b9426 --- /dev/null +++ b/tests/Sanity/broken-binary-handling/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Sanity/broken-binary-handling +Description: Try to trace broken binary by ltrace +Author: Michal Nowak diff --git a/tests/Sanity/broken-binary-handling/broken.bin.gz b/tests/Sanity/broken-binary-handling/broken.bin.gz new file mode 100644 index 0000000..4fd8117 Binary files /dev/null and b/tests/Sanity/broken-binary-handling/broken.bin.gz differ diff --git a/tests/Sanity/broken-binary-handling/main.fmf b/tests/Sanity/broken-binary-handling/main.fmf new file mode 100644 index 0000000..8552c81 --- /dev/null +++ b/tests/Sanity/broken-binary-handling/main.fmf @@ -0,0 +1,14 @@ +summary: Try to trace broken binary by ltrace +description: '' +contact: +- Vaclav Kadlcik +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gzip +duration: 5m +extra-summary: /tools/ltrace/Sanity/broken-binary-handling +extra-task: /tools/ltrace/Sanity/broken-binary-handling diff --git a/tests/Sanity/broken-binary-handling/runtest.sh b/tests/Sanity/broken-binary-handling/runtest.sh new file mode 100755 index 0000000..6558c78 --- /dev/null +++ b/tests/Sanity/broken-binary-handling/runtest.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Sanity/broken-binary-handling +# Description: Try to trace broken binary by ltrace +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# 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 Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + cp broken.bin.gz $TmpDir + rlRun "pushd $TmpDir" + gunzip broken.bin.gz + chmod +x broken.bin + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -f ./broken.bin > out 2>&1 " 1 "ltrace can't trace broken.bin" + OUT=`cat out` + rlLog "LOG: $OUT" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd