67 lines
2.5 KiB
Bash
Executable File
67 lines
2.5 KiB
Bash
Executable File
#!/bin/bash
|
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# runtest.sh of /tools/systemtap/Regression/RHEL6Feature-cpp-backtraces
|
|
# Description: Tests backtracking in C++ programs
|
|
# Author: Petr Muller <pmuller@redhat.com>
|
|
#
|
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
#
|
|
# Copyright (c) 2010 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 rhts environment
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
. /etc/os-release || exit 1
|
|
|
|
PACKAGE="systemtap"
|
|
|
|
rlJournalStart
|
|
|
|
rlPhaseStartSetup
|
|
rlRun "g++ classes.cpp main.cpp -g -o classes"
|
|
rlRun "stap-prep" 0-255
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartTest
|
|
rlRun "stap --ldd backtrackator.stp -c ./classes -o output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*publicA1[A-Za-z0-9]*/publicA1/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*publicA2[A-Za-z0-9]*/publicA2/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*privateA1[A-Za-z0-9]*/privateA1/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*privateA2[A-Za-z0-9]*/privateA2/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*recursiveA1[A-Za-z0-9]*/recursiveA1/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*publicB1[A-Za-z0-9]*/publicB1/g' output.out"
|
|
rlRun "sed -i -r -e 's/_[_A-Za-z0-9]*privateB1[A-Za-z0-9]*/privateB1/g' output.out"
|
|
rlRun "grep -o -e publicA1 -e publicA2 -e privateA1 -e privateA2 -e recursiveA1 \
|
|
-e publicB1 -e privateB1 -e 'Probed function:.*' -e '=*' \
|
|
output.out > output.processed"
|
|
rlRun "diff output.processed golden.out"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartCleanup
|
|
rlFileSubmit output.out
|
|
rlFileSubmit output.processed
|
|
rlFileSubmit golden.out
|
|
rlRun "rm -f output.out output.processed"
|
|
rlPhaseEnd
|
|
|
|
rlJournalPrintText
|
|
|
|
rlJournalEnd
|