diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile new file mode 100644 index 0000000..9960d98 --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +# 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/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +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: Miroslav Franc " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 2m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 754096" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE new file mode 100644 index 0000000..8953b3d --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +Author: Miroslav Franc +Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096 diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf new file mode 100644 index 0000000..3c01c00 --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf @@ -0,0 +1,16 @@ +summary: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +description: | + Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096 +contact: Miroslav Franc +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 2m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=754096 +extra-summary: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +extra-task: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh new file mode 100755 index 0000000..d59239d --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +# 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 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -e puts /bin/true" + rlRun "ltrace -e sprintf /bin/true" + rlRun "ltrace -e puts -e gets /bin/true" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd